The basic configuration consists of creating and configuring a multicast session. Each Session (, a multicast tree) must be configured strictly in this order: (1) create and configure the session source, (2) create the session helper and attach it to the session source, and finally, (3) have the session members join the session.
set ns [new SessionSim] # preamble initialization; set node [$ns node] set group [$ns allocaddr] set udp [new Agent/UDP] # create and configure the source; $udp set dst_ $group set src [new Application/Traffic/CBR] $src attach-agent $udp $ns attach-agent $node $udp $ns create-session $node $udp # create attach session helper to src; set rcvr [new Agent/NULL] # configure the receiver; $ns attach-agent $node $rcvr $ns at 0.0 "$node join-group $rcvr $group" # joining the session; $ns at 0.1 "$src start"A session level simulation scales by translating the topology into a virtual mesh topology. The steps involved in doing this are:
Tom Henderson 2014-12-17