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 t0, the PLM source starting time. Therefore, t0 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, t0 can be largely overestimated. At time t0, 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 fq.cc (MAXFLOW must be set to the highest fid_ considered in the simulation).