Hello all,
I need to simulate a redundant topology using ns2 but I could not figure out
how. The topology is like this:
NODE ----------------------- NODE
A ----------------------- B
It's basically two nodes with two links in between (one duplex and other
simplex - then for ns2 is 3 links) -- and then I must be able to specify
which link should be used for data to be transmitted from A to B. I
thought that I could use routes -- but If I do so, I cannot tell which link
should be used -- just the next hop (and there are two ways to reach B -- so
how to specify a single link?). The code below shows where I'm having
problem.
#Create two nodes
set nA [$ns node]
set nB [$ns node]
#Create two links between the nodes
$ns duplex-link $nA $nB 1Mb 400ms DropTail blue
$ns simplex-link $nA $nB 1Mb 40ms DropTail red
#create manual routing (ref: pg 257 of ns-manual)
$ns rtproto Manual
#specify route
#how to specify which link should be use? In this cause, which of the two
links would be used by ns2?
$nA add-route-to-adj-node -default $nB
#In fact, I think that I have to specify only which link should be used..
and not even to deal with routing
#end of script
Thank you for your attention,
Giovane