Following is a list of commands used for multicast simulations:
ns_ multicast
This 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.
$ns_ mrtproto mproto optional:nodelist
This command specifies the type of multicast protocol <mproto> to be used
like DM, CtrMcast etc. As an additional argument, the list of nodes <nodelist>
that will run an instance of detailed routing protocol (other than
centralised mcast) can also be passed.
$ns_ mrtproto-iifs mproto node iifs
This command allows a finer control than mrtproto. Since multiple mcast
protocols 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>.
Node allocaddr
This returns a new/unused multicast address that may be used to assign a multicast
address to a group.
Node expandaddr
This command expands the address space from 16 bits to 30 bits. However this
command has been replaced by "ns_ set-address-format-expanded".
$node_ join-group agent grp
This command is used when the <agent> at the node joins a particular group <grp>.
$node_ leave-group agent grp
This is used when the <agent> at the nodes decides to leave the group <grp>.
Internal methods:
$ns_ run-mcast
This command starts multicast routing at all nodes.
$ns_ clear-mcast
This stopd mcast routing at all nodes.
$node_ enable-mcast sim
This allows special mcast supporting mechanisms (like a mcast classifier) to
be added to the mcast-enabled node. <sim> is the 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 and NetworkInterface and Multicast classifier methods specific to multicast routing. All mcast related files may be found under /tcl/mcast directory.
$ctrmcastcomp switch-treetype group-addr
Switch 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 node-list
This sets the RPs.
$ctrmcastcomp set_c_bsr node0:0 node1:1
This sets the BSR, specified as list of node:priority.
$ctrmcastcomp get_c_rp node group
Returns the RP for the group as seen by the node node for the multicast
group with address group-addr. Note that different nodes may see different
RPs for the group if the network is partitioned as the nodes might be in
different partitions.
$ctrmcastcomp get_c_bsr node
Returns the current BSR for the group.
$ctrmcastcomp compute-mroutes
This recomputes multicast routes in the event of network dynamics or a
change in unicast routes.