Exercise
Create a network which looks like the following:
4
|
|
0-------------1----------2---------5
|
|
3
Choose CtrMcast as the multicast routing protocol for the
experiment. Node 5 will be your RP. Node 0 is a UDP source for
this group. The source will start transmission at time 0.05.
Nodes 3 and 4 will join the multicast group at times 0.10 and
0.12, respectively. Node 3 will leave the multicast group at 0.5,
and the execution will terminate at 0.6
proc finish {} {
global ns nf nam_file
$ns flush-trace
close $nf
exec nam $nam_file &
exit 0
}; # finish
set ns [new Simulator]
set nam_file lab-ex-2.nam
set nf [open $nam_file w]
$ns namtrace-all $nf
# Create the topology
# First the nodes
....
# Make the links
# Use the following to make the orientation right.
$ns duplex-link-op $n(0) $n(1) orient right
$ns duplex-link-op $n(1) $n(2) orient right
$ns duplex-link-op $n(2) $n(3) orient right
$ns duplex-link-op $n(1) $n(3) orient down
$ns duplex-link-op $n(1) $n(4) orient up
# Create the multicast group. Use the following line
$src set dst_addr_ $group
# Choose the routing protocol and your RP. Compute the
# multicast tree
...
# Create the UDP agent and tie it to the multicast group
...
# Set the timing and run the script.
...
$ns run
Nader Salehi
Last modified: Thu Jun 22 23:13:26 PDT 2000