set ns [ new simulator ] set nf [ open main.nam w ] $ns namtrace-all $nf set tf [ open main.tr w ] $ns trace-all $tf proc finish{} { global ns nf tf $ns flush-trace close $nf cloe $tf exec nam pa1.nam & exit 0 } set n0[ $ns node ] set n2[ $ns node ] set n3[ $ns node ] $ns duplex-link $no $n2 200Mb 10ms DropTail $ns duplex-link $n2 $n3 2Mb 1000ms DropTail $ns queue-limit $no $n2 10 set udp0 [ new Agent/UDP ] $ns attach-agent $n0 $udp0 set cbr0 [ new Application/Traffic/CBR ] $cbr0 set packetSize_500 $cbr0 set interval_0.005 $cbr0 attach-agent $udp0 set null0 [ new Agent/Null ] $ns attach-agent $n3 $null0 $ns connect $udp0 $null0 $ns at 0.1 "$cbr0 start" $ns at 1.0 "finish" $ns run
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more