12.07.2015 Views

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

note th<strong>at</strong> the i<strong>ns</strong>tantaneous route recomput<strong>at</strong>ion of session routing does not prevent temporary viol<strong>at</strong>io<strong>ns</strong> of causality, such aspacket reordering, around the i<strong>ns</strong>tant th<strong>at</strong> the topology changes.DV Routing DV routing is the implement<strong>at</strong>ion of Distributed Bellman-Ford (or Distance Vector) routing in <strong>ns</strong>. <strong>The</strong>implement<strong>at</strong>ion sends periodic route upd<strong>at</strong>es every advertInterval. This variable is a class variable in the classAgent/rtProto/DV. Its default value is 2 seconds.In addition to periodic upd<strong>at</strong>es, each agent also sends triggered upd<strong>at</strong>es; it does this whenever the forwarding tables in thenode change. This occurs either due to changes in the topology, or because an agent <strong>at</strong> the node received a route upd<strong>at</strong>e, <strong>and</strong>recomputed <strong>and</strong> i<strong>ns</strong>talled new routes.Each agent employs the split horizon with poisoned reverse mechanisms to advertise its routes to adjacent peers. “Splithorizon” is the mechanism by which an agent will not advertise the route to a destin<strong>at</strong>ion out of the interface th<strong>at</strong> it is usingto reach th<strong>at</strong> destin<strong>at</strong>ion. In a “Split horizon with poisoned reverse” mechanism, the agent will advertise th<strong>at</strong> route out of th<strong>at</strong>interface with a metric of infinity.Each DV agent uses a default preference_ of 120. <strong>The</strong> value is determined by the class variable of the same name.Each agent uses the class variable INFINITY (set <strong>at</strong> 32) to determine the validity of a route.<strong>Manual</strong> Routing <strong>Manual</strong> routing is not a route comput<strong>at</strong>ion protocol (like the others), but simply a way for users toconfigure the routing table by h<strong>and</strong>, much as you would with the “route” comm<strong>and</strong> on a workst<strong>at</strong>ion.To use manual routing, enable it with rtproto, then set each nodes routing tables with the add-route-to-adj-node comm<strong>and</strong>.For example:$<strong>ns</strong> rtproto <strong>Manual</strong>set n1 [$<strong>ns</strong> node]set n2 [$<strong>ns</strong> node]$<strong>ns</strong> duplex-link $n1 $n2 10Mb 100ms DropTail$n1 add-route-to-adj-node -default $n2$n2 add-route-to-adj-node -default $n1For a more complete example, see tcl/ex/many_tcp.tcl.29.4 Internals <strong>and</strong> Architecture of RoutingWe start with a discussion of the classes associ<strong>at</strong>ed with unicast routing, <strong>and</strong> the code p<strong>at</strong>h used to configure <strong>and</strong> executeeach of the different routing protocols. We conclude with a description of the interface between unicast routing <strong>and</strong> networkdynamics, <strong>and</strong> th<strong>at</strong> between unicast <strong>and</strong> multicast routing.29.4.1 <strong>The</strong> classes<strong>The</strong>re are four main classes, the class RouteLogic, the class rtObject, the class rtPeer, <strong>and</strong> the base class Agent/rtProto for allprotocols. In addition, the routing architecture extends the classes Simul<strong>at</strong>or, Link, Node <strong>and</strong> Classifier.253

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!