Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

my_first

set ns [new Simulator]
$ns color 1 Blue
$ns color 2 Red
set tracefile [open out.trace w]
$ns trace-all $tracefile
set file2 [open out.nam w]
$ns namtrace-all $file2
set winfile [open WinFile w]
proc finish {} {
    global ns file2
    global tracefile
    $ns flush-trace
    close $tracefile
    close $file2
    exec nam out.nam &
    exit 0
}
set n0 [$ns node]
set n1 [$ns node]
$ns duplex-link $n0 $n1 2Mb 10ms DropTail
$ns duplex-link-op $n0 $n1 orient right-down
$ns at 125.0 "finish"
$ns run

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.