[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] One question about DV routing.
Hi,
I have the following partial of simulation code.
I dumped the routing table information twice at different time.
It is so strange that the routing tables are very different:
First time:
0 1 2 3 4
0 -- 2 2 2 2
1 2 -- 2 2 2
2 0 1 -- 3 4
3 2 2 2 -- 4
4 2 2 2 3 --
Second time:
0 1 2 3 4
0 -- 2
1 -- 2
2 0 1 -- 3 4
3 2 -- 4
4 2 3 --
I am very anxious to know the reason. Could you please
tell me?
Thank you very much!
Best,
Zhi Li
# $n0 $n3
# \ / \
# \ / \
# $n2-------$n4
# /
# /
# $n1
#
set ns [new Simulator -multicast on]
$ns duplex-link $n(0) $n(2) 10Mb 2ms DropTail
$ns duplex-link $n(1) $n(2) 10Mb 2ms DropTail
$ns duplex-link $n(2) $n(3) 5Mb 10ms DropTail
$ns duplex-link $n(3) $n(4) 5Mb 10ms DropTail
$ns duplex-link $n(2) $n(4) 2Mb 10ms DropTail
$ns rtproto DV
$ns compute-routes
$ns dump-routelogic-nh
$ns at 1.9 "$ns dump-routelogic-nh"