Hi,
take a deep breath, empty your mind and ask yourself:
what communication layer in my servers will do this ?
Case 1: at IP level.
Answer: you need to use source routing IP extension headers. Dunno if
they are supported tho.
Case 2: at application level.
Answer: you need to put the hop-by-hop infos in the packet.
For sure sockets don't support setting up headers for case 1 at the
moment, or they do in a way I'm not aware of.
So you'll have to create your packets "by hand" and send them using a
RawSocket.
My suggestion is:
Check how the hop-by-hop, aka source routing is achieved by IP
studying the IPv4 and IPv6 RFCs.
Then check how Linux can (or can't) use it. Mind that source routing
is usually used only for network probing, so ping, trace route and so
on.
Then check if ns-3 can do something similar. If it can't, propose a
new feature, API or whatever.
Possibly implement it :)
Painful ? Yes.
Challenging ? Yes.
Fulfilling ? It depends on you :)
Result achieved: a better understanding on how it works "for real".
Cheers,
T.
PS: DSR, like all the routing protocols, can be used on p2p links as
well. On the other hand routing protocols do their job considering the
src/dst pair (or more params) and can't help if you want to send 2
almost identical packets using two completely different paths.