[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] DM multicast tree is not pruned with LAN
hi,
I'm going to simulate the multicast rate control.
I used LAN in my topology, then a trouble happened.
Normaly, multicast tree is pruned when no receiver exist in down stream.
Although, it not work in the topology containing LAN on its leaf.
I set multicast configulation like below:
DM set PruneTimeout 30
set mproto DM
set mrthandle [$ns mrtproto $mproto {}]
Ns manual says DM implementation works on point-to-point links
as well as LANs and adapts to the network dynamics.
I will show simple script for test.
the prune mechanism do not work in this scenario.
Why?
thank,
set ns [new Simulator -multicast on]
$ns multicast
$ns namtrace-all [open out.nam w]
# prune/graft packets
$ns color 0 blue
$ns color 1 red
$ns color 30 purple
$ns color 31 bisque
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
$ns duplex-link $n0 $n1 1Mbps 10ms DropTail
$ns duplex-link-op $n0 $n1 queuePos 0.5
$ns duplex-link $n1 $n2 1Mbps 10ms DropTail
$ns duplex-link-op $n1 $n2 queuePos 0.5
# with LAN, multicast tree is not pruned
$ns make-lan "$n2 $n3" 1Mbps 10ms LL Queue/DropTail Mac/802_3
# with Link, multicast tree is pruned
#$ns duplex-link $n2 $n3 1Mbps 10ms DropTail
#$ns duplex-link-op $n2 $n3 queuePos 0.5
DM set PruneTimeout 30
set mproto DM
set mrthandle [$ns mrtproto $mproto {}]
set group0 [Node allocaddr]
set udp0 [new Agent/UDP]
$ns attach-agent $n0 $udp0
$udp0 set dst_addr_ $group0
$udp0 set dst_port_ 0
$udp0 set class_ 0
set cbr0 [new Application/Traffic/CBR]
$cbr0 attach-agent $udp0
set rcvr [new Agent/LossMonitor]
$ns attach-agent $n3 $rcvr
$ns at 0.5 "$n3 join-group $rcvr $group0"
$ns at 0.6 "$n3 leave-group $rcvr $group0"
$ns at 0.1 "$cbr0 start"
$ns at 1.0 "finish"
proc finish {} {
global ns
$ns flush-trace
puts "running nam..."
exec nam out.nam &
exit 0
}
$ns run
--
Toshikazu Ichikawa <[email protected]>