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.

destined to itself to the port dmux. In SRNode the port number 255 points to a null agent since the packet has already beenprocessed by the routing agent.See ~<strong>ns</strong>/dsr directory <strong>and</strong> ~<strong>ns</strong>/tcl/mobility/dsr.tcl for implement<strong>at</strong>ion of DSR protocol.TORATora is a distributed routing protocol based on "link reversal" algorithm. At every node a separ<strong>at</strong>e copy of TORA is run forevery destin<strong>at</strong>ion. When a node needs a route to a given destin<strong>at</strong>ion it broadcasts a QUERY message containing the addressof the destin<strong>at</strong>ion for which it requires a route. This packet travels through the network until it reaches the destin<strong>at</strong>ion oran intermedi<strong>at</strong>e node th<strong>at</strong> has a route to the destin<strong>at</strong>ion node. This recepient node node then broadcasts an UPDATE packetlisting its height wrt the destin<strong>at</strong>ion. As this node propag<strong>at</strong>es through the network each node upd<strong>at</strong>es its height to a valuegre<strong>at</strong>er than the height of the neighbour from which it receives the UPDATE. This results in a series of directed links from thenode th<strong>at</strong> origin<strong>at</strong>ed the QUERY to the destin<strong>at</strong>ion node. If a node discovers a particular destin<strong>at</strong>ion to be unreachable it setsa local maximum value of height for th<strong>at</strong> destin<strong>at</strong>ion. Incase the node cannot find any neighbour having finite height wrt thisdestin<strong>at</strong>ion it <strong>at</strong>tempts to find a new route. In case of network partition, the node broadcasts a CLEAR message th<strong>at</strong> resets allrouting st<strong>at</strong>es <strong>and</strong> removes invalid routes from the network.TORA oper<strong>at</strong>es on top of IMEP (Internet MANET Encapsul<strong>at</strong>ion Protocol) th<strong>at</strong> provides reliable delivery of route-messages<strong>and</strong> informs the routing protocol of any changes of the links to its neighbours. IMEP tries to aggreg<strong>at</strong>e IMEP <strong>and</strong> TORAmessages into a single packet (called block) in order to reduce overhead. For link-st<strong>at</strong>us se<strong>ns</strong>ing <strong>and</strong> maintaining a list ofneighbour nodes, IMEP sends out periodic BEACON messages which is a<strong>ns</strong>wered by each node th<strong>at</strong> hears it by a HELLOreply message. See <strong>ns</strong>/tora directory <strong>and</strong> <strong>ns</strong>/tcl/mobility/tora.tcl for implement<strong>at</strong>ion of tora in <strong>ns</strong>.AODVAODV is a combin<strong>at</strong>ion of both DSR <strong>and</strong> DSDV protocols. It has the basic route-discovery <strong>and</strong> route-maintenance of DSR<strong>and</strong> uses the hop-by-hop routing, sequence numbers <strong>and</strong> beaco<strong>ns</strong> of DSDV. <strong>The</strong> node th<strong>at</strong> wants to know a route to a givendestin<strong>at</strong>ion gener<strong>at</strong>es a ROUTE REQUEST. <strong>The</strong> route request is forwarded by intermedi<strong>at</strong>e nodes th<strong>at</strong> also cre<strong>at</strong>es a reverseroute for itself from the destin<strong>at</strong>ion. When the request reaches a node with route to destin<strong>at</strong>ion it gener<strong>at</strong>es a ROUTE REPLYcontaining the number of hops requires to reach destin<strong>at</strong>ion. All nodes th<strong>at</strong> particip<strong>at</strong>es in forwarding this reply to the sourcenode cre<strong>at</strong>es a forward route to destin<strong>at</strong>ion. This st<strong>at</strong>e cre<strong>at</strong>ed from each node from source to destin<strong>at</strong>ion is a hop-by-hop st<strong>at</strong>e<strong>and</strong> not the entire route as is done in source routing. See <strong>ns</strong>/aodv <strong>and</strong> <strong>ns</strong>/tcl/lib/<strong>ns</strong>-lib.tcl for implement<strong>at</strong>ional details of aodv.16.1.6 Trace Support<strong>The</strong> trace support for wireless simul<strong>at</strong>io<strong>ns</strong> currently use cmu-trace objects. In the future this shall be extended to merge withtrace <strong>and</strong> monitoring support available in <strong>ns</strong>, which would also include nam support for wireless modules. For now we willexplain briefly with cmu-trace objects <strong>and</strong> how they may be used to trace packets for wireless scenarios.<strong>The</strong> cmu-trace objects are of three types - CMUTrace/Drop, CMUTrace/Recv <strong>and</strong> CMUTrace/Send. <strong>The</strong>se are used fortracing packets th<strong>at</strong> are dropped, received <strong>and</strong> sent by agents, routers, mac layers or interface queues in <strong>ns</strong>. <strong>The</strong> methods <strong>and</strong>procedures used for implementing wireless trace support can be found under ~<strong>ns</strong>/trace.{cc,h} <strong>and</strong> ~<strong>ns</strong>/tcl/lib/<strong>ns</strong>-cmutrace.tcl.A cmu-trace object may be cre<strong>at</strong>ed by the following API:set sndT [cmu-trace Send "RTR" $self]154

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

Saved successfully!

Ooh no, something went wrong!