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

[ns] How many nodes can I create in NS2



Hi,

I got problem to create nodes in NS2; and it seems weird.
I use following code to create node:
(I use ns-2.1b7a version)
### #ping.tcl ############ set ns [new Simulator]

set ns [new Simulator]

#open a trace file
set nf [open out.nam w]
$ns namtrace-all $nf

#define finish procedure
proc finish {} {
	global ns nf
        $ns flush-trace
        close $nf
	exec nam out.nam &
	exit 0
}

#create nodes
set node_number 14
for {set i 0} { $i<$node_number} {incr i}{
	set n($i) [$ns node]

}
	
....

The problem is that if I set the node_number <=14, it will be o.k.;
BUT if node_number >=15, it will cause problem and the error message is as
following:
#### error message
node out of range
    (_o128 cmd line 1)
    invoked from within "$self cmd lookup $nodeid $destid"
    (procedure "_o128" line 18)
    (RouteLogic lookup line 18)
    invoked from within "$r lookup $i $j"
    (procedure "_o3" line 26)
    (Simulator compute-flat-routes line 26)
    invoked from within "$self compute-flat-routes"
    (procedure "_o3" line 5)
    (Simulator compute-routes line 5)
    invoked from within "[Simulator instance] compute-routes"
    (procedure "Agent/rtProto/Static" line 2)
    (Agent/rtProto/Static init-all line 2)
    invoked from within "Agent/rtProto/Static init-all"
    (procedure "_o128" line 8)
    (RouteLogic configure line 8)
    invoked from within "[$self get-routelogic] configure"
    (procedure "_o3" line 4)
    (Simulator run line 4)
    invoked from within "$ns run"
    (file "ping.tcl" line 179)        

##################################

What's the problem? Can I create more than 15 nodes?

How can I create large scale topology more than 15 nodes?

Any help and information will be apprciated. 

TIA.


Chien-Lung