The method of enabling centralised multicast routing in a simulation is:
set mproto CtrMcast # set multicast protocol; set mrthandle [$ns mrtproto $mproto]The command procedure mrtproto returns a handle to the multicast protocol object. This handle can be used to control the RP and the boot-strap-router (BSR), switch tree-types for a particular group, from shared trees to source specific trees, and recompute multicast routes.
$mrthandle set_c_rp $node0 $node1 # set the RPs; $mrthandle set_c_bsr $node0:0 $node1:1 # set the BSR, specified as list of node:priority; $mrthandle get_c_rp $node0 $group # get the current RP ???; $mrthandle get_c_bsr $node0 # get the current BSR; $mrthandle switch-treetype $group # to source specific or shared tree; $mrthandle compute-mroutes # recompute routes. usually invoked automatically as needed;
Note that whenever network dynamics occur or unicast routing changes, compute-mroutes could be invoked to recompute the multicast routes. The instantaneous re-computation feature of centralised algorithms may result in causality violations during the transient periods.
Tom Henderson 2011-11-05