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

Re: [ns] Segmentation fault in Nortel's Diffserv Module



Xiang,

I ran the script it did not encounter any seg faults. Hence I think the
script is ok there must be some problem with the .cc/.h files of the
diffserv impl. Have you tried gdb'ing ns when you got the seg fault.

I had some problem with the CBQ object that you had for the node <-> edge
links, changed it to DropTail and it worked fine, but that was not the
problem you were looking for right.

Regards,
Sudhin.

On Wed, 21 Mar 2001, Xiang wrote:

> Hi,
> I'm sorry to make inconvenient to you. The whole script is shown below.
>
> #---------------------------------------------------------------------------
> -----
> # Diffservtest.tcl
> # Author: Xiang
> # Dates: Mar, 2001.
> # Notes: A DS-RED script that uses trTCM policer which satisfied AR-PDB.
> #        Modified from ds-cbr-trTCM.tcl
> #
> #    ----
> #    |s1|-----------
> #    ----   10 Mb   \
> #            5 ms    \
> #                     \----           ------          ----           ------
> #                      |e1|-----------|core|----------|e2|-----------|dest|
> #                     /----   10 Mb   ------   5 Mb   ----   10 Mb   ------
> #                    /         5 ms            5 ms           5 ms
> #    ----           /
> #    |s2|-----------
> #    ----   10 Mb
> #            5 ms
> #
> #---------------------------------------------------------------------------
> -----
>
>
> set ns [new Simulator]
>
> set cir0  1000000
> set cbs0     2000
> set pir0  1000000
> set pbs0     3000
> set rate0 3000000
> set cir1  1000000
> set cbs1     2000
> set pir1  1000000
> set pbs1     3000
> set rate1 3000000
>
> set testTime 85.0
> set packetSize 1000
>
>
> # Set up the network topology shown at the top of this file:
> set s1 [$ns node]
> set s2 [$ns node]
> set e1 [$ns node]
> set core [$ns node]
> set e2 [$ns node]
> set dest [$ns node]
>
> $ns duplex-link $s1 $e1 10Mb 5ms CBQ
> $ns duplex-link $s2 $e1 10Mb 5ms CBQ
>
> $ns simplex-link $e1 $core 10Mb 5ms dsRED/edge
> $ns simplex-link $core $e1 10Mb 5ms dsRED/core
>
>
> $ns simplex-link $core $e2 5Mb 5ms dsRED/core
> $ns simplex-link $e2 $core 5Mb 5ms dsRED/edge
>
> $ns duplex-link $e2 $dest 10Mb 5ms CBQ
>
>
> $ns duplex-link-op $s1 $e1 orient down-right
> $ns duplex-link-op $s2 $e1 orient up-right
> $ns duplex-link-op $e1 $core orient right
> $ns duplex-link-op $core $e2 orient right
> $ns duplex-link-op $e2 $dest orient right
>
>
> set qE1C [[$ns link $e1 $core] queue]
> set qE2C [[$ns link $e2 $core] queue]
> set qCE1 [[$ns link $core $e1] queue]
> set qCE2 [[$ns link $core $e2] queue]
>
> # Set DS RED parameters from Edge1 to Core:
> $qE1C meanPktSize $packetSize
> $qE1C set numQueues_ 2
> $qE1C setNumPrec 3
> puts "qE1C set ok"
> $qE1C addPolicyEntry [$s1 id] [$dest id] trTCM 10 $cir0 $cbs0 $pir0 $pbs0
> $qE1C addPolicyEntry [$s2 id] [$dest id] trTCM 18 $cir1 $cbs1 $pir1 $pbs1
> puts "addpolicyEntry ok"
> $qE1C addPolicerEntry trTCM 10 12 14
> $qE1C addPolicerEntry trTCM 18 20 22
> puts "addPolicerEntry OK!"
> $qE1C addPHBEntry 10 0 0
> $qE1C addPHBEntry 12 0 1
> $qE1C addPHBEntry 14 0 2
> $qE1C addPHBEntry 18 1 0
> $qE1C addPHBEntry 20 1 1
> $qE1C addPHBEntry 22 1 2
> puts "qE1C addPHBEntry OK!"
>
> $qE1C configQ 0 0 80 100 0.02
> $qE1C configQ 0 1 60 80 0.10
> $qE1C configQ 0 2 40 60 0.20
> $qE1C configQ 1 0 20 40 0.10
>
> $qE1C configQ 1 1 10 20 0.20
> puts "OK!"
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   segmentation fault happend here, NO OK
> message
> $qE1C configQ 1 2 5 10 0.30
> puts "qE1C ok!"
>
> # Set DS RED parameters from Edge2 to Core:
> $qE2C meanPktSize $packetSize
> $qE2C set numQueues_ 1
> $qE2C setNumPrec 3
> $qE2C addPolicyEntry [$dest id] [$s1 id] trTCM 10 $cir0 $cbs0 $pir0 $pbs0
> $qE2C addPolicyEntry [$dest id] [$s2 id] trTCM 10 $cir1 $cbs1 $pir1 $pbs1
> $qE2C addPolicerEntry trTCM 10 12 14
> $qE2C addPHBEntry 10 0 0
> $qE2C addPHBEntry 12 0 1
> $qE2C addPHBEntry 14 0 2
> $qE2C configQ 0 0 20 40 0.02
> $qE2C configQ 0 1 10 20 0.10
> $qE2C configQ 0 2  5 10 0.20
>
> # Set DS RED parameters from Core to Edge1:
> $qCE1 meanPktSize $packetSize
> $qCE1 set numQueues_ 1
> $qCE1 setNumPrec 3
> $qCE1 addPHBEntry 10 0 0
> $qCE1 addPHBEntry 12 0 1
> $qCE1 addPHBEntry 14 0 2
> $qCE1 configQ 0 0 20 40 0.02
> $qCE1 configQ 0 1 10 20 0.10
> $qCE1 configQ 0 2  5 10 0.20
>
> # Set DS RED parameters from Core to Edge2:
> $qCE2 meanPktSize $packetSize
> $qCE2 set numQueues_ 2
> $qCE2 setNumPrec 3
> $qCE2 addPHBEntry 10 0 0
> $qCE2 addPHBEntry 12 0 1
> $qCE2 addPHBEntry 14 0 2
> $qCE2 addPHBEntry 18 1 0
> $qCE2 addPHBEntry 20 1 1
> $qCE2 addPHBEntry 22 1 2
> $qCE2 configQ 0 0 80 120 0.02
> $qCE2 configQ 0 1 40 60 0.10
> $qCE2 configQ 0 2 20 40 0.20
> $qCE2 configQ 1 0 20 40 0.10
> $qCE2 configQ 1 1 10 20 0.20
> $qCE2 configQ 1 2  5 10 0.30
>
>
> # Set up one CBR connection between each source and the destination:
> set udp0 [new Agent/UDP]
> $ns attach-agent $s1 $udp0
> set cbr0 [new Application/Traffic/CBR]
> $cbr0 attach-agent $udp0
> $cbr0 set packet_size_ $packetSize
> $udp0 set packetSize_ $packetSize
> $cbr0 set rate_ $rate0
> set null0 [new Agent/Null]
> $ns attach-agent $dest $null0
> $ns connect $udp0 $null0
>
>
> ## set up the exponential on/off source, parameterized by packet size,
> ## ave on time, ave off time and peak rate
>
> #set udp1 [new Agent/UDP]
> #$ns attach-agent $s2 $udp1
> #set null1 [new Agent/Null]
> #$ns attach-agent $dest $null1
>
> #$ns connect $udp1 $null1
>
> #set exp1 [new Application/Traffic/Exponential]
> #$exp1 set packetSize_ $packetSize
> #$exp1 set burst_time_ 500ms
> #$exp1 set idle_time_ 500ms
> #$exp1 set rate_ $rate1
>
> #$exp1 attach-agent $s1
>
> 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
>
>
> proc finish {} {
>     global ns
>     exit 0
> }
>
>
> $qE1C printPolicyTable
> $qE1C printPolicerTable
>
> $ns at 0.0 "$cbr0 start"
> $ns at 0.0 "$cbr1 start"
> $ns at 20.0 "$qCE2 printStats"
> $ns at 40.0 "$qCE2 printStats"
> $ns at 60.0 "$qCE2 printStats"
> $ns at 80.0 "$qCE2 printStats"
> $ns at $testTime "$cbr0 stop"
> $ns at $testTime "$cbr1 stop"
> $ns at [expr $testTime + 1.0] "finish"
>
> $ns run
>
>
>
>
> ----- Original Message -----
> From: "Xuan Chen" <[email protected]>
> To: "Xiang" <[email protected]>
> Sent: Wednesday, March 21, 2001 10:22 AM
> Subject: Re: [ns] Segmentation fault in Nortel's Diffserv Module
>
>
> > I can't see the attachment. Could you please resend it to me or tell me a
> > place I can get it? Thanks.
> >
> > btw, you can just copy and past it to your email.
> >
> > Cheers,
> > -chen xuan
> >
>
>
>

****************** Sudhindra Suresh Bengeri ********************
Graduate Research Assistant   | Home:                          |
to Dr. George N. Rouskas      | 2110, Gorman St.,              |
EGRC 454H, Computer Sci. dept.| Raleigh, NC - 27606            |
NCSU, Raleigh, NC 27695       | Ph. (919) 852-1961             |
(919)515-3655(P) / 515-7925(F)
My web projection: http://www4.ncsu.edu/~ssbenger