[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
multicast monitoring
Hi everyone,
I have installed version 2.1b3 of ns. I am still trying to get coloured
nodes without any success.
First of all, I tried to run pim1.tcl in (..tcl/ex/newmcast
directory) but I couldn't get it to work. This tcl script does not run
a separate script for a nam. I was wondering how this works, how the
finish procedure works.
I would also like to know where the ns-2 man page is for nams.
I am running the 2.13b version of ns and it now accepts when I call the
function procedure in my script but it has no impact on the nam that is
generated. The node is not coloured.
I am also having trouble with the multicast monitor function. The
packets circulating through the topology are not counted, I have
included a file that I ran along with the results:
> set ns [new Simulator]
> Simulator set EnableMcast_ 1
>
> set n0 [$ns node]
> set n1 [$ns node]
> set n2 [$ns node]
> set n3 [$ns node]
>
> set f [open out-cores6.tr w]
> $ns trace-all $f
> Simulator set NumberInterfaces_ 1
>
> $ns duplex-link $n1 $n2 1.5Mb 10ms DropTail
> $ns duplex-link $n1 $n0 1.5Mb 10ms DropTail
> $ns duplex-link $n2 $n3 1.5Mb 10ms DropTail
> set pim0 [new PIM $ns $n0 [list 1 1 0 0]]
> set pim1 [new PIM $ns $n1 [list 0 1 0 1]]
> set pim2 [new PIM $ns $n2 [list 0]]
> set pim3 [new PIM $ns $n3 [list 0 1 0 0]]
>
> PIM config $ns
>
> set sender0 [new Agent/Message]
> $sender0 set dst_ 0x8003
> $sender0 set class_ 2
> $ns attach-agent $n0 $sender0
>
> set mcastmonitor [$ns McastMonitor]
> $mcastmonitor set period_ 0.02
> $ns at 0.0 "$mcastmonitor trace-topo 0 [expr 0x8003]"
>
> $ns at 0.1 "$ns run-mcast"
>
> Agent/Message instproc handle msg {
> $self instvar node_
> puts "@@@@@@@@@node [$node_ id] agent $self rxvd msg $msg. @@@@@@@@"
> }
>
> set rcvr0 [new Agent/Message]
> $ns attach-agent $n0 $rcvr0
> set rcvr1 [new Agent/Message]
> $ns attach-agent $n1 $rcvr1
> set rcvr2 [new Agent/Message]
> $ns attach-agent $n2 $rcvr2
> set rcvr3 [new Agent/Message]
> $ns attach-agent $n3 $rcvr3
> $ns at 1.10 "$n2 join-group $rcvr2 0x8003"
> $ns at 1.05 "$n1 join-group $rcvr1 0x8003"
>
> $ns at 1.25 "$sender0 send \"pkt1\""
> $ns at 1.3 "$sender0 send \"pkt2\""
> $ns at 1.35 "$sender0 send \"pkt3\""
>
> $ns at 2.9 "finish"
>
> proc finish {} {
> global ns
> $ns flush-trace
> exec awk -f ../../nam-demo/nstonam.awk out-cores6.tr >
> cores6-nam.tr
> # exec rm -f out
> #XXX
> # puts "running nam..."
> #exec nam cores6-nam &
> exit 0
> }
>
> $ns run
>
> a sample of the results from this script are :
>
> 1.2 0 0 0 0 0 32771
> 1.22 0 0 0 0 0 32771
> 1.24 0 0 0 0 0 32771
It could be that the PIM-SM join/prune/.. messages are using different
msg id than CtrMcast or DM multicast. One quick hack will be to
change the stat collecting function in delay.cc (I think).
Please let me know if you run into further problems.
-Polly
What would I have to change in the function?
If anyone has any more help to offer me I would be really grateful.
Thanks,
Judith Mathewson