dynamic routing in version 1
Tue, 28 Oct 97 10:07:49 PST
> 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.]
Routing in ns-1 (and for that matter, usually in ns-2) is based on hop counts,
not delays. Therefore, n0-n3-n2 is just as likely as n0-n1-n2, and the
routing algorithms pick up n0-n3-n2.
> 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
> | \
> n1 (n1-n2 link breaks at 10.0 seconds)
Your syntax and commands for taking the link down are correct,
but that is only part of the picture. After taking the link down, you'd have
to notify the adjacent nodes and route objects, that something has changed, so
that they can then go and do their "stuff". Take a look at how the route
models are set up in ns_default.tcl.
Alternately, and better yet, switch to ns-2, for which all of this documented,
and the implementation has become simpler and cleaner. In addition, there is
continuing development in ns-2 as part of the VINT project, which is not the
case for ns-1 any longer.
> If anybody has a useful tcl file, then please let me know, as soon as you can,
> of its ftp location.
If this is what you want to do, look at how the routing test suite is done;
the code is in test-suite-routed.tcl, and files in the tests subdirectory.