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.

Chapter 16Mobile Networking in <strong>ns</strong>This chapter describes the wireless model th<strong>at</strong> was originally ported as CMU’s Monarch group’s mobility exte<strong>ns</strong>ion to <strong>ns</strong>.This chapter co<strong>ns</strong>ists of two sectio<strong>ns</strong> <strong>and</strong> several subsectio<strong>ns</strong>. <strong>The</strong> first section covers the original mobility model ported fromCMU/Monarch group. In this section, we cover the internals of a mobilenode, routing mechanisms <strong>and</strong> network componentsth<strong>at</strong> are used to co<strong>ns</strong>truct the network stack for a mobilenode. <strong>The</strong> components th<strong>at</strong> are covered briefly are Channel, Networkinterface,Radio propag<strong>at</strong>ion model, MAC protocols, Interface Queue, Link layer <strong>and</strong> Address resolution protocol model(ARP). CMU trace support <strong>and</strong> Gener<strong>at</strong>ion of node movement <strong>and</strong> traffic scenario files are also covered in this section. <strong>The</strong>original CMU model allows simul<strong>at</strong>ion of pure wireless LANs or multihop ad-hoc networks. Further exte<strong>ns</strong>io<strong>ns</strong> were made tothis model to allow combined simul<strong>at</strong>ion of wired <strong>and</strong> wireless networks. MobileIP was also extended to the wireless model.<strong>The</strong>se are discussed in the second section of this chapter.16.1 <strong>The</strong> basic wireless model in <strong>ns</strong><strong>The</strong> wireless model essentially co<strong>ns</strong>ists of the MobileNode <strong>at</strong> the core,with additional supporting fe<strong>at</strong>ures th<strong>at</strong> allows simul<strong>at</strong>io<strong>ns</strong>of multi-hop ad-hoc networks, wireless LANs etc. <strong>The</strong> MobileNode object is a split object. <strong>The</strong> C++ classMobileNode is derived from parent class Node. Refer to Chapter 5 for details on Node. A MobileNode thus is thebasic Node object with added functionalities of a wireless <strong>and</strong> mobile node like ability to move within a given topology,ability to receive <strong>and</strong> tra<strong>ns</strong>mit signals to <strong>and</strong> from a wireless channel etc. A major difference between them, though, is th<strong>at</strong>a MobileNode is not connected by mea<strong>ns</strong> of Links to other nodes or mobilenodes. In this section we shall describe theinternals of MobileNode, its routing mechanisms, the routing protocols dsdv, aodv, tora <strong>and</strong> dsr, cre<strong>at</strong>ion of network stackallowing channel access in MobileNode, brief description of each stack component, trace support <strong>and</strong> movement/trafficscenario gener<strong>at</strong>ion for wireless simul<strong>at</strong>io<strong>ns</strong>.16.1.1 Mobilenode: cre<strong>at</strong>ing wireless topologyMobileNode is the basic <strong>ns</strong>Node object with added functionalities like movement, ability to tra<strong>ns</strong>mit <strong>and</strong> receive on a channelth<strong>at</strong> allows it to be used to cre<strong>at</strong>e mobile, wireless simul<strong>at</strong>ion environments. <strong>The</strong> class MobileNode is derived from thebase class Node. MobileNode is a split object. <strong>The</strong> mobility fe<strong>at</strong>ures including node movement, periodic position upd<strong>at</strong>es,maintaining topology boundary etc are implemented in C++ while plumbing of network components within MobileNodeitself (like classifiers, dmux , LL, Mac, Channel etc) have been implemented in Otcl. <strong>The</strong> functio<strong>ns</strong> <strong>and</strong> procedures describedin this subsection can be found in ~<strong>ns</strong>/mobilenode.{cc,h}, ~<strong>ns</strong>/tcl/lib/<strong>ns</strong>-mobilenode.tcl, ~<strong>ns</strong>/tcl/mobility/dsdv.tcl,~<strong>ns</strong>/tcl/mobility/dsr.tcl, ~<strong>ns</strong>/tcl/mobility/tora.tcl. Example scripts can be found in ~<strong>ns</strong>/tcl/ex/wireless-test.tcl <strong>and</strong> ~<strong>ns</strong>/tcl/ex/wireless.tcl.144

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

Saved successfully!

Ooh no, something went wrong!