Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

manet

set ns [new Simulator {\bfseries{}-multicast on}] # enable multicast routing;
set group [{\bfseries{}Node allocaddr}] # allocate a multicast address;
set node0 [$ns node] # create multicast capable nodes;
set node1 [$ns node] $ns duplex-link $node0 $node1 1.5Mb 10ms DropTail
set mproto DM # configure multicast protocol;
set mrthandle [{\bfseries{}$ns mrtproto $mproto}] # all nodes will contain multicast protocol agents;
set udp [new Agent/UDP] # create a source agent at node 0;
$ns attach-agent $node0 $udp
set src [new Application/Traffic/CBR] $src attach-agent $udp
{\bfseries{}$udp set dst_addr_ $group}
{\bfseries{}$udp set dst_port_ 0}
set rcvr [new Agent/LossMonitor] # create a receiver agent at node 1;
$ns attach-agent $node1 $rcvr
$ns at 0.3 “{\bfseries{}$node1 join-group $rcvr $group}” # join the group at simulation time 0.3 (sec);

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.