📄 multicast.tex
字号:
central CtrMcastComp agent to compute and install multicast routes forthe entire topology. Each CtrMcast agent processes membership dynamiccommands, and redirects the CtrMcastComp agent to recompute theappropriate routes.\begin{alist}\proc[]{join-group} & registers the new member with the \code{CtrMCastComp} agent, and invokes that agent to recompute routes for that member. \\\proc[]{leave-group} & is the inverse of \proc[]{join-group}. \\\proc[]{handle-cache-miss} & called when no proper forwarding entry is found for a particular packet source. In case of centralized multicast, it means a new source has started sending data packets. Thus, the CtrMcast agent registers this new source with the \code{CtrMcastComp} agent. If there are any members in that group, compute the new multicast tree. If the group is in RPT (shared tree) mode, then \begin{enumerate} \item create an encapsulation agent at the source; \item a corresponding decapsulation agent is created at the RP; \item the two agents are connected by unicast; and \item the \tup{S,G} entry points its outgoing interface to the encapsulation agent. \end{enumerate}\end{alist}\code{CtrMcastComp} is the centralised multicast route computation agent.\begin{alist}\proc[]{reset-mroutes} & resets all multicast forwarding entries.\\\proc[]{compute-mroutes} & (re)computes all multicast forwarding entries.\\\proc[source, group]{compute-tree} & computes a multicast tree for one source to reach all the receivers in a specific group.\\ \proc[source, group, member]{compute-branch} & is executed when a receiver joins a multicast group. It could also be invoked by \proc[]{compute-tree} when it itself is recomputing the multicast tree, and has to reparent all receivers. The algorithm starts at the receiver, recursively finding successive next hops, until it either reaches the source or RP, or it reaches a node that is already a part of the relevant multicast tree. During the process, several new replicators and an outgoing interface will be installed.\\\proc[source, group, member]{prune-branch} & is similar to \proc[]{compute-branch} except the outgoing interface is disabled; if the outgoing interface list is empty at that node, it will walk up the multicast tree, pruning at each of the intermediate nodes, until it reaches a node that has a non-empty outgoing interface list for the particular multicast tree.\end{alist}\subsubsection{Dense Mode}\begin{alist}\proc[group]{join-group} & sends graft messages upstream if \tup{S,G} does not contain any active outgoing slots (\ie, no downstream receivers). If the next hop towards the source is a LAN, icrements a counter of receivers for a particular group for the LAN\\\proc[group]{leave-group} & decrements LAN counters. \\\proc[srcID group iface]{handle-cache-miss} & depending on the value of \code{CacheMissMode} calls either \code{handle-cache-miss-pimdm} or \code{handle-cache-miss-dvmrp}. \\\proc[srcID group iface]{handle-cache-miss-pimdm} & if the packet was received on the correct iif (from the node that is the next hop towards the source), fan out the packet on all oifs except the oif that leads back to the next--hop--neighbor and oifs that are LANs for which this node is not a forwarder. Otherwise, if the interface was incorrect, send a prune back.\\\proc[srcID group iface]{handle-cache-miss-dvmrp} & fans out the packet only to nodes for which this node is a next hop towards the source (parent).\\\proc[replicator source group iface]{drop} & sends a prune message back to the previous hop.\\\proc[from source group iface]{recv-prune} & 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 propagates the prune message upstream.\\\proc[from source group iface]{recv-graft} & cancels any existing prune timer, andre-enables the pruned interface. If the outgoing interface list was previously empty, it forwards the graft upstream.\\\proc[srcID group iface]{handle-wrong-iif} & This is invoked when the multicast classifier drops a packet because it arrived on the wrong interface, and invoked \proc[]{new-group}. This routine is invoked by \proc[]{mrtObject~instproc~new-group}. When invoked, it sends a prune message back to the source.\\\end{alist}\subsection{The internal variables}\begin{alist}\textbf{Class mrtObject}\hfill & \\\code{protocols\_} & An array of handles of protocol instances active at the node at which this protocol operates indexed by incoming interface. \\\code{mask-wkgroups} & Class variable---defines the mask used to identify well known groups. \\\code{wkgroups} & Class array variable---array of allocated well known groups addresses, indexed by the group name. \code{wkgroups}(Allocd) is a special variable indicating the highest currently allocated well known group. \\[3ex]\textbf{McastProtocol}\hfill & \\\code{status\_} & takes values ``up'' or ``down'', to indicate the status of execution of the protocol instance. \\\code{type\_} & contains the type (class name) of protocol executed by this instance, \eg, DM, or ST. \\\textbf{Simulator}\hfill & \\\code{multiSim\_} & 1 if multicast simulation is enabled, 0 otherwise.\\\code{MrtHandle\_} & handle to the centralised multicast simulation object.\\[3ex]\textbf{Node}\hfill & \\\code{switch\_} & handle for classifier that looks at the high bit of the destination address in each packet to determine whether it is a multicast packet (bit = 1) or a unicast packet (bit = 0).\\\code{multiclassifier\_} & handle to classifier that performs the \tup{s, g, iif} match. \\\code{replicator\_} & array indexed by \tup{s, g} of handles that replicate a multicast packet on to the required links. \\\code{Agents\_} & array indexed by multicast group of the list of agents at the local node that listen to the specific group. \\\code{outLink\_} & Cached list of outgoing interfaces at this node.\\\code{inLink\_} & Cached list of incoming interfaces at this node.\\\textbf{Link} and \textbf{SimpleLink}\hfill & \\\code{iif\_} & handle for the NetworkInterface object placed on this link.\\\code{head\_} & first object on the link, a no-op connector. However, this object contains the instance variable, \code{link\_}, that points to the container Link object.\\\textbf{NetworkInterface}\hfill & \\\code{ifacenum\_} & Class variable---holds the next available interface number.\\\end{alist}\section{Commands at a glance}\label{sec:mcastcommand}Following is a list of commands used for multicast simulations:\begin{flushleft}\code{set ns [new Simulator -mcast on]}\\This turns the multicast flag on for the the given simulation, at the time ofcreation of the simulator object.\code{ns_ multicast}\\This like the command above turns the multicast flag on.\code{ns_ multicast?}\\This returns true if multicast flag has been turned on for the simulationand returns false if multicast is not turned on.\code{$ns_ mrtproto <mproto> <optional:nodelist>}\\This command specifies the type of multicast protocol <mproto> to be usedlike DM, CtrMcast etc. As an additional argument, the list of nodes <nodelist>that will run an instance of detailed routing protocol (other thancentralised mcast) can also be passed.\code{$ns_ mrtproto-iifs <mproto> <node> <iifs>}\\This command allows a finer control than mrtproto. Since multiple mcastprotocols can be run at a node, this command specifies which mcast protocol<mproto> to run at which of the incoming interfaces given by <iifs> in the <node>.\code{Node allocaddr}\\This returns a new/unused multicast address that may be used to assign a multicastaddress to a group.\code{Node expandaddr}\\This command expands the address space from 16 bits to 30 bits. However thiscommand has been replaced by \code{"ns_ set-address-format-expanded"}.\code{$node_ join-group <agent> <grp>}\\This command is used when the <agent> at the node joins a particular group <grp>.\code{$node_ leave-group <agent> <grp>}\\This is used when the <agent> at the nodes decides to leave the group <grp>.Internal methods:\\\code{$ns_ run-mcast}\\This command starts multicast routing at all nodes. \code{$ns_ clear-mcast}\\This stopd mcast routing at all nodes.\code{$node_ enable-mcast <sim>}\\This allows special mcast supporting mechanisms (like a mcast classifier) tobe added to the mcast-enabled node. <sim> is the a handle to the simulatorobject.In addition to the internal methods listed here there are other methods specific toprotocols like centralized mcast (CtrMcast), dense mode (DM), shared treemode (ST) or bi-directional shared tree mode (BST), Node and Link classmethods and NetworkInterface and Multicast classifier methods specific tomulticast routing. All mcast related files may be found under\ns/tcl/mcast directory. \begin{description}\item[Centralised Multicast] A handle to the CtrMcastComp object isreturned when the protocol is specified as `CtrMcast' in mrtproto. Ctrmcast methods are: \\\code{$ctrmcastcomp switch-treetype group-addr}\\Switch from the Rendezvous Point rooted shared tree to source-specifictrees for the group specified by group-addr. Note that this method cannotbe used to switch from source-specific trees back to a shared tree for amulticast group. \code{$ctrmcastcomp set_c_rp <node-list>}\\This sets the RPs.\code{$ctrmcastcomp set_c_bsr <node0:0> <node1:1>}\\This sets the BSR, specified as list of node:priority.\code{$ctrmcastcomp get_c_rp <node> <group>}\\Returns the RP for the group as seen by the node node for the multicastgroup with address group-addr. Note that different nodes may see differentRPs for the group if the network is partitioned as the nodes might be indifferent partitions. \code{$ctrmcastcomp get_c_bsr <node>}\\Returns the current BSR for the group.\code{$ctrmcastcomp compute-mroutes}\\This recomputes multicast routes in the event of network dynamics or achange in unicast routes.\item[Dense Mode]The dense mode (DM) protocol can be run as PIM-DM (default) or DVMRPdepending on the class variable \code{CacheMissMode}. There are no methodsspecific to this mcast protocol object. Class variables are: \begin{description} \item[PruneTimeout] Timeout value for prune state at nodes. defaults to0.5sec. \item[CacheMissMode] Used to set PIM-DM or DVMRP type forwarding rules. \end{description}\item[Shared Tree]There are no methods for this class. Variables are:\begin{description}\item[RP\_] RP\_ indexed by group determines which node is the RP for aparticular group.\end{description}\item[Bidirectional Shared Tree]There are no methods for this class. Variable is same as that of SharedTree described above.\end{description}\end{flushleft}\endinput
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -