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

will try to classify packet (lookup MFC) for the second time. If the return value is “0”, no further lookups will be done, andthe packet will be thus dropped.add-rep{} creates a slot in the classifier and adds a replicator for 〈source, group, iif〉 to that slot.Class Replicator When a replicator receives a packet, it copies the packet to all of its slots. Each slot points to an outgoinginterface for a particular 〈source, group〉.If no slot is found, the C++ replicator invokes the class instance procedure drop{} to trigger protocol specific actions. Wewill describe the protocol specific actions in the next section, when we describe the internal procedures of each of the multicastrouting protocols.There are instance procedures to control the elements in each slot:insert{oif}disable{oif}enable{oif}is-active{}exists{oif}change-iface{source, group, oldiif, newiif}inserting a new outgoing interface to the next available slot.disable the slot pointing to the specified oif.enable the slot pointing to the specified oif.returns true if the replicator has at least one active slot.returns true if the slot pointing to the specified oif is active.modified the iif entry for the particular replicator.30.2.3 Protocol InternalsWe now describe the implementation of the different multicast routing protocol agents.Centralized MulticastCtrMcast is inherits from McastProtocol. One CtrMcast agent needs to be created for each node. There is a centralCtrMcastComp agent to compute and install multicast routes for the entire topology. Each CtrMcast agent processesmembership dynamic commands, and redirects the CtrMcastComp agent to recompute the appropriate routes.join-group{}leave-group{}handle-cache-miss{}registers the new member with the CtrMCastComp agent, and invokes that agent to recomputeroutes for that member.is the inverse of join-group{}.called when no proper forwarding entry is found for a particular packet source. In case ofcentralized multicast, it means a new source has started sending data packets. Thus, theCtrMcast agent registers this new source with the CtrMcastComp agent. If there are anymembers in that group, compute the new multicast tree. If the group is in RPT (shared tree)mode, then1. create an encapsulation agent at the source;2. a corresponding decapsulation agent is created at the RP;3. the two agents are connected by unicast; and4. the 〈S,G〉 entry points its outgoing interface to the encapsulation agent.269

CtrMcastComp is the centralised multicast route computation agent.reset-mroutes{}compute-mroutes{}compute-tree{source, group}compute-branch{source, group, member}prune-branch{source, group, member}resets all multicast forwarding entries.(re)computes all multicast forwarding entries.computes a multicast tree for one source to reach all the receivers in aspecific group.is executed when a receiver joins a multicast group. It could also beinvoked by compute-tree{} when it itself is recomputing the multicasttree, and has to reparent all receivers. The algorithm starts at thereceiver, recursively finding successive next hops, until it either reachesthe source or RP, or it reaches a node that is already a part of the relevantmulticast tree. During the process, several new replicators and anoutgoing interface will be installed.is similar to compute-branch{} except the outgoing interface is disabled;if the outgoing interface list is empty at that node, it will walkup the multicast tree, pruning at each of the intermediate nodes, until itreaches a node that has a non-empty outgoing interface list for the particularmulticast tree.Dense Modejoin-group{group} sends graft messages upstream if 〈S,G〉 does not contain any activeoutgoing slots (i.e., no downstream receivers). If the nexthop towards the source is a LAN, icrements a counter of receiversfor a particular group for the LANleave-group{group} decrements LAN counters.handle-cache-miss{srcID group iface} depending on the value of CacheMissModecalls either handle-cache-miss-pimdm orhandle-cache-miss-dvmrp.handle-cache-miss-pimdm{srcID group iface} if the packet was received on the correct iif (from the node thatis the next hop towards the source), fan out the packet on all oifsexcept the oif that leads back to the next–hop–neighbor and oifsthat are LANs for which this node is not a forwarder. Otherwise,if the interface was incorrect, send a prune back.handle-cache-miss-dvmrp{srcID group iface} fans out the packet only to nodes for which this node is a nexthop towards the source (parent).drop{replicator source group iface} sends a prune message back to the previous hop.recv-prune{from source group iface} resets the prune timer if the interface had been pruned previously;otherwise, it starts the prune timer and disables the interface; furthermore,if the outgoing interface list becomes empty, it propagatesthe prune message upstream.recv-graft{from source group iface} cancels any existing prune timer, andre-enables the pruned interface.If the outgoing interface list was previously empty, itforwards the graft upstream.handle-wrong-iif{srcID group iface} This is invoked when the multicast classifier drops apacket because it arrived on the wrong interface, andinvoked new-group{}. This routine is invoked bymrtObject instproc new-group{}. When invoked, itsends a prune message back to the source.270

will try to classify packet (lookup MFC) for the second time. If the return value is “0”, no further lookups will be done, <strong>and</strong>the packet will be thus dropped.add-rep{} cre<strong>at</strong>es a slot in the classifier <strong>and</strong> adds a replic<strong>at</strong>or for 〈source, group, iif〉 to th<strong>at</strong> slot.Class Replic<strong>at</strong>or When a replic<strong>at</strong>or receives a packet, it copies the packet to all of its slots. Each slot points to an outgoinginterface for a particular 〈source, group〉.If no slot is found, the C++ replic<strong>at</strong>or invokes the class i<strong>ns</strong>tance procedure drop{} to trigger protocol specific actio<strong>ns</strong>. Wewill describe the protocol specific actio<strong>ns</strong> in the next section, when we describe the internal procedures of each of the multicastrouting protocols.<strong>The</strong>re are i<strong>ns</strong>tance procedures to control the elements in each slot:i<strong>ns</strong>ert{oif}disable{oif}enable{oif}is-active{}exists{oif}change-iface{source, group, oldiif, newiif}i<strong>ns</strong>erting a new outgoing interface to the next available slot.disable the slot pointing to the specified oif.enable the slot pointing to the specified oif.retur<strong>ns</strong> true if the replic<strong>at</strong>or has <strong>at</strong> least one active slot.retur<strong>ns</strong> true if the slot pointing to the specified oif is active.modified the iif entry for the particular replic<strong>at</strong>or.30.2.3 Protocol InternalsWe now describe the implement<strong>at</strong>ion of the different multicast routing protocol agents.Centralized MulticastCtrMcast is inherits from McastProtocol. One CtrMcast agent needs to be cre<strong>at</strong>ed for each node. <strong>The</strong>re is a centralCtrMcastComp agent to compute <strong>and</strong> i<strong>ns</strong>tall multicast routes for the entire topology. Each CtrMcast agent processesmembership dynamic comm<strong>and</strong>s, <strong>and</strong> redirects the CtrMcastComp agent to recompute the appropri<strong>at</strong>e routes.join-group{}leave-group{}h<strong>and</strong>le-cache-miss{}registers the new member with the CtrMCastComp agent, <strong>and</strong> invokes th<strong>at</strong> agent to recomputeroutes for th<strong>at</strong> member.is the inverse of join-group{}.called when no proper forwarding entry is found for a particular packet source. In case ofcentralized multicast, it mea<strong>ns</strong> a new source has started sending d<strong>at</strong>a packets. Thus, theCtrMcast agent registers this new source with the CtrMcastComp agent. If there are anymembers in th<strong>at</strong> group, compute the new multicast tree. If the group is in RPT (shared tree)mode, then1. cre<strong>at</strong>e an encapsul<strong>at</strong>ion agent <strong>at</strong> the source;2. a corresponding decapsul<strong>at</strong>ion agent is cre<strong>at</strong>ed <strong>at</strong> the RP;3. the two agents are connected by unicast; <strong>and</strong>4. the 〈S,G〉 entry points its outgoing interface to the encapsul<strong>at</strong>ion agent.269

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

Saved successfully!

Ooh no, something went wrong!