Hello, everyone. I first set up two nodes and a duplex link between them, and I want to get the link object using this script: --------------------------------------------------------------------- #Create 2 nodes for {set i 1} {$i<3} {incr i} { set n([expr $i]) [$ns node] }
#Create a duplex link between the nodes $ns duplex-link $n(1) $n(2) 1Mb 10ms SynDropTail #Get the queue object and do configuration set thelink [$ns get-link $n(1) $n(2)] --------------------------------------------------------------------- But I got those errors: "error "get-node-id-by-addr:Cannot find node with given address"" (procedure "_o3" line 10) (Simulator get-node-id-by-addr line 10) invoked from within "$self get-node-id-by-addr $addr" (procedure "_o3" line 4) (Simulator get-link line 4) invoked from within "$ns get-link $n(1) $n(2)" invoked from within "set thelink [$ns get-link $n(1) $n(2)]" (file "c2.tcl" line 30) WHY??? Somebody tell me why, please! Thanks a lot! HuangWei