[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

routing bug?



Hi,

I am trying to assign link cost to affect DV routing.

My code is like:
...
$ns duplex-link $n0 $n1 5Mb 2ms DropTail
$ns simplex-link $n1 $n2 0.5Mb 20ms DropTail ;# bottle neck link
$ns simplex-link $n2 $n1 0.5Mb 20ms DropTail ;# bottle neck link
$ns duplex-link $n1 $n3 5Mb 2ms DropTail
$ns duplex-link $n3 $n4 5Mb 2ms DropTail
$ns duplex-link $n4 $n2 5Mb 2ms DropTail

$ns cost $n1 $n2 20
$ns cost $n2 $n1 20
...
$ns rtproto DV [$ns all-nodes-list]
...
$ns run

I am sending TCP traffic from node 0 to node 2.

The DV routing algorithm has calculated the correct path for 2->4->3->0.
But the forward path is wrong. It is 0->1->2.

I am using ns 2.1b4.
Does anyone can explain why this happens?

Thanks in advance,

Ian Liu