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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

This will add an error model to the receive p<strong>at</strong>h of the first interface cre<strong>at</strong>ed on node $node (specifically, between the MAC<strong>and</strong> link layer)– this first interface generally corresponds to the uplink <strong>and</strong> downlink interface for a s<strong>at</strong>ellite or a terminal (ifonly one uplink <strong>and</strong>/or downlink exists). To add the error model to a different stack (indexed by i), use the following code:$node interface-errormodel $em_ $i17.2.7 Other configur<strong>at</strong>ion optio<strong>ns</strong>Given an initial configur<strong>at</strong>ion of s<strong>at</strong>ellites specified for time 0, it is possible to start the s<strong>at</strong>ellite configur<strong>at</strong>ion from any arbitrarypoint in time through the use of the time_advance_ parameter (this is really only useful for LEO simul<strong>at</strong>io<strong>ns</strong>). Duringthe simul<strong>at</strong>ion run, this will set the position of the object to the position <strong>at</strong> time Scheduler::i<strong>ns</strong>tance().clock +time_advance_ seconds.Position/S<strong>at</strong> set time_advance_ 0; # seconds17.2.8 nam supportnam is not currently supported. Addition of nam for s<strong>at</strong>ellite is open to interested contributors.17.2.9 Integr<strong>at</strong>ion with wired <strong>and</strong> wireless codeRecently (November 2001), support has been added to connect traditional OTcl-based wired nodes with the s<strong>at</strong>ellite nodes.This section describes the capabilities <strong>and</strong> limit<strong>at</strong>io<strong>ns</strong> of th<strong>at</strong> code.<strong>The</strong> s<strong>at</strong>ellite code (<strong>and</strong> the wireless code) normally performs all routing in C++, while the traditional <strong>ns</strong> code uses a mix ofOTcl <strong>and</strong> C++ code. For backward comp<strong>at</strong>ibility reaso<strong>ns</strong>, it is difficult to fully integr<strong>at</strong>e both the wired <strong>and</strong> wireless code.<strong>The</strong> str<strong>at</strong>egy for integr<strong>at</strong>ing wireless <strong>and</strong> wired code has been to define a special g<strong>at</strong>eway node (called a "basest<strong>at</strong>ion"), touse hierarchial routing, <strong>and</strong> to loc<strong>at</strong>e a single basest<strong>at</strong>ion node in the wireless network with a network stack loc<strong>at</strong>ed in boththe wireless <strong>and</strong> the wired subnet. Because routing is not fully integr<strong>at</strong>ed, the topology of the simul<strong>at</strong>ion is limited to onlyone g<strong>at</strong>eway node per wireless subnet (i.e., a packet cannot enter the wireless network from one wired g<strong>at</strong>eway <strong>and</strong> leave viaanother).<strong>The</strong> s<strong>at</strong>ellite/wired code integr<strong>at</strong>ion takes a different str<strong>at</strong>egy. By selecting the node configur<strong>at</strong>ion $<strong>ns</strong> node-config-wiredRouting ON option, the C++ routing in the s<strong>at</strong>ellite code is turned off, <strong>and</strong> i<strong>ns</strong>tead, all s<strong>at</strong>ellite topology changeslead to upcalls into the OTcl code. As a result, the link_ array in OTcl is manipul<strong>at</strong>ed according to all topology changes,<strong>and</strong> OTcl-based routing can occur. <strong>The</strong> penalty for doing this is a much longer execution time for larger simul<strong>at</strong>io<strong>ns</strong> (such asTeledesic), but for smaller simul<strong>at</strong>io<strong>ns</strong>, the difference is not as noticeable.An example script detailing the use of this new option is shown in ~<strong>ns</strong>/tcl/ex/s<strong>at</strong>-wired.tcl, <strong>and</strong> a similar test in the s<strong>at</strong>ellitetest suite exercises this code. Additionally, all of the s<strong>at</strong>ellite example scripts in ~<strong>ns</strong>/tcl/ex directory can be converted to OTclrouting by using the $<strong>ns</strong> node-config -wiredRouting ON option. However, there are a few cave<strong>at</strong>s:• <strong>The</strong> wired routing option for s<strong>at</strong>ellite has only been tested with (the default) st<strong>at</strong>ic routing: $<strong>ns</strong> rtProto St<strong>at</strong>ic.<strong>The</strong> code triggers a global routing table upd<strong>at</strong>e upon any s<strong>at</strong>ellite topology change.• <strong>The</strong> option d<strong>at</strong>a_driven_comput<strong>at</strong>ion_ can not be set to “true” when wiredRouting is ON. Note th<strong>at</strong> the enablingor disabling of d<strong>at</strong>a_driven_comput<strong>at</strong>ion_ can give subtle differences in simul<strong>at</strong>ion output since routes180

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

Saved successfully!

Ooh no, something went wrong!