Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set ns [new Simulator]
- set f [open out.tr w]
- set nf [open output.nam w]
- $ns namtrace-all $nf
- $ns trace-all $f
- $ns color 1 Blue
- $ns color 2 Red
- proc finish { } {
- global ns f
- $ns flush-trace
- close $f
- exec nam output.nam &
- exit 0
- }
- set n0 [$ns node]
- set n1 [$ns node]
- $ns duplex-link $n0 $n1 1mb 10ms DropTail
- $ns at 5.0 "finish"
- $ns run
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement