38.3.1 Instantiation of a PLM Source

To create a PLM source, place it at node n, and start it at t$_0$, we call the PLMTopology instproc place_source n t$_0$. This instproc return addr, the address required to attach a receiver to this source. place_source calls the Simulator instproc PLMbuild_source_set that creates as many Application/Traffic/CBR_PP instances as there are layers (in the following we call an instance of the class Application/Traffic/CBR_PP a layer). Each layer corresponds to a different multicast group.

To speed up the simulations when the PLM sources start we use the following trick: At $t=0$, PLMbuild_source_set restricts each layer to send only one packet (maxpkts_ set to 1). That allows to build the multicast trees - one multicast tree per layer - without flooding the whole network. Indeed, each layer only sends one packet to build the corresponding multicast tree.

The multicast trees take at most the maximum RTT of the network to be established and must be established before t$_0$, the PLM source starting time. Therefore, t$_0$ must be carrefully chosen, otherwise the source sends a large number of useless packets. However, as we just need to start the PLM source after the multicast trees are estabished, t$_0$ can be largely overestimated. At time t$_0$, we set maxpkts_ to 268435456 for all the layers.

It is fundamental, in order to have persistent multicast trees, that the prune timeout is set to a large value. For instance, with DM routing:

  DM set PruneTimeout 1000

Each layer of a same PLM source has the same flow id fid_. Consequently, each PLM source is considered as a single flow for a Fair Queueing scheduler. The PLM code manages automatically the fid_ to prevent different sources to have the same fid_. The fid_ starts at 1 for the first source and is increased by one for each new source. Be careful to avoid other flows (for instance concurrent TCP flows) to have the same fid_ than the PLM sources. Additionally, If you consider fid_ larger than 32, do not forget to increase the MAXFLOW in ~ns/fq.cc (MAXFLOW must be set to the highest fid_ considered in the simulation).

Tom Henderson 2011-11-05