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 ...
30.2.4 The internal variablesClass mrtObjectprotocols_mask-wkgroupswkgroupsAn array of handles of protocol instances active at the node at which this protocol operatesindexed by incoming interface.Class variable—defines the mask used to identify well known groups.Class array variable—array of allocated well known groups addresses, indexed by the groupname. wkgroups(Allocd) is a special variable indicating the highest currently allocated wellknown group.McastProtocolstatus_type_SimulatormultiSim_MrtHandle_takes values “up” or “down”, to indicate the status of execution of the protocol instance.contains the type (class name) of protocol executed by this instance, e.g., DM, or ST.1 if multicast simulation is enabled, 0 otherwise.handle to the centralised multicast simulation object.Nodeswitch_multiclassifier_replicator_Agents_outLink_inLink_Link and SimpleLinkiif_head_NetworkInterfaceifacenum_handle for classifier that looks at the high bit of the destination address in each packet to determinewhether it is a multicast packet (bit = 1) or a unicast packet (bit = 0).handle to classifier that performs the 〈s, g, iif〉 match.array indexed by 〈s, g〉 of handles that replicate a multicast packet on to the required links.array indexed by multicast group of the list of agents at the local node that listen to the specificgroup.Cached list of outgoing interfaces at this node.Cached list of incoming interfaces at this node.handle for the NetworkInterface object placed on this link.first object on the link, a no-op connector. However, this object contains the instance variable,link_, that points to the container Link object.Class variable—holds the next available interface number.30.3 Commands at a glanceFollowing is a list of commands used for multicast simulations:set ns [new Simulator -mcast on]This turns the multicast flag on for the the given simulation, at the time of creation of the simulator object.ns_ multicastThis like the command above turns the multicast flag on.ns_ multicast?This returns true if multicast flag has been turned on for the simulation and returns false if multicast is not turned on.271
$ns_ mrtproto This command specifies the type of multicast protocol to be used like DM, CtrMcast etc. As an additionalargument, the list of nodes that will run an instance of detailed routing protocol (other than centralised mcast) canalso be passed.$ns_ mrtproto-iifs This command allows a finer control than mrtproto. Since multiple mcast protocols can be run at a node, this commandspecifies which mcast protocol to run at which of the incoming interfaces given by in the .Node allocaddrThis returns a new/unused multicast address that may be used to assign a multicast address to a group.Node expandaddrTHIS COMMAND IS OBSOLETE NOW This command expands the address space from 16 bits to 30 bits. However thiscommand has been replaced by "ns_ set-address-format-expanded".$node_ join-group This command is used when the at the node joins a particular group .$node_ leave-group This is used when the at the nodes decides to leave the group .Internal methods:$ns_ run-mcastThis command starts multicast routing at all nodes.$ns_ clear-mcastThis stopd mcast routing at all nodes.$node_ enable-mcast This allows special mcast supporting mechanisms (like a mcast classifier) to be added to the mcast-enabled node. isthe a handle to the simulator object.In addition to the internal methods listed here there are other methods specific to protocols like centralized mcast (CtrMcast),dense mode (DM), shared tree mode (ST) or bi-directional shared tree mode (BST), Node and Link class methods andNetworkInterface and Multicast classifier methods specific to multicast routing. All mcast related files may be found underns/tcl/mcast directory.Centralised Multicast A handle to the CtrMcastComp object is returned when the protocol is specified as ‘CtrMcast’ inmrtproto. Ctrmcast methods are:$ctrmcastcomp switch-treetype group-addrSwitch from the Rendezvous Point rooted shared tree to source-specific trees for the group specified by group-addr.Note that this method cannot be used to switch from source-specific trees back to a shared tree for a multicast group.$ctrmcastcomp set_c_rp This sets the RPs.$ctrmcastcomp set_c_bsr This sets the BSR, specified as list of node:priority.$ctrmcastcomp get_c_rp Returns the RP for the group as seen by the node node for the multicast group with address group-addr. Note thatdifferent nodes may see different RPs for the group if the network is partitioned as the nodes might be in differentpartitions.$ctrmcastcomp get_c_bsr 272
- Page 221 and 222: Chapter 25Mathematical SupportThe s
- Page 223 and 224: set run [lindex $argv 0]}if {$run <
- Page 225 and 226: }$sizeRNG next-substream# print the
- Page 227 and 228: protected:RNG* rng_;};Classes deriv
- Page 229 and 230: ns-random is implemented in ~ns/mis
- Page 231 and 232: Chapter 26Trace and Monitoring Supp
- Page 233 and 234: The monitor-queue function is const
- Page 235 and 236: also used to accumulate packet drop
- Page 237 and 238: }name,th->size(),flags,iph->flowid(
- Page 239 and 240: PT_TORA,PT_DSR,PT_AODV,// insert ne
- Page 241 and 242: The QueueMonitor class is not deriv
- Page 243 and 244: $ns_ trace-all This is the command
- Page 245 and 246: Chapter 27Test Suite SupportThe ns
- Page 247 and 248: ... ...}$ns_ at $opt(stop).1 "$self
- Page 249 and 250: Example: To enable debugging in Que
- Page 251 and 252: Chapter 29Unicast RoutingThis secti
- Page 253 and 254: Asymmetric Routing Asymmetric routi
- Page 255 and 256: class RouteLogic This class defines
- Page 257 and 258: — The procedure init-all{} is a g
- Page 259 and 260: Global Actions Once the detailed ac
- Page 261 and 262: This dumps next hop information in
- Page 263 and 264: $ns mrtproto ST;# specify shared tr
- Page 265 and 266: Dense Mode The Dense Mode protocol
- Page 267 and 268: and unique label (id). Thus, “inc
- Page 269 and 270: add-iif{ifid link},add-oif{link if}
- Page 271: CtrMcastComp is the centralised mul
- Page 275 and 276: Chapter 31Network DynamicsThis chap
- Page 277 and 278: v 0.8123 link-up 3 5v 0.8123 link-u
- Page 279 and 280: The first argument is the time at w
- Page 281 and 282: $ns_ rtmodel This command defines
- Page 283 and 284: $ns set-address-format hierarchical
- Page 285 and 286: 32.4 Hierarchical Routing with Sess
- Page 287 and 288: Chapter 33UDP Agents33.1 UDP Agents
- Page 289 and 290: Chapter 34TCP AgentsThis section de
- Page 291 and 292: set ns [new Simulator]set node1 [$n
- Page 293 and 294: 34.2.1 The Base TCP SinkThe base TC
- Page 295 and 296: Agent/TCP/FullTcp set dupseg_fix_ t
- Page 297 and 298: 34.5 Tracing TCP DynamicsThe behavi
- Page 299 and 300: Chapter 35SCTP AgentsThis chapter d
- Page 301 and 302: Figure 35.1: Example of a Multihome
- Page 303 and 304: Note: the actual value of these tra
- Page 305 and 306: 1.526624 1 4 sctp 1500 -------D 0 1
- Page 307 and 308: $ns at 5.0 "finish"$ns run35.5.2 Mu
- Page 309 and 310: Chapter 36Agent/SRMThis chapter des
- Page 311 and 312: 36.1.2 Other Configuration Paramete
- Page 313 and 314: 3.6274 n 0 m r 1 type repair servi
- Page 315 and 316: 3.6029 n 3 m r 2 Q NTIMER at 3.730
- Page 317 and 318: 36.4 Loss Detection—The Class SRM
- Page 319 and 320: same packet. The repair objet does
- Page 321 and 322: }hdr_asrm* seh = (hdr_asrm*) p->acc
$<strong>ns</strong>_ mrtproto This comm<strong>and</strong> specifies the type of multicast protocol to be used like DM, CtrMcast etc. As an additionalargument, the list of nodes th<strong>at</strong> will run an i<strong>ns</strong>tance of detailed routing protocol (other than centralised mcast) canalso be passed.$<strong>ns</strong>_ mrtproto-iifs This comm<strong>and</strong> allows a finer control than mrtproto. Since multiple mcast protocols can be run <strong>at</strong> a node, this comm<strong>and</strong>specifies which mcast protocol to run <strong>at</strong> which of the incoming interfaces given by in the .Node allocaddrThis retur<strong>ns</strong> a new/unused multicast address th<strong>at</strong> may be used to assign a multicast address to a group.Node exp<strong>and</strong>addrTHIS COMMAND IS OBSOLETE NOW This comm<strong>and</strong> exp<strong>and</strong>s the address space from 16 bits to 30 bits. However thiscomm<strong>and</strong> has been replaced by "<strong>ns</strong>_ set-address-form<strong>at</strong>-exp<strong>and</strong>ed".$node_ join-group This comm<strong>and</strong> is used when the <strong>at</strong> the node joi<strong>ns</strong> a particular group .$node_ leave-group This is used when the <strong>at</strong> the nodes decides to leave the group .Internal methods:$<strong>ns</strong>_ run-mcastThis comm<strong>and</strong> starts multicast routing <strong>at</strong> all nodes.$<strong>ns</strong>_ clear-mcastThis stopd mcast routing <strong>at</strong> all nodes.$node_ enable-mcast This allows special mcast supporting mechanisms (like a mcast classifier) to be added to the mcast-enabled node. isthe a h<strong>and</strong>le to the simul<strong>at</strong>or object.In addition to the internal methods listed here there are other methods specific to protocols like centralized mcast (CtrMcast),de<strong>ns</strong>e mode (DM), shared tree mode (ST) or bi-directional shared tree mode (BST), Node <strong>and</strong> Link class methods <strong>and</strong>NetworkInterface <strong>and</strong> Multicast classifier methods specific to multicast routing. All mcast rel<strong>at</strong>ed files may be found under<strong>ns</strong>/tcl/mcast directory.Centralised Multicast A h<strong>and</strong>le to the CtrMcastComp object is returned when the protocol is specified as ‘CtrMcast’ inmrtproto. Ctrmcast methods are:$ctrmcastcomp switch-treetype group-addrSwitch from the Rendezvous Point rooted shared tree to source-specific trees for the group specified by group-addr.Note th<strong>at</strong> this method cannot be used to switch from source-specific trees back to a shared tree for a multicast group.$ctrmcastcomp set_c_rp This sets the RPs.$ctrmcastcomp set_c_bsr This sets the BSR, specified as list of node:priority.$ctrmcastcomp get_c_rp Retur<strong>ns</strong> the RP for the group as seen by the node node for the multicast group with address group-addr. Note th<strong>at</strong>different nodes may see different RPs for the group if the network is partitioned as the nodes might be in differentpartitio<strong>ns</strong>.$ctrmcastcomp get_c_bsr 272