[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
dynamic routing in version 1
Hello:
I am working the version 1.4 and I am very much in the dark about the
dynamic routing part of it.
I tried to set up a four node configuration with a sender, receiver and
two intermediate nodes.
i) At first the data should be routed through an optimum path passing through one of the
intermediate nodes. [ But always the data is being routed through n3
(see code below) even though the least delay path is through n1. I don't know
if it is a bug.]
ii) I am trying to design a simulation a link is made
to fail and the traffic is made to switch over to the other intermediate node.
I am trying this out by extending the "example.tcl" file in the v1.4
distribution.
n3
/-------------*\
| \
n0*---------*---//--*n2
n1 (n1-n2 link breaks at 10.0 seconds)
If anybody has a useful tcl file, then please let me know, as soon as you can,
of its ftp location.
Otherwise please give amendments to the following code clip.
#*****************************************************************************
# Extension of example.tcl to simulate dynamic routing
#n0 - sender, n1 - 1st intermediate node, n2 - receiver, n3 - 2nd intermediate
#node
set n0 [ns node]
set n3 [ns base]
set n1 [ns base]
set n2 [ns node]
ns_duplex $n0 $n1 15Mb 100ms drop-Tail
ns_duplex $n0 $n3 15Mb 150ms drop-Tail
ns_duplex $n1 $n2 1.5Mb 10ms drop-tail
ns_duplex $n3 $n2 1.5Mb 10ms drop-tail
set src1 [ns agent tcp $n0]
set sink1 [ns agent tcp-sink $n2]
ns_connect $src1 $sink1
$src1 set class 1
set ftp1 [$src1 source ftp]
ns at 0.0 "$ftp1 start"
# set the link between n1 and n2 to go down after 10 seconds
ns at 10.0 "[lindex $link0 0] down "
# The rest of the code is as in example.tcl
#****************************************************************************
Thankyou
J.M.Arun