I'm simulating a network in NS2, but i'm having a problem naming the nodes. I'm naming them from 1 to 10 but when i start it, it shows nodes from 0 to 9
set ns [new Simulator]
set nf [open out.nam w]
$ns namtrace-all $nf
set tf [open out.tr w]
$ns trace-all $nf
proc finish {} {
global ns nf tf
$ns flush-trace
close $nf
close $tf
exec nam out.nam &
exit 0
}
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
set n4 [$ns node]
set n5 [$ns node]
set n6 [$ns node]
set n7 [$ns node]
set n8 [$ns node]
set n9 [$ns node]
set n10 [$ns node]
$ns duplex-link $n1 $n5 1Mb 10ms DropTail
$ns duplex-link-op $n1 $n5 orient right-down
$ns duplex-link $n2 $n5 1Mb 10ms DropTail
$ns duplex-link-op $n2 $n5 orient right
$ns duplex-link $n3 $n5 1Mb 10ms DropTail
$ns duplex-link-op $n3 $n5 orient right-up
$ns duplex-link $n4 $n5 1Mb 10ms DropTail
$ns duplex-link-op $n4 $n5 orient up
$ns duplex-link $n5 $n6 1Mb 10ms DropTail
$ns duplex-link-op $n5 $n6 orient right
$ns duplex-link $n6 $n7 1Mb 10ms DropTail
$ns duplex-link-op $n6 $n7 orient right-up
$ns duplex-link $n6 $n8 1Mb 10ms DropTail
$ns duplex-link-op $n6 $n8 orient right
$ns duplex-link $n6 $n9 1Mb 10ms DropTail
$ns duplex-link-op $n6 $n9 orient right-down
$ns duplex-link $n6 $n10 1Mb 10ms DropTail
$ns duplex-link-op $n6 $n10 orient down
$ns at 5.0 "finish"
$ns run