[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] [Q]multiPath and CBR?



On Fri, 10 Nov 2000, Greg Polgo wrote:

> Thank you for your reply.
> I just installed 'ns-allinone-2.1b7a' and tested it works O.K.
> But when I try the previous .tcl,
> I got the error
> 
> ----------------------------------------------------------
> using backward compatible Agent/CBR; use Application/Traffic/CBR instead
> using backward compatible Agent/CBR; use Application/Traffic/CBR instead

Connect CBR application to UBR agent to ns node. The old Agent/CBR
dates from before the separation of functionality between agent and
application.

The rest of your error message is unusual; my guess is that DV routing
really is not at all happy with simplex links in your script, as it
can't learn the topology by communicating between nodes. Use of duplex
links or a change of topology to introduce a hamiltonian path should
fix that. Still, I'd expect no traffic, not this error message....
anyone?

L.


> ns: _o97 recv-update 0 0: can't read "class::": no such variable
>     while executing
> "error "$class::$proc update $peerAddr:$msg:$count from unknown peer""
>     (procedure "_o97" line 36)
>     (Agent/rtProto/DV recv-update line 36)
>     invoked from within
> "_o97 recv-update 0 0"
> -----------------------------------------------------------
> 
> which was not with ns-allinone-2.1b6.
> One thing, when I commented out 'multiPath' and 'DV',
> it works fine.
> 
> What would be wrong?
> Thank you again.
> 
> Greg.
> 
> --------------------- example.tcl -------------------------
> #Create a simulator object
> set ns [new Simulator]
> 
> #Define different colors for data flows
> $ns color 1 Blue
> $ns color 2 Red
> 
> set f [open out.tr w]
> $ns trace-all $f
> #Open the nam trace file
> set nf [open out.nam w]
> $ns namtrace-all $nf
> 
> #Define a 'finish' procedure
> proc finish {} {
>         global ns nf f
>         $ns flush-trace
>         #Close the trace file
>         close $nf
>         close $f
>         #Execute nam on the trace file
>         exec nam out.nam &
>         exit 0
> }
> 
> Node set multiPath_ 1
> #Create four nodes
> set n0 [$ns node]
> set n1 [$ns node]
> set n2 [$ns node]
> set n3 [$ns node]
> set n4 [$ns node]
> 
> #Create links between the nodes
> $ns simplex-link $n0 $n1 1Mb 10ms DropTail
> $ns simplex-link $n1 $n2 1Mb 10ms DropTail
> $ns simplex-link $n1 $n3 1Mb 10ms DropTail
> $ns simplex-link $n2 $n4 1Mb 10ms DropTail
> $ns simplex-link $n3 $n4 1Mb 10ms DropTail
> 
> $ns simplex-link-op $n0 $n1 orient right
> $ns simplex-link-op $n1 $n2 orient right-up
> $ns simplex-link-op $n1 $n3 orient right-down
> $ns simplex-link-op $n2 $n4 orient right-down
> $ns simplex-link-op $n3 $n4 orient right-up
> 
> #Monitor the queue for the link between node 2 and node 3
> #$ns simplex-link-op $n2 $n3 queuePos 0.5
> 
> #Create a CBR agent and attach it to node n0
> #set cbr0 [new Application/Traffic/CBR]
> set cbr0 [new Agent/CBR]
> $ns attach-agent $n0 $cbr0
> $cbr0 set packetSize_ 500
> $cbr0 set interval_ 0.005
> $cbr0 set fid_ 1
> 
> #Create a CBR agent and attach it to node n1
> #set cbr1 [new Application/Traffic/CBR]
> set cbr1 [new Agent/CBR]
> $ns attach-agent $n0 $cbr1
> $cbr1 set packetSize_ 500
> $cbr1 set interval_ 0.005
> $cbr1 set fid_ 2
> 
> #Create a Null agent (a traffic sink) and attach it to node n3
> set null0 [new Agent/Null]
> $ns attach-agent $n4 $null0
> 
> #Connect the traffic sources with the traffic sink
> $ns connect $cbr0 $null0
> $ns connect $cbr1 $null0
> 
> $ns rtproto DV
> 
> 
> #Schedule events for the CBR agents
> $ns at 0.1 "$cbr0 start"
> $ns at 0.15 "$cbr1 start"
> $ns at 1.0 "$cbr1 stop"
> $ns at 1.2 "$cbr0 stop"
> #Call the finish procedure after 5 seconds of simulation time
> $ns at 1.5 "finish"
> 
> #Run the simulation
> $ns run
> 
> 
> 
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
> 
> Share information about yourself, create your own public profile at 
> http://profiles.msn.com.
> 
> 

<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>