LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   error while assigning mobile nodes in ns-2 (https://www.linuxquestions.org/questions/linux-networking-3/error-while-assigning-mobile-nodes-in-ns-2-a-308213/)

hari_mj23 03-31-2005 09:35 AM

error while assigning mobile nodes in ns-2
 
hi
i totally new to linux and network simulator so i have absolutely no clue as to what this error means. when i try to initialize a few mobile nodes in network simulator 2 i get a few errors with the node-config statement

this is my program code :

$ns_ node-config -adhocRouting $val(adhocRouting) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-channelType $val(chan) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace OFF \
-macTrace ON

the error i get is :

num_nodes is set 10
can't read "val(ll)": no such element in array
while executing
"$ns_ node-config -llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) ..."
(file "wireless.tcl" line 19)

any kind of suggestions r welcome as i am totally stumped. thanking you

hari

kexplore 06-03-2009 02:48 PM

Same Problem
 
Hey, I was looking for help with the same problem and I came across your thread.

Did you solved your problem? I will be glad if you can please provide me the solution you got with your problem !!!!

selmanhizal 02-16-2021 05:08 AM

Running Wireless Simulations in ns
 
Hi,

You will define your options in your TCL file as follows.

# ======================================================================
# Define options
# ======================================================================
set val(chan) Channel/WirelessChannel ;# channel type
set val(prop) Propagation/TwoRayGround ;# radio-propagation model
set val(ant) Antenna/OmniAntenna ;# Antenna type
set val(ll) LL ;# Link layer type
set val(ifq) Queue/DropTail/PriQueue ;# Interface queue type
set val(ifqlen) 50 ;# max packet in ifq
set val(netif) Phy/WirelessPhy ;# network interface type
set val(mac) Mac/802_11 ;# MAC type
set val(rp) DSDV ;# ad-hoc routing protocol
set val(nn) 2 ;# number of mobilenodes

Also you will find detailed example from https://www.isi.edu/nsnam/ns/tutorial/nsscript5.html website.

Have a nice simulations...


All times are GMT -5. The time now is 04:09 AM.