ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
( 1. The Linux, you use : Debian 5 Lenny ? )
2. ns2 version, like ' ns-allinone-2.34 '.
3. The directory and files in question.
... Like ns-allinone-2.34/ns-2.34/tcl/xxx/xx.
4. The command, you are trying to use ?
5. The exact code used by that command ?
6. The error message ?
7. A link, an URL with info about the protocol in question. Link layer ?
With those things made clear, somebody may have an answer,
or can (may be) point to someone familiar with the protocols,
you are working at.
..
i am using ns 2.27..
in lenny 5.
ok, i resolved the problem.
but now, i want ns2.34 with LEACH routing protocol for sensor network simulation.
Can you help me in this matter......
Distribution: pclos2010.12, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 9,308
Rep:
Message from @debanga :
Quote:
checking system version (for dynamic loading)... ./configure: 1:
Syntax error: Unterminated quoted string
tcl8.3.2 configuration failed! Exiting ...
? Which version of ns-allinone-2.xx are you trying to compile ? ? ?
Old tcl , tk , otcl , tclcl cannot be compiled on Debian (or Ubuntu.)
The oldest for Debian = ns-allinone-2.27, using tcl etc. from 2.34.
The install instructions are here, post #3 : http://www.linuxquestions.org/questi...10-a-782356/#3
'ns-allinone-2.26' : Any other Linux, e.g. Fedora or CentOS.
'ns-allinone-2.1x' : CentOS 3.9 only.
Please read post # 2 again : Says 'LQ Search' , "Tag Name" = ns2
( ns226 posts are tagged too.)
..
Distribution: pclos2010.12, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 9,308
Rep:
New message by email from @debanga :
Quote:
Hi I'm installing ns2.29.3 in ubuntu 9.10 for mannasim framework....
but im getting this problem.....
otcl.o: In function `Otcl_Init':
/home/dgo/ns-allinone-2.29/otcl-1.11/otcl.c:2284:
undefined reference to `__stack_chk_fail_local'
ld: libotcl.so: hidden symbol `__stack_chk_fail_local' isn't defined
ld: final link failed: Nonrepresentable section on output
make: *** [libotcl.so] Error 1
otcl-1.11 make failed! Exiting ...
Edit some 'Makefile.in' :
otcl-1.11/, line 7 : CC = gcc-4.1
tclcl-1.17/, line 40 : CC = gcc-4.1
tclcl-1.17/, line 41 : CPP = g++-4.1
ns-2.29/ , line 36 : CC = gcc-4.1
ns-2.29/ , line 37 : CPP = g++-4.1
nam-1.11/, line 44 : CC = gcc-4.1
nam-1.11/, line 45 : CPP = g++-4.1
Do 'make clean' in otcl-1.11/ and next delete the 'Makefile'.
Now ./install will work.
..
I am a novice in NS2......... and i am trying to run AODV script,
these error occur everytime i execute this code
please help!
% invalid command name "-llType"
% invalid command name "-macType"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# wireless-aodv.tcl
# A 3 nodes example for ad hoc simulation with AODV
# Define options
set val(chan) Channel/WirelessChannel;# channel type
set val(prop) Propagation/TwoRayGround;# radio-propagation model
set val(netif) Phy/WirelessPhy ;# network interface type
set val(mac) Mac/802_11 ;# MAC type
set val(ifq) Queue/DropTail/PriQueue ;# interface queue type
set val(ll) LL ;# link layer type
set val(ant) Antenna/OmniAntenna ;# antenna model
set val(ifqlen) 50 ;# max packet in ifq
set val(nn) 3 ;# number of mobilenodes
set val(rp) AODV ;# routing protocol
set val(x) 500 ;# X dimension of topography
set val(y) 400 ;# Y dimension of topography
set val(stop) 150 ;# time of simulation end
set ns [new Simulator]
set tracefd [open simple.tr w]
set namtrace [open simwrls.nam w]
$ns trace-all $tracefd
$ns namtrace-all-wireless $namtrace $val(x) $val(y)
proc stop {} {
global ns tracefd namtrace
$ns flush-trace
close $tracefd
close $namtrace
}
# set up topography object
set topo [new Topography]
$topo load_flatgrid $val(x) $val(y)
create-god $val(nn)
# Create nn mobilenodes [$val(nn)] and attach them to the channel.
set chan_1_ [new $val(chan)]
# configure the nodes
$ns node-config -adhocRouting $val(rp) \
-llType $val(ll) \
-macType $val(mac) \
-channel $chan_1_ \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON \
-macTrace OFF \
-movementTrace ON \
for {set i 0} {$i <$val(nn) } { incr i } {
set node_($i) [$ns node]
}
# Provide initial location of mobilenodes
$node_(0) set X_ 5.0
$node_(0) set Y_ 5.0
$node_(0) set Z_ 0.0
$node_(1) set X_ 490.0
$node_(1) set Y_ 285.0
$node_(1) set Z_ 0.0
$node_(2) set X_ 150.0
$node_(2) set Y_ 240.0
$node_(2) set Z_ 0.0
# Generation of movements
#$ns at 10.0 “$node_(0) setdest 250.0 250.0 3.0”
#$ns at 15.0 “$node_(1) setdest 45.0 285.0 5.0”
#$ns at 110.0 “$node_(0) setdest 480.0 300.0 5.0”
# Set a TCP connection between node (0) and node (1)
set tcp [new Agent/TCP/Newreno]
$tcp set class_ 2
set sink [new Agent/TCPSink]
$ns attach-agent $node_(0) $tcp
$ns attach-agent $node_(1) $sink
$ns connect $tcp $sink
set ftp [new Application/FTP]
$ftp attach-agent $tcp
$ns at 10.0 “$ftp start”
# Define node initial position in nam
for {set i 0} {$i <$val(nn)} { incr i } {
# 30 defines the node size for nam
$ns initial_node_pos $node_($i) 30
}
# Telling nodes when the simulation ends
for {set i 0} {$i <$val(nn) } { incr i } {
$ns at $val(stop) “$node_($i) reset”;
}
# ending nam and the simulation
$ns at $val(stop) “$ns nam-end-wireless $val(stop)”
$ns at $val(stop) “stop”
$ns at 150.01“puts “end simulation” ; $ns halt”
guys the problem llType appears since the program has TAB space between them so remove those space and then try it and please try to type the program do not just copy form sites.
Last edited by udayvikram; 02-19-2011 at 06:28 AM.
I need to simulate a mobility scenario that needs MIH and SIP together. I installed ns2.27 on my Ubuntu 10.04 and installed ns2.27 on it, according to your good guides and finally I could install NIST SIP and RUI Prior SIP on it.
but when I want to install NIST MIH, I seen that it needs ns2.29 with gcc-4.1!!! I can't install ns2.29 and NIST MIH according above helps.
I become confused. What I must do for using both in one simulation. Can anybody help me, please!
Distribution: pclos2010.12, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 9,308
Rep:
fahimeh_ak, post # 12 : Please start a new thread.
( This one has poor formatting. ( Reported )).
And I will have a look at "ns2.29 and NIST MIH".
Also : Please provide links to NIST + MIH files
and to their documentation.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.