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

NAM bug



Title: NAM bug

Hi,

I found strange drops on LAN when I ran the following simple script. From the NAM tracefile, I could see very normal packet drops, which is only on the queue from n0 to n2, while on the NAM display it shows not only packets are dropped from the source queue, also on the LAN link. Also the packets shown dropped from the link are not totally real dropped packets. Some are just packets tranmitting on that link. Run the script and you will see what I mean. Hope someone could fix the bug? I am using nam-1.0a7, and I didn't see nam-1.0a8 makes any changes related to this bug.

set ns [new Simulator]

#create tracefiles
set nf [open out.nam w]
$ns namtrace-all $nf

set stoptime 20.0
set starttime 0.0

set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]

$ns duplex-link $n1 $n2 10Mb 20us DropTail

set lan [$ns make-lan "$n0 $n1" 10Mb 20us LL Queue/DropTail Mac/802_3 Channel]

set udp [new Agent/UDP]
$ns attach-agent $n0 $udp
$udp set packetSize_ 1500
set udpsink [new Agent/Null]
$ns attach-agent $n2 $udpsink
$ns connect $udp $udpsink

set cbr [new Application/Traffic/CBR]
$cbr set rate_ 10Mb
$cbr set packetSize_ 1500
$cbr attach-agent $udp
set rng [new RNG]
$ns at [$rng uniform 0.0 2.0] "$cbr start"
$ns at $stoptime "$cbr stop"

proc finish {} {

    global ns nf

    $ns flush-trace

    close $nf

    exec nam out.nam &

    exit 0
}

$ns at $stoptime "finish"
$ns run