[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
HELP !!! RP node failure ...( ctrmcast )
Hi all
Suppose if I configured node1 & node2 as candidate-RPs
for a group, say 0x8000 ( using CtrMcast model )
( in this case node2 would be the RP for this group )
If at some time t, there is a node failure for node2,
will CtrMcast automatically choose node1 as RP and
resume the multicast data forwarding ???
( I tried this scenario, but node2 wasn't choosen as RP
and all the data was lost - is this expected behaviour ? )
I have attached the code.
Also I get errors when i call the method manually
( _o162 unable to dispatch method "compute-mroutes" )
NOTE: compute-mroutes works in simple scenarios and there
is no problem with installation.
----------------------------------------------
Any help is greatly appreciated !!!
I am stuck with this problem for few days !!
----------------------------------------------
- vijayan
set ns [new Simulator -multicast on]
#Simulator set EnableMcast_ 1
#Simulator set NumberInterfaces_ 1
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
set f [open out-cmcast.tr w]
$ns trace-all $f
set nf [open out-cmcast.nam w]
$ns namtrace-all $nf
$ns color 2 black
$ns color 1 blue
$ns color 0 yellow
$ns color 30 purple
$ns color 31 green
$ns duplex-link $n0 $n1 1.5Mb 10ms DropTail
$ns duplex-link $n1 $n2 1.5Mb 10ms DropTail
$ns duplex-link $n1 $n3 1.5Mb 10ms DropTail
$ns duplex-link-op $n0 $n1 orient right
$ns duplex-link-op $n1 $n2 orient right-up
$ns duplex-link-op $n1 $n3 orient right-down
$ns duplex-link-op $n0 $n1 queuePos 0.5
$ns duplex-link-op $n1 $n0 queuePos 0.5
$ns duplex-link-op $n3 $n1 queuePos 0.5
## added new links ############
$ns duplex-link $n0 $n2 1.5Mb 10ms DropTail
$ns duplex-link $n3 $n2 1.5Mb 10ms DropTail
$ns duplex-link $n0 $n3 1.5Mb 10ms DropTail
$ns duplex-link-op $n0 $n2 orient right-up
$ns duplex-link-op $n2 $n3 orient down
$ns duplex-link-op $n0 $n3 orient right-down
#$ns duplex-link-op $n0 $n2 queuePos 0.5
#$ns duplex-link-op $n2 $n3 queuePos 0.5
#$ns duplex-link-op $n3 $n0 queuePos 0.5
################################
set mproto CtrMcast
set mrthandle [$ns mrtproto $mproto {}]
if {$mrthandle != ""} {
$mrthandle set_c_rp $n2 $n3
}
### End of multicast configuration
set cbr1 [new Agent/CBR]
$ns attach-agent $n0 $cbr1
$cbr1 set dst_addr 0x8003
set rcvr0 [new Agent/LossMonitor]
$ns attach-agent $n0 $rcvr0
set rcvr1 [new Agent/LossMonitor]
$ns attach-agent $n1 $rcvr1
set rcvr2 [new Agent/LossMonitor]
$ns attach-agent $n2 $rcvr2
set rcvr3 [new Agent/LossMonitor]
$ns attach-agent $n3 $rcvr3
$ns at 0.65 "$cbr1 start"
$ns at 0.3 "$n1 join-group $rcvr1 0x8003"
$ns at 0.4 "$n0 join-group $rcvr0 0x8003"
$ns at 0.5 "$n3 join-group $rcvr3 0x8003"
$ns at 0.6 "$n2 join-group $rcvr2 0x8003"
$ns rtmodel-at 0.7 down $n3
$ns rtmodel-at 0.75 up $n3
$ns at 0.71 "$mrthandle compute_mroutes"
$ns at 0.8 "$n0 leave-group $rcvr0 0x8003"
$ns at 0.85 "$n2 leave-group $rcvr2 0x8003"
$ns at 0.9 "$n3 leave-group $rcvr3 0x8003"
$ns at 1.0 "$n1 leave-group $rcvr1 0x8003"
#$ns at 1.1 "$n1 join-group $rcvr1 0x8003"
#$ns at 1.2 "finish"
$ns run; puts "OK"
proc finish {} {
global ns
# $ns flush-trace
$ns run
global rcvr0 rcvr1 rcvr2 rcvr3
puts "[$rcvr0 set npkts_] [$rcvr0 set nlost_]"
puts "[$rcvr1 set npkts_] [$rcvr1 set nlost_]"
puts "[$rcvr2 set npkts_] [$rcvr2 set nlost_]"
puts "[$rcvr3 set npkts_] [$rcvr3 set nlost_]"
#exec awk -f ../../nam-demo/nstonam.awk out-cmcast.tr > cmcast-nam.tr
#XXX
puts "running nam..."
exec nam out-cmcast &
exit 0
}
$ns run