Ive colored and clustered the nodes myself, by hand, just for that picture
in my site.
For setting the wired nodes in NAM, the best way is to specify the wired
link latency and orientation. There are lots of examples on the /tcl/ex
directory on how to do it.
Pedro Vale Estrela
-Original Message-
From: subramani [mailto:[EMAIL PROTECTED]
Sent: sábado, 6 de Janeiro de 2007 10:02
To: [EMAIL PROTECTED]
Subject: RE: [ns] Fwd: segmentation fault in wired cum wireless scenario
usingaodv+ help
hi
thanks for the info ..
i rectified the fault by commenting some section and re running
and as you had pointed out i had done a mistake in assigning hier-address to
the wired nodes .
one more doubt
in wired cum wireless scenarios as shown by nam
the wired nodes are seen clustered together.
specifying node positions for wired nodes has no effect.
is there any method to specify where each node should be located exactly in
the nam window?
Pedro Vale Estrela [EMAIL PROTECTED] wrote:
http://tagus.inesc-id.pt/~pestrela/ns2/ns2_haddr_tips.html#_Toc121548870
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of subramani
Sent: quinta-feira, 4 de Janeiro de 2007 18:09
To: ns list
Subject: [ns] Fwd: segmentation fault in wired cum wireless scenario
usingaodv+ help
hi all,
i have installed aodv+ for gateway discovery on ns-2.28 (redhat 9)
aodv+ was in ns2 contributed code section
it worked everything fine for all the example scripts provided..
but when i changed the number of nodes in the given example
wired_wireless_ex.tcl
i received a segmentation fault
i don't know wheres the fault .please atleast help me how to debug ns2
scripts containing
segmentation faults
*
here is the complete code
**
#try.tcl
set opt(namfile) out.nam
set opt(tracefile) out.tr
set opt(x) 500; #x dimension of the
topography
set opt(y) 500; #y dimension of the
topography
set opt(wirelessNodes) 6; #mobile nodes
set opt(wiredNodes) 8; #hosts and routers
set opt(gatewayNodes) 2; #gateways
set val(stop) 60.0; #simulation time
set val(start-src) 1
set val(stop-src) 50
set opt(gw_discovery) reactive; #gateway discovery method
# ==
#---
#Initialize Global Variables
#---
#create a simulator object
set ns [new Simulator]
$ns color 0 Brown
#
#Define The Hierachial Topology Structure
#
$ns node-config -addressType hierarchical
#Nbr of domains
AddrParams set domain_num_ 3
#Nbr of clusters (=subdomains) in each domain
lappend clusterNbr 2 2 1
AddrParams set cluster_num_ $clusterNbr
#Nbr of nodes in each cluster
lappend eilastlevel 3 2 4 4 3
AddrParams set nodes_num_ $eilastlevel
##
#create trace objects for ns and nam
$ns use-newtrace
set nstrace [open $opt(tracefile) w]
$ns trace-all $nstrace
set namtrace [open $opt(namfile) w]
$ns namtrace-all-wireless $namtrace $opt(x) $opt(y)
#create a topology object and define topology (500mx500m)
set topo [new Topography]
$topo load_flatgrid $opt(x) $opt(y)
#Choose method for gateway discovery
if {$opt(gw_discovery) == proactive} {
Agent/AODV set gw_discovery 0
}
if {$opt(gw_discovery) == hybrid} {
Agent/AODV set gw_discovery 1
}
if {$opt(gw_discovery) == reactive} {
Agent/AODV set gw_discovery 2
}
#create wired nodes
set temp {2.0.0 2.0.1 2.0.2 2.0.3 2.1.4 2.1.5 2.1.6 2.1.7}
for {set i 0} {$i $opt(wiredNodes)} {incr i} {
set host($i) [$ns node [lindex $temp $i]]
}
#create God (General Operations Director)
create-god [expr $opt(wirelessNodes)+$opt(gatewayNodes)]]
#--
#Configure for Gateway and Mobile Nodes
#--
#Use hierarchical addresses for GWs and MNs
#configure for mobile nodes and gateways
$ns node-config -adhocRouting AODV
$ns node-config -llType LL
$ns node-config -macType Mac/802_11
$ns node-config -ifqType Queue/DropTail/PriQueue
$ns node-config -ifqLen 50
$ns node-config -antType Antenna/OmniAntenna
$ns node-config -propType Propagation/TwoRayGround
$ns node-config -phyType Phy/WirelessPhy
$ns node-config -topoInstance $topo
$ns node-config -channel [new Channel/WirelessChannel]
$ns node-config -agentTrace ON
$ns node-config -routerTrace ON
$ns node-config -macTrace ON
$ns node-config -movementTrace OFF
#3
#configure for gateways
$ns node-config -wiredRouting ON
#create gateway
set gw(0) [$ns node 0.0.0]
#set initial coordinates
$gw(0) set X_ 100.0
$gw(0) set Y_ 250.0
$gw(0) set Z_ 0.0
$ns at 0.00 $gw(0) setdest 100 250 20
try
set gw(1) [$ns node 1.0.0]
#set initial coordinates
$gw(1) set X_ 500.0
$gw(1) set Y_ 250.0