Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
07-15-2010, 12:37 PM
|
#1
|
|
LQ Newbie
Registered: Jul 2010
Posts: 6
Rep:
|
can't get ns2.34 on ubuntu 8.04 to work
i am using ubuntu 8.04. i have installed ns-2.34. i extracted it in the directory /home/bambos. i then wrote the following lines of code at the end of the bash file.
# LD_LIBRARY_PATH
OTCL_LIB=/home/bambos/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/bambos/ns-allinone-2.34/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=/home/bambos/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/bambos/ns-allinone-2.34/bin:/your/path/ns-allinone-2.34/tcl8.4.18/unix:/your/path/ns-allinone-2.34/tk8.4.18/unix
NS=/home/bambos/ns-allinone-2.34/ns-2.34/
NAM=/home/bambos/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM
after this i run the command
source ~/.bashrc
in the terminal and then restarted my computer. after that i tried to run a program that i wrote by giving the command
ns example.tcl
in the terminal which gave the following error message:
example.tcl does not exist, try again
i then gave the command
$ns example.tcl
in the terminal and it gave the following error message:
bash: /home/bambos/ns-allinone-2.34/ns-2.34/example.tcl: Permission denied
what can possibly be going wrong? if you need more info on my problem please let me know in case i left something out.
thank you in advance guys
|
|
|
|
07-15-2010, 12:51 PM
|
#2
|
|
LQ Newbie
Registered: Jul 2010
Posts: 5
Rep:
|
Hi
Did you check the files' permissions? You didn't tell about that.
And BTW, if you 'source' your bash config file, there is no need to reboot.
|
|
|
|
07-16-2010, 01:59 AM
|
#3
|
|
LQ Newbie
Registered: Jul 2010
Posts: 6
Original Poster
Rep:
|
hi mojo
thank you for replying. no i did not check the files permissions. how can i do that?
i also validated it and it came up with
validate overall report: some portable tests failed:
./test-all-simple ./test-all-tcp ./test-all-testReno ./test-all-newreno ./test-all-sack ./test-all-tcpOptions ./test-all-tcpReset ./test-all-simple-full ./test-all-full ./test-all-testReno-full ./test-all-testReno-bayfull ./test-all-sack-full ./test-all-tcp-init-win ./test-all-tcpVariants ./test-all-LimTransmit ./test-all-aimd ./test-all-greis ./test-all-rfc793edu ./test-all-rfc2581 ./test-all-rbp ./test-all-sctp ./test-all-tcpLinux ./test-all-tcpHighspeed ./test-all-frto ./test-all-friendly ./test-all-realaudio ./test-all-ecn ./test-all-ecn-ack ./test-all-ecn-full ./test-all-quickstart ./test-all-diffusion3 ./test-all-smac ./test-all-manual-routing ./test-all-lan ./test-all-red ./test-all-adaptive-red ./test-all-red-pd ./test-all-rio ./test-all-vq ./test-all-rem ./test-all-gk ./test-all-pi ./test-all-cbq ./test-all-schedule ./test-all-rr ./test-all-monitor ./test-all-jobs ./test-all-intserv ./test-all-diffserv ./test-all-webtraf ./test-all-mip ./test-all-links ./test-all-linkstate ./test-all-mpls ./test-all-oddBehaviors ./test-all-WLtutorial ./test-all-wireless-infra ./test-all-wireless-infra-mobility ./test-all-wireless-shadowing ./test-all-wireless-lan-aodv ./test-all-wireless-gridkeeper ./test-all-wireless-diffusion ./test-all-wireless-lan-newnode ./test-all-wireless-lan-newnode-80211Ext ./test-all-source-routing ./test-all-misc ./test-all-tagged-trace ./test-all-message ./test-all-rng ./test-all-wpan ./test-all-energy ./test-all-snoop ./test-all-packmime ./test-all-delaybox ./test-all-tmix
some non-portable tests also failed:
./test-all-srm ./test-all-smac-multihop ./test-all-hier-routing ./test-all-algo-routing ./test-all-mcast ./test-all-vc ./test-all-session ./test-all-mixmode ./test-all-simultaneous ./test-all-webcache ./test-all-mcache ./test-all-plm ./test-all-wireless-tdma ./test-all-satellite
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
and after i tried to run the specific test it came up with
bash: ./test-all-TEST-NAME: No such file or directory
what do i do
thanks in advance
Last edited by mate1984; 07-16-2010 at 02:36 AM.
|
|
|
|
07-16-2010, 02:50 PM
|
#4
|
|
LQ Newbie
Registered: Jul 2010
Posts: 6
Original Poster
Rep:
|
hi again guys,
i think i managed to overcome the problem i had before. i used the command
chmod u+x filename
in the terminal and then run the following program
set ns [new Simultator]
set n0 [$ns node]
set n1 [$ns node]
$ns duplex-link $n0 $n1 1Mb 10ms DropTail
set tracefile [open out.tr w]
$ns trace-all $tracefile
set nf [open out.nam w]
$ns namtrace-all $nf
proc finish {}
{
global ns tracefile nf
$ns flush-trace
close $nf
close $tracefile
exec nam out.nam &
exit 0
}
$ns at 5.0 "finish"
$ns run
by typing $ns example.tcl in the terminal but i got the following errors.
/home/bambos/ns-allinone-2.34/ns-2.34/example.tcl: line 6: duplex-link: command not found
/home/bambos/ns-allinone-2.34/ns-2.34/example.tcl: line 9: trace-all: command not found
/home/bambos/ns-allinone-2.34/ns-2.34/example.tcl: line 12: namtrace-all: command not found
/home/bambos/ns-allinone-2.34/ns-2.34/example.tcl: line 14: proc: command not found
/home/bambos/ns-allinone-2.34/ns-2.34/example.tcl: line 16: global: command not found
/home/bambos/ns-allinone-2.34/ns-2.34/example.tcl: line 17: flush-trace: command not found
/home/bambos/ns-allinone-2.34/ns-2.34/example.tcl: line 18: close: command not found
/home/bambos/ns-allinone-2.34/ns-2.34/example.tcl: line 19: close: command not found
bambos@bambos-laptop:~/ns-allinone-2.34/ns-2.34$ Cannot connect to existing nam instance. Starting a new one...
nam: Unable to open the file "out.nam.nam"
can someone please tell me what went wrong?
thanks a lot mates
|
|
|
|
07-16-2010, 03:58 PM
|
#5
|
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2012.8, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 11,618
|
Welcome to LQ. ..  .. .. .. LQ Search → 'Tag Name' = ns2
Template and examples, post # 4 here
http://www.linuxquestions.org/questi...blem-726993/#4
And please use code tags: [/code] at text end, [code] at text begin.
http://www.linuxquestions.org/questi....php?do=bbcode
Your modified file is attached as "mate1984example.tcl.txt
( Formatting was changed. May not work as you intended ?
But it will display in nam.)
P.S. : I don't know, why your validation fails, usually no errors
with ns-allinone-2.34 at Ubuntu 8.04 Hardy. Will test it later.
Last edited by knudfl; 07-16-2010 at 04:06 PM.
|
|
|
|
07-17-2010, 06:34 AM
|
#6
|
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2012.8, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 11,618
|
ns-allinone-2.34 .. Ubuntu 8.04 Hardy
Required : libx11-dev , libxmu-dev , libxmu-headers , libxt-dev , libtool
And this may fix your issues ? :
sudo apt-get remove tcl8.3 tcl8.4 tcl8.5
.. Will prevent ns2 applications from compiling with any system tcl, tk.
(You can install tcl8.4 tk8.4 , when ns2 install and validate are finished.)
sudo apt-get install g++ libstdc++6 libstdc++6-4.2-dev libc6-dev
.. to be sure, they are updated.
'validate' result :
Code:
Test output agrees with reference output
All test output agrees with reference output.
Sat Jul 17 13:16:33 CEST 2010
These messages are NOT errors and can be ignored:
warning: using backward compatibility mode
This test is not implemented in backward compatibility mode
validate overall report: all tests passed
Last edited by knudfl; 07-18-2010 at 05:50 AM.
|
|
|
|
07-18-2010, 04:40 AM
|
#7
|
|
LQ Newbie
Registered: Jul 2010
Posts: 6
Original Poster
Rep:
|
hi again guys,
first of all thanks for the time and effort you put in helping me.
unfortunately i still can't get it to run. dear knudfl it seems that i don't have
libx11-dev , libxmu-dev , libxmu-headers , libxt-dev , libtool.
how can i get them i case that is what is causing all my problems. also i gave the command
sudo apt-get remove tcl8.3 tcl8.4 tcl8.5
and i got the following
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package tcl8.3 is not installed, so not removed
Package tcl8.4 is not installed, so not removed
Package tcl8.5 is not installed, so not removed
The following packages were automatically installed and are no longer required:
linux-headers-2.6.24-19-generic libdns35 linux-headers-2.6.24-19
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
i then proceeded to giving the command
sudo apt-get install g++ libstdc++6 libstdc++6-4.2-dev libc6-dev
and got the following
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++ is already the newest version.
libstdc++6 is already the newest version.
libstdc++6-4.2-dev is already the newest version.
libc6-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
i also tried to install
tcl8.4/tk8.4
and i got
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Release 'tk8.4' for 'tcl8.4' was not found
i still can get any program to run. is it advisable to uninstall ns2 and reinstall it again in case something went wrong there or i didn't get all the file necessary?
again thanks a lot for your time mate.
|
|
|
|
07-18-2010, 05:47 AM
|
#8
|
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2012.8, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 11,618
|
The command is of course :
sudo apt-get install tcl8.4 tk8.4
Also easier to find valid package names, by doing this first:
sudo apt-cache search tcl8.4
.. Or use the "package search site"
Example : http://packages.ubuntu.com/hardy/tcl8.4
( Or use the search in 'synaptic )
... Sorry, if I confused you with the tcl/tk "word".
But : Do not install tcl8.4 tk8.4 before building ns2.
I do not know, what your 'validation' issue is now.
Suggest : Delete all ns-allinone-2.34 and start from scratch,
and : cd ns-allinone-2.34/ && ./install
..
Last edited by knudfl; 07-18-2010 at 05:53 AM.
|
|
|
|
07-18-2010, 03:53 PM
|
#9
|
|
LQ Newbie
Registered: Jul 2010
Posts: 6
Original Poster
Rep:
|
hi guys,
i have just reinstalled ns 2.34. the validation issue was overcome but i am still not able to run a single code with the same errors. every time i give the command
ns myfile.tcl
it keeps telling my that no such file or directory exists. on the other hand if i change the command to
$ns myfile.tcl
it gives the error permission denied.
nothing seems to be happening. any suggestions.
thanks a lot again for your time
|
|
|
|
07-20-2010, 01:03 AM
|
#10
|
|
LQ Newbie
Registered: Jul 2010
Posts: 6
Original Poster
Rep:
|
hi mates
i don't know how to thank you everything seems to be working just fine. thanks a lots
|
|
|
|
10-22-2011, 07:06 AM
|
#11
|
|
LQ Newbie
Registered: Aug 2011
Posts: 24
Rep: 
|
make command error
hello
am getting problem with ./configure getting error like this
/ns-allinone-2.34/ns-2.34$ ./configure
./configure: line 1520: config.log: Permission denied
./configure: line 1530: config.log: Permission denied
i tried to enable permission its denied? how can solve this?

|
|
|
|
10-22-2011, 09:09 AM
|
#12
|
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2012.8, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 11,618
|
Post #12, @yashu.
Install ns-allinone-2.34 in /home/yashu/ (Or any folder in /home/yashu/)
Then there should be no more permission issues.
By the way : Why are you using './configure' in ns-2.34/ ? ?
.
|
|
|
|
10-22-2011, 11:19 AM
|
#13
|
|
LQ Newbie
Registered: Aug 2011
Posts: 24
Rep: 
|
ns2
to perform otcl linkage
1) i have to exe ./configure
2)make
3) make clear
am trying to exe these commands
|
|
|
|
05-03-2012, 03:31 AM
|
#14
|
|
LQ Newbie
Registered: Aug 2011
Posts: 24
Rep: 
|
obstacle in ns2
hi,
i want obstacle model in ns2.33,how can i add? please help me
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:11 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|