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 ...

nmlab.korea.ac.kr
from nmlab.korea.ac.kr More from this publisher
12.07.2015 Views

a starting position. The information regarding number of hops between the nodes is fed to the central object "GOD" (XXXbut why/where is this information used??-answer awaited from CMU.) Next each node is a speed and a direction to move to.The generator for creating node movement files are to be found under ~ns/indep-utils/cmu-scen-gen/setdest/ directory. Compilethe files under setdest to create an executable. run setdest with arguments in the following way:./setdest -n -p -s -t -x -y > /Note that the index used for nodes now start from 0 instead of 1 as was in the original CMU version, to match with ns’stradition of assigning node indices from 0.Generating traffic pattern filesThe examples for traffic patterns may be found in ~ns/tcl/mobility/scene/cbr-50-{10-4-512, 20-4-512}.The traffic generator is located under ~ns/indep-utils/cmu-scen-gen/ and are called cbrgen.tcl and tcpgen.tcl. They may beused for generating CBR and TCP connections respectively.To create CBR connecions, runns cbrgen.tcl [-type cbr|tcp] [-nn nodes] [-seed seed][-mc connections] [-rate rate]To create TCP connections, runns tcpgen.tcl [-nn nodes] [-seed seed]You will need to pipe the outputs from above to a cbr-* or a tcp-* file.16.2 Extensions made to CMU’s wireless modelAs mentioned earlier, the original CMU wireless model allows simulation of wireless LANs and ad-hoc networks. Howeverin order to use the wireless model for simulations using both wired and wireless nodes we had to add certain extensions tocmu model. We call this wired-cum-wireless feature. Also SUN’s MobileIP (implemented for wired nodes) was integratedinto the wireless model allowing mobileIP to run over wireless mobilenodes. The following two subsections describe thesetwo extensions to the wireless model in ns.16.2.1 wired-cum-wireless scenariosThe mobilenodes described so far mainly supports simulation of multi-hop ad-hoc networks or wireless LANs. But what ifwe need to simulate a topology of multiple wireless LANs connected through wired nodes, or may need to run mobileIP ontop of these wireless nodes? The extensions made to the CMU wireless model allows us to do that.161

The main problem facing the wired-cum-wireless scenario was the issue of routing. In ns, routing information is generatedbased on the connectivity of the topology, i.e how nodes are connected to one another through Links. Mobilenodes on theother hand have no concept of links. They route packets among themselves, within the wireless topology, using their routingprotocol. so how would packets be exchanged between these two types of nodes?So a node called BaseStationNode is created which plays the role of a gateway for the wired and wireless domains.The BaseStationNode is essentially a hybrid between a Hierarchical node 1 (HierNode) and a MobileNode. Thebasestation node is responsible for delivering packets into and out of the wireless domain. In order to achieve this we needHierarchical routing.Each wireless domain along with its base-station would have an unique domain address assigned to them. All packets destinedto a wireless node would reach the base-station attached to the domain of that wireless node, who would eventually hand thepacket over to the destination (mobilenode). And mobilenodes route packets, destined to outside their (wireless) domain, totheir base-station node. The base-station knows how to forward these packets towards the (wired) destination. The schematicof a BaseStationNode is shown in Figure 16.3.The mobilenodes in wired-cum-wireless scenario are required to support hierarchical addressing/routing. Thus the MobileNodelooks exactly like the BaseStationNode. The SRNode, however, simply needs to have its own hier-address since it doesnot require any address demuxes and thus is not required to support hier routing 2 .The DSDV agent on having to forward a packet checks to see if the destination is outside its (wireless) subnet. If so, it triesto forward the packet to its base-station node. In case no route to base-station is found the packet is dropped. Otherwisethe packet is forwarded to the next_hop towards the base-station. Which is then routed towards the wired network by basestation’sclassifiers.The DSR agent, on receiving a pkt destined outside its subnet, sends out a route-query for its base-station in case the route tobase-station is not known. The data pkt is temporarily cached while it waits to hear route replies from base-station. On gettinga reply the packet is provided with routing information in its header and send away towards the base-station. The base-stationaddress demuxes routes it correctly toward the wired network.The example script for a wired-cum-wireless simulation can be found at ~ns/tcl/ex/wired-cum-wireless-sim.tcl. The methodsfor wired-cum-wireless implementations are defined in ~ns/tcl/lib/ns-bsnode.tcl, ~ns/tcl/mobility/{com.tcl,dsr.tcl, dsdv.tcl},~ns/dsdv/dsdv.{cc,h} and ~ns/dsr/dsragent.{cc,h}.16.2.2 MobileIPThe wired-cum-wireless extensions for the wireless model paved the path for supporting wireless MobileIP in ns. SunMicrosystem’s (Charlie Perkins et al) MobileIP model was based on ns’s wired model (consisting of Node’s and Link’s)and thus didnot use CMU’s mobility model.Here we briefly describe the wireless MobileIP implementation. We hope that Sun would provide the detailed version of thedocumentation in the future.The mobileIP scenario consists of Home-Agents(HA) and Foreign-Agents(FA) and have Mobile-Hosts(MH) moving betweentheir HA and FAs. The HA and FA are essentially base-station nodes we have described earlier. While MHs arebasically the mobileNodes described in section 16.1.1. The methods and procedures for MobileIP extensions are described in~ns/mip.{cc,h}, ~ns/mip-reg.cc, ~ns/tcl/lib/ns-mip.tcl and ~ns/tcl/lib/ns-wireless-mip.tcl.The HA and FA nodes are defined as MobileNode/MIPBS having a registering agent (regagent_) that sends beacon out to1 Refer to Chapter 32 for details on hierarchical routing and internals of HierNode.2 In order to do away with all these different variations of the definition of a node, we are planning to revise the node architecture that would allow a moreflexible and modularised construction of a node without the necessity of having to define and be limited to certain Class definitions only.162

a starting position. <strong>The</strong> inform<strong>at</strong>ion regarding number of hops between the nodes is fed to the central object "GOD" (XXXbut why/where is this inform<strong>at</strong>ion used??-a<strong>ns</strong>wer awaited from CMU.) Next each node is a speed <strong>and</strong> a direction to move to.<strong>The</strong> gener<strong>at</strong>or for cre<strong>at</strong>ing node movement files are to be found under ~<strong>ns</strong>/indep-utils/cmu-scen-gen/setdest/ directory. Compilethe files under setdest to cre<strong>at</strong>e an executable. run setdest with arguments in the following way:./setdest -n -p -s -t -x -y > /Note th<strong>at</strong> the index used for nodes now start from 0 i<strong>ns</strong>tead of 1 as was in the original CMU version, to m<strong>at</strong>ch with <strong>ns</strong>’stradition of assigning node indices from 0.Gener<strong>at</strong>ing traffic p<strong>at</strong>tern files<strong>The</strong> examples for traffic p<strong>at</strong>ter<strong>ns</strong> may be found in ~<strong>ns</strong>/tcl/mobility/scene/cbr-50-{10-4-512, 20-4-512}.<strong>The</strong> traffic gener<strong>at</strong>or is loc<strong>at</strong>ed under ~<strong>ns</strong>/indep-utils/cmu-scen-gen/ <strong>and</strong> are called cbrgen.tcl <strong>and</strong> tcpgen.tcl. <strong>The</strong>y may beused for gener<strong>at</strong>ing CBR <strong>and</strong> TCP connectio<strong>ns</strong> respectively.To cre<strong>at</strong>e CBR connecio<strong>ns</strong>, run<strong>ns</strong> cbrgen.tcl [-type cbr|tcp] [-nn nodes] [-seed seed][-mc connectio<strong>ns</strong>] [-r<strong>at</strong>e r<strong>at</strong>e]To cre<strong>at</strong>e TCP connectio<strong>ns</strong>, run<strong>ns</strong> tcpgen.tcl [-nn nodes] [-seed seed]You will need to pipe the outputs from above to a cbr-* or a tcp-* file.16.2 Exte<strong>ns</strong>io<strong>ns</strong> made to CMU’s wireless modelAs mentioned earlier, the original CMU wireless model allows simul<strong>at</strong>ion of wireless LANs <strong>and</strong> ad-hoc networks. Howeverin order to use the wireless model for simul<strong>at</strong>io<strong>ns</strong> using both wired <strong>and</strong> wireless nodes we had to add certain exte<strong>ns</strong>io<strong>ns</strong> tocmu model. We call this wired-cum-wireless fe<strong>at</strong>ure. Also SUN’s MobileIP (implemented for wired nodes) was integr<strong>at</strong>edinto the wireless model allowing mobileIP to run over wireless mobilenodes. <strong>The</strong> following two subsectio<strong>ns</strong> describe thesetwo exte<strong>ns</strong>io<strong>ns</strong> to the wireless model in <strong>ns</strong>.16.2.1 wired-cum-wireless scenarios<strong>The</strong> mobilenodes described so far mainly supports simul<strong>at</strong>ion of multi-hop ad-hoc networks or wireless LANs. But wh<strong>at</strong> ifwe need to simul<strong>at</strong>e a topology of multiple wireless LANs connected through wired nodes, or may need to run mobileIP ontop of these wireless nodes? <strong>The</strong> exte<strong>ns</strong>io<strong>ns</strong> made to the CMU wireless model allows us to do th<strong>at</strong>.161

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

Saved successfully!

Ooh no, something went wrong!