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

[ns] LAN-doesn't work! (please help, very urgent!)




Hi,

I'm an absolut beginner in this field (Network Simulation). Now I'm
working with a pre-compiled version of ns (ns-21b5) for WIN32. Since
last week I've been trying to simulate a simple LAN with 3 nodes and a
TCP-connection. But all my attempts failed with the following ns-error:

>
Assertion failed: initialized() , file wired-phy.cc, line 80

abnormal program termination
>

What does this mean? Please tell me how to solve this problem.
Thank you very much.

Glenson.

P.S.: The simple LAN that I've been trying to simulate is the following
one:
---
set ns [new Simulator]
set namtr [open out.nam w]
$ns namtrace-all $namtr
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
$ns make-lan "$n1 $n2 $n3"  10Mb 1ms LL Queue/DropTail Mac/802_3 Channel
Phy/WiredPhy

set tcp0 [new Agent/TCP]
set ftp0 [new Application/FTP]
$ns attach-agent $n1 $tcp0
$ftp0 attach-agent $tcp0

set sink0 [new Agent/TCPSink]
$ns attach-agent $n3 $sink0

$ns connect $tcp0 $sink0

$ns at 0.1 "$ftp0 start"
$ns at 0.9 "$ftp0 stop"
$ns at 1.0 "finish"

proc finish {} {
        global ns namtr
        $ns flush-trace
        close $namtr
        exit 0
}
$ns run
---