[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] problems with hierarchical addressing
i'm trying to put together a simulation that uses hierarchical routing
and automatically sets up several hundred tcp connections. however,
immediately after setting up and attaching the connections, ns dies with
a segfault.
are there known problems with hierarchical routing in ns-allinone-2.1b7?
i'm not even using DV routing, just static routing...
(btw, i'm the segfault occurs on linux... the alpha version gives the
output given below. i've also attached the whole script.)
jon
#####INFO######
the backtrace of the core dump shows that it is in the
following three methods:
#0 0x8050a68 in RouteLogic::lookup_hier ()
#1 0x8050749 in RouteLogic::command ()
#2 0x81172c4 in TclClass::dispatch_cmd ()
as it turns out, lookup_hier() is being passed null pointers as the
source and destinations.
on the alpha version it dies with the following error:
negative src node number
(_o8348 cmd line 1)
invoked from within
"_o8348 cmd hier-lookup 0 0.0"
invoked from within
"catch "$self cmd $args" ret"
(procedure "_o8348" line 2)
(SplitObject unknown line 2)
invoked from within
"$r hier-lookup $addr $str"
(procedure "_o3" line 44)
(Simulator compute-hier-routes line 44)
invoked from within
"$self compute-hier-routes "
(procedure "_o3" line 3)
(Simulator compute-routes line 3)
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 "_o8348" 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 "gridstars.tcl" line 668)
here is the relevant contents of the tcl script that generates the
nodes:
set ns [new Simulator]
$ns set-address-format hierarchical 3 8 8 8
# set random number generator
set rng [new RNG]
# to prevent us from too much randomness.
#$rng seed 35
## FUNCTIONS ###
## Generated by sgb2hier-ns,sgb2hier-ns generated from sgb2ns
# sgb2ns adapted from sgb2alt by Polly Huang
# GRAPH (#nodes #edges id uu vv ww xx yy zz):
# 200 672
# transtub(0,4,0,0,{1,126,3,1.000,0.000,0.000},{8,64,3,0.800,0.000,0.000
},{6,43,3,0.500,0.000,0.000}) 126 2 3 0
#Creating hierarchical topology from transit-stub graph:
proc create-hier-topology {nsns node linkBW} {
upvar $node n
upvar $nsns ns
set verbose 1
if {$verbose} {
puts "Creating hierarchical nodes.."
}
set i 0
foreach a {
0.39.5
0.1.0
0.2.0
0.7.0
[omitted for brevity]
} {
set n($i) [$ns node $a]
incr i
if {[expr $i % 100] == 0} {
puts "creating node $i..."
}
}
# Topology information :
lappend domain 1
AddrParams set domain_num_ $domain
lappend cluster 40
AddrParams set cluster_num_ $cluster
lappend eilastlevel 1 1 1 1 1 1 1 1 4 8 3 6 9 7 6 5 5 6 5 4 10 7
6 11 6
4 5 4 5 5 7 9 7 4 3 7 5 5 9 5
AddrParams set nodes_num_ $eilastlevel
# EDGES (from-node to-node length a b):
if {$verbose} {
puts "Creating links 0..."
flush stdout
}
set i 0
foreach t {
{0 13 330ms}
[blah blah blah]
$ns duplex-link $n([lindex $t 0]) $n([lindex $t 1]) $linkBW
[lindex $t 2] DropTail
incr i
if {[expr $i % 100] == 0} {
puts "creating link $i..."
}
}
return 200
}
--
Jonathan S. Keim Class of 2001
[email protected] 117 1901 Hall
GnuPG Public key: http://www.princeton.edu/~jonkeim/jonkeim.gpg
gridstars.tcl