Hi all,
Is it possible to simulate a wired-cum-wireless network composed by several
wireless nodes that run a given routing protocol and several wired nodes
partially meshed ( not all them are connected to the BS) . Could these wired
nodes use any routing protocol, or there is some contraints or problems for.
I have tried with the ns-2 basic LS protocol . It doesn't function.
The topology is the followin
M1 N2
* *
* *
M2 BS * * * * * N1 * N4
* *
* *
M3 N3
I activated LS for bstation, sinkNode, sinkNode1, sinkNode2 and sinkNode3
and assigned the relative cost for their links.
-------------------------------------------------------------------------------------------------------------
$ns rtproto LS $bstation $sinkNode $sinkNode1 $sinkNode2 $sinkNode3
$ns cost $bstation $sinkNode 1
$ns cost $sinkNode $bstation 1
$ns cost $sinkNode $sinkNode1 1
$ns cost $sinkNode1 $sinkNode 1
$ns cost $sinkNode $sinkNode2 2
$ns cost $sinkNode2 $sinkNode 2
$ns cost $sinkNode1 $sinkNode3 1
$ns cost $sinkNode3 $sinkNode1 1
$ns cost $sinkNode2 $sinkNode3 2
$ns cost $sinkNode3 $sinkNode2 2
-------------------------------------------------------------------------------------------------------------
and I used hierarchical routing adressing :
-------------------------------
$ns node-config -addressType hierarchical
AddrParams set domain_num_ 2 ;# domain number
lappend cluster_num 1 1 ;# cluster number
for each domain
AddrParams set cluster_num_ $cluster_num
#lappend eilastlevel 1 [expr ($nb_mn+1)] ;# number of nodes
for each cluster (1 for sink and one for mobile nodes + base station
lappend eilastlevel 4 [expr ($nb_mn+1)] ;# number of nodes
for each cluster (4 for sink and one for mobile nodes + base station
AddrParams set nodes_num_ $eilastlevel
#creates the sink node in first addressing space.
set sinkNode [$ns node 0.0.0]
set sinkNode1 [$ns node 0.0.1]
set sinkNode2 [$ns node 0.0.2]
set sinkNode3 [$ns node 0.0.3]
set sinkNode4 [$ns node 0.0.4]
for {set i 0} {$i < $nb_mn} {incr i} {
set wl_node_($i) [$ns node 1.0.[expr $i + 1]] ;# create the node
with given @.
$wl_node_($i) random-motion 0 ;# disable random
motion
$wl_node_($i) base-station [AddrParams addr2id [$bstation
node-addr]]
}
-------------------------------
The error message was :
--------------------------------------------------------------------------------------------------
wrong # args: should be "set varName ?newValue?"
while executing
"set nodeslist _o60 _o15 _o23 _o31 _o39"
("eval" body line 1)
invoked from within
"eval "set nodeslist $args""
(procedure "Agent/rtProto/LS" line 5)
(Agent/rtProto/LS init-all line 5)
invoked from within
"Agent/rtProto/LS init-all _o60 _o15 _o23 _o31 _o39"
("eval" body line 1)
invoked from within
"eval Agent/rtProto/$proto init-all $rtprotos_($proto)"
("foreach" body line 2)
invoked from within
"foreach proto [array names rtprotos_] {
eval Agent/rtProto/$proto init-all $rtprotos_($proto)
}"
invoked from within
"if [info exists rtprotos_] {
foreach proto [array names rtprotos_] {
eval Agent/rtProto/$proto init-all $rtprotos_($proto)
}
} else {
Agent/rtProto/St..."
(procedure "_o1899" line 3)
(RouteLogic configure line 3)
invoked from within
"[$self get-routelogic] configure"
(procedure "_o3" line 5)
(Simulator run line 5)
invoked from within
"$ns run"
------------------------------------------------------------------------------------
Could someone give me some idea, plz
best regards
Ramzi