Subject: Re: [Diffserv] Doubts with my topology

From: "Mohamed El Gendy" <[email-masked]>
Date: Sat, 02 Dec 2000 05:45:47 +0200

Uma,

	What kind of NS Diffserv support you use. There are two known 
implementations for diffserv on ns-2, the one done by Sean Murphy and the 
one that was developed by the OpenIP group in Nortel Networks and both of 
them don't have the modules you had in your code!!

Thanks.

>From: Uma Jayaraman <[email-masked]>
>To: [email-masked]
>CC: Uma Maheswari Jayaraman <[email-masked]>
>Subject: [Diffserv] Doubts with my topology
>Date: Fri, 24 Nov 2000 20:30:35 -0500 (EST)
>
>
>Hi,
>The code for the topology drawn below just doesnt seem to work. It is
>leaving copies of the packets in the queue.
>Please help.
>Uma
>
>
>#-------------------------------------------------------------------------------
>#   UDP
># ------
># | s1 |----------\
># ------  10 Mb    \                            5 ms
>#         5 ms      \-----------     10 Mb      --------
>#                    | diffserv|---------------| dest |
>#   UDP             /-----------                --------
># ------           /
># | s2 |----------/
># ------  10 Mb
>#         5 ms
>#
>#-------------------------------------------------------------------------------
># CREATING A NEW SIMULATOR OBJECT
>set ns [new Simulator]
>
>$ns color 10 green
>$ns color 11 yellow
>$ns color 12 red
>
>#Defining constants for policer
>
>set cir0  1000000
>set cbs0     2000
>set pir0  2000000
>set pbs0     3000
>set rate0 3000000
>
>set cir1  9000000
>set cbs1     2000
>set pir1  2000000
>set pbs1     3000
>set rate1 3000000
>
>#Defining the default packet size [required for RED state variables
>set packetSize 1000
>set testTime 10.0
>
>set f [open out.tr w]
>$ns trace-all $f
>
>set nf [open out.nam w]
>$ns namtrace-all $nf
>
>proc finish {} {
>         global ns nf
>         $ns flush-trace
>         close $nf
>         exec nam out.nam &
>         exit 0
>}
>
>#Creating nodes for the topology
>set s1 [$ns node]
>set s2 [$ns node]
>set diffserv [$ns node]
>set dest [$ns node]
>
># To define the links in the topology
>
>$ns simplex-link $s1 $diffserv 10Mb 5ms DropTail
>$ns simplex-link $diffserv $s1 10Mb 5ms dsRED/edge
>
>$ns simplex-link $s2 $diffserv 10Mb 5ms DropTail
>$ns simplex-link $diffserv $s2 10Mb 5ms dsRED/edge
>
>$ns simplex-link $dest $diffserv 10Mb 5ms DropTail
>$ns simplex-link $diffserv $dest 10Mb 5ms dsRED/edge
>
>#Orienting the direction of the links
>$ns duplex-link-op $s1 $diffserv orient down-right
>$ns duplex-link-op $s2 $diffserv orient up-right
>$ns duplex-link-op $diffserv $dest orient right
>
>$ns duplex-link-op $diffserv $dest queuePos 0.5
>
>#Setting the handles to configure the four DiffServ queues
>set qDS_S1 [[$ns link $diffserv $s1] queue]
>set qDS_S2 [[$ns link $diffserv $s2] queue]
>set qDS_De [[$ns link $diffserv $dest] queue]
>
>#Setting the DS RED parameters from DS to S1
>$qDS_S1 setSchedularMode PRI
>$qDS_S1 meanPktSize $packetSize
>$qDS_S1 set numQueues_ 3
>$qDS_S1 setNumPrec 1
>$qDS_S1 addPolicyEntry  [$dest id] [$s1 id] trTCM 10 $cir0 $cbs0 $pir0
>$pbs0
>$qDS_S1 addPolicyEntry  [$dest id] [$s2 id] trTCM 10 $cir1 $cbs1 $pir1
>$pbs1
>$qDS_S1 addPolicerEntry trTCM 10 11 12
>$qDS_S1 addPHBEntry 10 0 0
>$qDS_S1 addPHBEntry 11 1 0
>$qDS_S1 addPHBEntry 12 2 0
>$qDS_S1 configQ 0 0 20 40 0.02
>$qDS_S1 configQ 0 1 20 40 0.02
>$qDS_S1 configQ 0 2 20 40 0.02
>
>#Setting the DS RED parameters from DS to S2
>$qDS_S2 setSchedularMode PRI
>$qDS_S2 meanPktSize $packetSize
>$qDS_S2 set numQueues_ 3
>$qDS_S2 setNumPrec 1
>$qDS_S2 addPolicyEntry  [$dest id] [$s1 id] trTCM 10 $cir0 $cbs0 $pir0
>$pbs0
>$qDS_S2 addPolicyEntry  [$dest id] [$s2 id] trTCM 10 $cir1 $cbs1 $pir1
>$pbs1
>$qDS_S2 addPolicerEntry trTCM 10 11 12
>$qDS_S2 addPHBEntry 10 0 0
>$qDS_S2 addPHBEntry 11 1 0
>$qDS_S2 addPHBEntry 12 2 0
>$qDS_S2 configQ 0 0 20 40 0.02
>$qDS_S2 configQ 1 0 20 40 0.02
>$qDS_S2 configQ 2 0 20 40 0.02
>
># Set DS RED parameters from DS to Destination
>$qDS_De addQueueRate 0 3000000
>$qDS_De meanPktSize $packetSize
>$qDS_De set numQueues_ 3
>$qDS_De setNumPrec 1
>$qDS_De addPolicyEntry [$s1 id] [$dest id] trTCM 10 $cir0 $cbs0 $pir0
>$pbs0
>$qDS_De addPolicyEntry [$s2 id] [$dest id] trTCM 10 $cir1 $cbs1 $pir1
>$pbs1
>$qDS_De addPolicerEntry trTCM 10 11 12
>$qDS_De addPHBEntry 10 0 0
>$qDS_De addPHBEntry 11 1 0
>$qDS_De addPHBEntry 12 2 0
>$qDS_De configQ 0 0 20 40 0.02
>$qDS_De configQ 1 0 20 40 0.02
>$qDS_De configQ 2 0 20 40 0.02
>
># Set up one CBR connection between source and the destination
>set tcp0 [new Agent/UDP]
>$ns attach-agent $s1 $tcp0
>set cbr0 [new Application/Traffic/CBR]
>$cbr0 attach-agent $tcp0
>$cbr0 set packet_size_ $packetSize
>$tcp0 set packetSize_ $packetSize
>$cbr0 set rate_ $rate0
>set null0 [new Agent/Null]
>$ns attach-agent $dest $null0
>$ns connect $tcp0 $null0
>
>set udp1 [new Agent/UDP]
>$ns attach-agent $s2 $udp1
>set cbr1 [new Application/Traffic/CBR]
>$cbr1 attach-agent $udp1
>$cbr1 set packet_size_ $packetSize
>$udp1 set packetSize_ $packetSize
>$cbr1 set rate_ $rate1
>set null1 [new Agent/Null]
>$ns attach-agent $dest $null1
>$ns connect $udp1 $null1
>
># Printing the policy table
>#$qDS_S1 printPolicyTable
>#$qDS_S2 printPolicyTable
>#$qDS_S1 printPolicerTable
>#$qDS_S2 printPolicerTable
>
>$ns at 0.0 "$cbr0 start"
>$ns at 0.0 "$cbr1 start"
>#$ns at 2.0 "$qDS_De printStats"
>#$ns at 4.0 "$qDS_De printStats"
>$ns at $testTime "$cbr0 stop"
>$ns at $testTime "$cbr1 stop"
>$ns at [expr $testTime + 1.0] "finish"
>
>$ns run
>
>
>*******************************
>Uma Jayaraman
>Computer Engineering
>North Carolina State University
>2506,Avent Ferry Road, #201
>Raleigh, NC-27606
>(919)-828-3770
>[email-masked]
>*******************************
>
>
>_______________________________________________
>diffserv mailing list
>[email-masked]
>http://www1.ietf.org/mailman/listinfo/diffserv
>Archive: http://www-nrg.ee.lbl.gov/diff-serv-arch/
>

_____________________________________________________________________________________
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com

_______________________________________________
diffserv mailing list
[email-masked]
http://www1.ietf.org/mailman/listinfo/diffserv
Archive: http://www2.ietf.org/mail-archive/working-groups/diffserv/current/maillist.html