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

LLIFqMACPhy_txPhy_rxRadioPropagationModelChannelChannelFigure 17.3: Main components of a satellite network interfaceThe add-interface instproc returns an index value that can be used to access the network interface stack later in thesimulation. By convention, the first interface created on a node is attached to the uplink and downlink channels of a satelliteor terminal. The following parameters must be provided:• type: The following link types can be indicated: geo or polar for links from a terminal to a geo or polar satellite,respectively, gsl and gsl-repeater for links from a satellite to a terminal, and intraplane, interplane,and crossseam ISLs. The type field is used internally in the simulator to identify the different types of links, butstructurally they are all very similar.• ll: The link layer type (class LL/Sat is currently the only one defined).• qtype: The queue type (e.g., class Queue/DropTail). Any queue type may be used– however, if additionalparameters beyond the length of the queue are needed, then this instproc may need to be modified to include morearguments.• qlim: The length of the interface queue, in packets.• mac: The MAC type. Currently, two types are defined: class Mac/Sat– a basic MAC for links with only onereceiver (i.e., it does not do collision detection), and Class Mac/Sat/UnslottedAloha– an implementation ofunslotted Aloha.• mac_bw: The bandwidth of the link is set by this parameter, which controls the transmission time how fast the MACsends. The packet size used to calculate the transmission time is the sum of the values size() in the common packetheader and LINK_HDRSIZE, which is the size of any link layer headers. The default value for LINK_HDRSIZE is 16bytes (settable in satlink.h). The transmission time is encoded in the packet header for use at the receive MAC (tosimulate waiting for a whole packet to arrive).• phy: The physical layer– currently two Phys (Class Phy/Sat and Class Phy/Repeater) are defined. Theclass Phy/Sat just pass the information up and down the stack– as in the wireless code described in Chapter 16, aradio propagation model could be attached at this point. The class Phy/Repeater pipes any packets received on areceive interface straight through to a transmit interface.An ISL can be added between two nodes using the following instproc:175

$ns add-isl $ltype $node1 $node2 $bw $qtype $qlimThis creates two channels (of type Channel/Sat), and appropriate network interfaces on both nodes, and attaches thechannels to the network interfaces. The bandwidth of the link is set to bw. The linktype (ltype) must be specified as eitherintraplane, interplane, or crossseam.A GSL involves adding network interfaces and a channel on board the satellite (this is typically done using the wrappermethods described in the next paragraph), and then defining the correct interfaces on the terrestrial node and attaching themto the satellite link, as follows:$node add-gsl $type $ll $qtype $qlim $mac $bw_up $phy \[$node_satellite set downlink_] [$node_satellite set uplink_]Here, the type must be either geo or polar, and we make use of the downlink_ and uplink_ instvars of the satellite;therefore, the satellite’s uplink and downlink must be created before this instproc is called.By default, the node generator for satellite nodes (described in Section 5.3) will create nodes of a given type, give them anuplink and downlink interface, and create and attach an (initial) uplink and downlink channel, based on the interface optionsspecified.17.2.3 HandoffsSatellite handoff modelling is a key component of LEO satellite network simulations. It is difficult to predict exactly howhandoffs will occur in future LEO systems because the subject is not well treated in the literature. In these satellite extensions,we establish certain criteria for handoffs, and allow nodes to independently monitor for situations that require a handoff. Analternative would be to have all handoff events synchronized across the entire simulation– it would not be difficult to changethe simulator to work in such a manner.There are no link handoffs involving geostationary satellites, but there are two types of links to polar orbiting satellites thatmust be handed off: GSLs to polar satellites, and crossseam ISLs. A third type of link, interplane ISLs, are not handed off butare deactivated at high latitudes as we describe below.Each terminal connected to a polar orbiting satellite runs a timer that, upon expiry, causes the HandoffManager to checkwhether the current satellite has fallen below the elevation mask of the terminal. If so, the handoff manager detaches theterminal from that satellite’s up and down links, and searches through the linked list of satellite nodes for another possiblesatellite. First, the “next” satellite in the current orbital plane is checked– a pointer to this satellite is stored in the Positionobject of each polar satellite node and is set during simulation configuration using the Node/SatNode instproc “$nodeset_next $next_node.” If the next satellite is not suitable, the handoff manager searches through the remaining satellites.If it finds a suitable polar satelite, it connects its network interfaces to that satellite’s uplink and downlink channels, andrestarts the handoff timer. If it does not find a suitable satellite, it restarts the timer and tries again later. If any link changesoccur, the routing agent is notified.The elevation mask and handoff timer interval are settable via OTcl:HandoffManager/Term set elevation_mask_ 10; # degreesHandoffManager/Term set term_handoff_int_ 10; # secondsIn addition, handoffs may be randomized to avoid phase effects by setting the following variable:HandoffManager set handoff_randomization_ 0; # 0 is false, 1 is true176

LLIFqMACPhy_txPhy_rxRadioPropag<strong>at</strong>ionModelChannelChannelFigure 17.3: Main components of a s<strong>at</strong>ellite network interface<strong>The</strong> add-interface i<strong>ns</strong>tproc retur<strong>ns</strong> an index value th<strong>at</strong> can be used to access the network interface stack l<strong>at</strong>er in thesimul<strong>at</strong>ion. By convention, the first interface cre<strong>at</strong>ed on a node is <strong>at</strong>tached to the uplink <strong>and</strong> downlink channels of a s<strong>at</strong>elliteor terminal. <strong>The</strong> following parameters must be provided:• type: <strong>The</strong> following link types can be indic<strong>at</strong>ed: geo or polar for links from a terminal to a geo or polar s<strong>at</strong>ellite,respectively, gsl <strong>and</strong> gsl-repe<strong>at</strong>er for links from a s<strong>at</strong>ellite to a terminal, <strong>and</strong> intraplane, interplane,<strong>and</strong> crossseam ISLs. <strong>The</strong> type field is used internally in the simul<strong>at</strong>or to identify the different types of links, butstructurally they are all very similar.• ll: <strong>The</strong> link layer type (class LL/S<strong>at</strong> is currently the only one defined).• qtype: <strong>The</strong> queue type (e.g., class Queue/DropTail). Any queue type may be used– however, if additionalparameters beyond the length of the queue are needed, then this i<strong>ns</strong>tproc may need to be modified to include morearguments.• qlim: <strong>The</strong> length of the interface queue, in packets.• mac: <strong>The</strong> MAC type. Currently, two types are defined: class Mac/S<strong>at</strong>– a basic MAC for links with only onereceiver (i.e., it does not do collision detection), <strong>and</strong> Class Mac/S<strong>at</strong>/U<strong>ns</strong>lottedAloha– an implement<strong>at</strong>ion ofu<strong>ns</strong>lotted Aloha.• mac_bw: <strong>The</strong> b<strong>and</strong>width of the link is set by this parameter, which controls the tra<strong>ns</strong>mission time how fast the MACsends. <strong>The</strong> packet size used to calcul<strong>at</strong>e the tra<strong>ns</strong>mission time is the sum of the values size() in the common packetheader <strong>and</strong> LINK_HDRSIZE, which is the size of any link layer headers. <strong>The</strong> default value for LINK_HDRSIZE is 16bytes (settable in s<strong>at</strong>link.h). <strong>The</strong> tra<strong>ns</strong>mission time is encoded in the packet header for use <strong>at</strong> the receive MAC (tosimul<strong>at</strong>e waiting for a whole packet to arrive).• phy: <strong>The</strong> physical layer– currently two Phys (Class Phy/S<strong>at</strong> <strong>and</strong> Class Phy/Repe<strong>at</strong>er) are defined. <strong>The</strong>class Phy/S<strong>at</strong> just pass the inform<strong>at</strong>ion up <strong>and</strong> down the stack– as in the wireless code described in Chapter 16, aradio propag<strong>at</strong>ion model could be <strong>at</strong>tached <strong>at</strong> this point. <strong>The</strong> class Phy/Repe<strong>at</strong>er pipes any packets received on areceive interface straight through to a tra<strong>ns</strong>mit interface.An ISL can be added between two nodes using the following i<strong>ns</strong>tproc:175

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

Saved successfully!

Ooh no, something went wrong!