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 ...
mrtObject class There is one mrtObject (aka Arbiter) object per multicast capable node. This object supports the abilityfor a node to run multiple multicast routing protocols by maintaining an array of multicast protocols indexed by the incominginterface. Thus, if there are several multicast protocols at a node, each interface is owned by just one protocol. Therefore,this object supports the ability for a node to run multiple multicast routing protocols. The node uses the arbiter to performprotocol actions, either to a specific protocol instance active at that node, or to all protocol instances at that node.addproto{instance, [iiflist]}getType{protocol}all-mprotos{op, args}start{}stop{}notify{dummy}dump-mroutes{file-handle, [grp], [src]}join-group{G, S}leave-group{G, S}upcall{code, s, g, iif}drop{rep, s, g, iif}adds the handle for a protocol instance to its array of protocols. The secondoptional argument is the incoming interface list controlled by the protocol.If this argument is an empty list or not specified, the protocol is assumed torun on all interfaces (just one protocol).returns the handle to the protocol instance active at that node that matchesthe specified type (first and only argument). This function is often used tolocate a protocol’s peer at another node. An empty string is returned if theprotocol of the given type could not be found.internal routine to execute “op” with “args” on all protocol instances activeat that node.start/stop execution of all protocols.is called when a topology change occurs. The dummy argument is currentlynot used.dump multicast routes to specified file-handle.signals all protocol instances to join 〈S, G〉.signals all protocol instances to leave 〈S, G〉.signalled by node on forwarding errors in classifier; this routine in turnsignals the protocol instance that owns the incoming interface (iif) byinvoking the appropriate handle function for that particular code.Called on packet drop, possibly to prune an interface.In addition, the mrtObject class supports the concept of well known groups, i.e., those groups that do not require explicitprotocol support. Two well known groups, ALL_ROUTERS and ALL_PIM_ROUTERS are predefined in ns.The class mrtObject defines two class procedures to set and get information about these well known groups.registerWellKnownGroups{name}getWellKnownGroup{name}assigns name a well known group address.returns the address allocated to well known group, name. If name is not registeredas a well known group, then it returns the address for ALL_ROUTERS.McastProtocol classfunctions:start{}, stop{}getStatus{}getType{}upcall{code args}This is the base class for the implementation of all the multicast protocols. It contains basic multicastSet the status_ of execution of this protocol instance.return the status of execution of this protocol instance.return the type of protocol executed by this instance.invoked when the node classifier signals an error, either due to a cache-miss or a wrong-iif forincoming packet. This routine invokes the protocol specific handle, handle-〈code〉{} withspecified args to handle the signal.A few words about interfaces. Multicast implementation in ns assumes duplex links i.e. if there is a simplex link from node 1to node 2, there must be a reverse simplex link from node 2 to node 1. To be able to tell from which link a packet was received,multicast simulator configures links with an interface labeller at the end of each link, which labels packets with a particular265
and unique label (id). Thus, “incoming interface” is referred to this label and is a number greater or equal to zero. Incominginterface value can be negative (-1) for a special case when the packet was sent by a local to the given node agent.In contrast, an “outgoing interface” refers to an object handler, usually a head of a link which can be installed at a replicator.This destinction is important: incoming interface is a numeric label to a packet, while outgoing interface is a handler to anobject that is able to receive packets, e.g. head of a link.30.2.2 Extensions to other classes in nsIn the earlier chapter describing nodes in ns (Chapter 5), we described the internal structure of the node in ns. To briefly recapthat description, the node entry for a multicast node is the switch_. It looks at the highest bit to decide if the destination isa multicast or unicast packet. Multicast packets are forwarded to a multicast classifier which maintains a list of replicators;there is one replicator per 〈source, group〉 tuple. Replicators copy the incoming packet and forward to all outgoing interfaces.Class Node Node support for multicast is realized in two primary ways: it serves as a focal point for access to the multicastprotocols, in the areas of address allocation, control and management, and group membership dynamics; and secondly, itprovides primitives to access and control interfaces on links incident on that node.266
- Page 215 and 216: Part IIISupport214
- Page 217 and 218: endenddocument pargvcPrint out argc
- Page 219 and 220: 24.4.2 Memory Conservation TipsSome
- 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: Dense Mode The Dense Mode protocol
- Page 269 and 270: add-iif{ifid link},add-oif{link if}
- Page 271 and 272: CtrMcastComp is the centralised mul
- Page 273 and 274: $ns_ mrtproto This command specifi
- 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
<strong>and</strong> unique label (id). Thus, “incoming interface” is referred to this label <strong>and</strong> is a number gre<strong>at</strong>er or equal to zero. Incominginterface value can be neg<strong>at</strong>ive (-1) for a special case when the packet was sent by a local to the given node agent.In contrast, an “outgoing interface” refers to an object h<strong>and</strong>ler, usually a head of a link which can be i<strong>ns</strong>talled <strong>at</strong> a replic<strong>at</strong>or.This destinction is important: incoming interface is a numeric label to a packet, while outgoing interface is a h<strong>and</strong>ler to anobject th<strong>at</strong> is able to receive packets, e.g. head of a link.30.2.2 Exte<strong>ns</strong>io<strong>ns</strong> to other classes in <strong>ns</strong>In the earlier chapter describing nodes in <strong>ns</strong> (Chapter 5), we described the internal structure of the node in <strong>ns</strong>. To briefly recapth<strong>at</strong> description, the node entry for a multicast node is the switch_. It looks <strong>at</strong> the highest bit to decide if the destin<strong>at</strong>ion isa multicast or unicast packet. Multicast packets are forwarded to a multicast classifier which maintai<strong>ns</strong> a list of replic<strong>at</strong>ors;there is one replic<strong>at</strong>or per 〈source, group〉 tuple. Replic<strong>at</strong>ors copy the incoming packet <strong>and</strong> forward to all outgoing interfaces.Class Node Node support for multicast is realized in two primary ways: it serves as a focal point for access to the multicastprotocols, in the areas of address alloc<strong>at</strong>ion, control <strong>and</strong> management, <strong>and</strong> group membership dynamics; <strong>and</strong> secondly, itprovides primitives to access <strong>and</strong> control interfaces on links incident on th<strong>at</strong> node.266