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

[ns] Question



 				Hi
I am a novice in using ns.I have the following question. I am running a
small simulation I wrote and get an error "routes not yet computed" when
ns executes the ns run command. Does anyone know where this might come
from? I tried to specify a static routing protocol but ns doesn't let me.
				Thanks

P.S 1 If this is not the appropriate list for these kinds of questions
please let me know

P.S 2 The code of my simulation and the error messages follow: 

#create the necessary objects to run ns
#default for all sumulations
set ns [new Simulator]
set nf [open ex_3.nam w]
$ns namtrace-all $nf

#try to randomize the simulation each time with a different seed
#(I don't know if it works) 
ns random 0

#set the depth of the distribution tree
set k 2

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

#create k-1 lossy links with a constant loss probability 
#(how do we define the actual probability ???)
for {set i 0} {$i < [expr $k-1]} {incr i} {
    ns link $n($i) $n([expr $i+1]) 10ms lossy-uniform
}

#src is a  TCP agent in source that sends pkts to the leaf nodes
set src [ns agent cbr $n(0)]
$src set packetSize_ 500
$src set interval_ 0.005

#dest is a pkt sink in the laf node
set dest [ns agent loss-monitor $n([expr $k-1])]

# start sending probes pkts from the source to the leaf node of the path
ns_connect $src $dest

#start the source
ns at 0.0 "$src start"

#the simulation will run for 10.0 secs
ns at 10.0 "exit 0"

#run it!!!
ns run

The errors are 
warning: using backward compatibility mode
routes not yet computed
    (_o27 cmd line 1)
    invoked from within
"$self cmd lookup $nodeid $destid"
    (procedure "_o27" line 19)
    (RouteLogic lookup line 19)
    invoked from within
"$r lookup $i $j"
    (procedure "_o3" line 28)
    (Simulator compute-flat-routes line 28)
    invoked from within
"$self compute-flat-routes"
    (procedure "_o3" line 7)
    (Simulator compute-routes line 7)
    invoked from within
"[Simulator instance] compute-routes"
    (procedure "Agent/rtProto/Static" line 3)
    (Agent/rtProto/Static init-all line 3)
    invoked from within
"Agent/rtProto/Static init-all"
    (procedure "_o26" line 8)
    (RouteLogic configure line 8)
    invoked from within
"[$self get-routelogic] configure"
    (procedure "ns" line 5)
    (Simulator run line 5)
    invoked from within
"ns run"
    (file "path.tcl" line 48)
 

--
"Provability is a weaker notion than truth, no matter what axiom system is
involved ... "

Kurt Godel (1906-1978)