[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] periodic updates
On Tue, 13 Mar 2001, [iso-8859-1] Andrea Josi wrote:
> How could you see that route computation is done just
> after all DV packets are sent ?
This is my take. After identifying any changes locally, the routes are
installed in the node and "send-updates" routine of all the protocols
is/are invoked. If this is node A, let the updates be sent to node B. This
actually happens by invoking the recv-update function of the peer object
(DV protocol at B). recv-update is in turn invoking the compute-routines
of the rtObject at that node (node B) which installs the new routes. The
initial invocation (as against by recv-update) of rtObject compute-routes
occurs at every node. So, I believe that the new routes are installed
incrementally, when we simuate link failures using the rtModels. I am
still not sure as how periodic updates and link failures are synchronized.
Hope I am clear.
thanks,
Prasad.
/* this is part of the rtObject instproc compute-routes code */
foreach dst [$ns_ all-nodes-list] {
......
if {$rtpref_($dst) != $pf || $metric_($dst) != $mt} {
# Then new prefs must be better, or
# new prefs are equal, and new metrics are lower
$node_ delete-routes [$dst id] $nextHop_($dst) $nullAgent_
.......
$node_ add-routes [$dst id] $nextHop_($dst)
}
......
}
foreach proto [array names rtProtos_] {
$rtProtos_($proto) send-updates $changes
}