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.

Asymmetric Routing Asymmetric routing occurs when the p<strong>at</strong>h from node n 1 to node n 2 is different from the p<strong>at</strong>h fromn 2 to n 1 . <strong>The</strong> following shows a simple topology, <strong>and</strong> cost configur<strong>at</strong>ion th<strong>at</strong> can achieve such a result:Nodes n 1 <strong>and</strong> n 2 use differentp<strong>at</strong>hs to reach each other. Allother pairs of nodes use symmetricp<strong>at</strong>hs to reach each other.n1r1r2n2$<strong>ns</strong> cost $n1 $r1 2$<strong>ns</strong> cost $n2 $r2 2$<strong>ns</strong> cost $r1 $n2 3Any routing protocol th<strong>at</strong> uses link costs as the metric can observe such asymmetric routing if the link costs are appropri<strong>at</strong>elyconfigured 4 .MultiP<strong>at</strong>h Routing Each node can be individually configured to use multiple separ<strong>at</strong>e p<strong>at</strong>hs to a particular destin<strong>at</strong>ion.<strong>The</strong> i<strong>ns</strong>tance variable multiP<strong>at</strong>h_ determines whether or not th<strong>at</strong> node will use multiple p<strong>at</strong>hs to any destin<strong>at</strong>ion. Eachnode initialises its i<strong>ns</strong>tance variable from a class variable of the same name. If multiple c<strong>and</strong>id<strong>at</strong>e routes to a destin<strong>at</strong>ionare available, all of which are learned through the same protocol, then th<strong>at</strong> node can use all of the different routes to thedestin<strong>at</strong>ion simultaneously. A typical configur<strong>at</strong>ion is as shown below:Node set multiP<strong>at</strong>h_ 1or altern<strong>at</strong>elyset n1 [$<strong>ns</strong> Node]$n1 set multiP<strong>at</strong>h_ 1;# All new nodes in the simul<strong>at</strong>ion use multiP<strong>at</strong>hs where applicable;# only enable $n1 to use multiP<strong>at</strong>hs where applicableCurrently, only DV routing can gener<strong>at</strong>e multip<strong>at</strong>h routes.29.3 Protocol Specific Configur<strong>at</strong>ion ParametersSt<strong>at</strong>ic Routing <strong>The</strong> st<strong>at</strong>ic route comput<strong>at</strong>ion str<strong>at</strong>egy is the default route comput<strong>at</strong>ion mechanism in <strong>ns</strong>. This str<strong>at</strong>egyuses the Dijkstra’s all-pairs SPF algorithm []. <strong>The</strong> route comput<strong>at</strong>ion algorithm is run exactly once prior to the start of thesimul<strong>at</strong>ion. <strong>The</strong> routes are computed using an adjacency m<strong>at</strong>rix <strong>and</strong> link costs of all the links in the topology.(Note th<strong>at</strong> st<strong>at</strong>ic routing is st<strong>at</strong>ic in the se<strong>ns</strong>e th<strong>at</strong> it is computed once when the simul<strong>at</strong>ion starts, as opposed to session <strong>and</strong>DV routing th<strong>at</strong> allow routes to change mid-simul<strong>at</strong>ion. An altern<strong>at</strong>ive to st<strong>at</strong>ic routing is <strong>Manual</strong> routing where routes arenot computed but i<strong>ns</strong>tead are set (manually) by the user.)Session Routing <strong>The</strong> st<strong>at</strong>ic routing str<strong>at</strong>egy described earlier only computes routes for the topology once in the course of asimul<strong>at</strong>ion. If the above st<strong>at</strong>ic routing is used <strong>and</strong> the topology changes while the simul<strong>at</strong>ion is in progress, some sources <strong>and</strong>destin<strong>at</strong>io<strong>ns</strong> may become temporarily unreachable from each other for a short time.Session routing str<strong>at</strong>egy is almost identical to st<strong>at</strong>ic routing, in th<strong>at</strong> it ru<strong>ns</strong> the Dijkstra all-pairs SPF algorithm prior to thestart of the simul<strong>at</strong>ion, using the adjacency m<strong>at</strong>rix <strong>and</strong> link costs of the links in the topology. However, it will also run thesame algorithm to recompute routes in the event th<strong>at</strong> the topology changes during the course of a simul<strong>at</strong>ion. In other words,route recomput<strong>at</strong>ion <strong>and</strong> recovery is done i<strong>ns</strong>tantaneously <strong>and</strong> there will not be tra<strong>ns</strong>ient routing outage as in st<strong>at</strong>ic routing.Session routing provides complete <strong>and</strong> i<strong>ns</strong>tantaneous routing changes in the presence of topology dynamics. If the topology isalways connected, there is end-to-end connectivity <strong>at</strong> all times during the course of the simul<strong>at</strong>ion. However, the user should4 Link costs can also be used to favour or disregard specific links in order to achieve particular topology configur<strong>at</strong>io<strong>ns</strong>.252

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

Saved successfully!

Ooh no, something went wrong!