LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 07-15-2010, 12:37 PM   #1
mate1984
LQ Newbie
 
Registered: Jul 2010
Posts: 6

Rep: Reputation: 0
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
 
Old 07-15-2010, 12:51 PM   #2
mojo72
LQ Newbie
 
Registered: Jul 2010
Posts: 5

Rep: Reputation: 0
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.
 
Old 07-16-2010, 01:59 AM   #3
mate1984
LQ Newbie
 
Registered: Jul 2010
Posts: 6

Original Poster
Rep: Reputation: 0
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.
 
Old 07-16-2010, 02:50 PM   #4
mate1984
LQ Newbie
 
Registered: Jul 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Wink

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
 
Old 07-16-2010, 03:58 PM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
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.
Attached Files
File Type: txt mate1984example.tcl.txt (685 Bytes, 2 views)

Last edited by knudfl; 07-16-2010 at 04:06 PM.
 
Old 07-17-2010, 06:34 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
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.
 
Old 07-18-2010, 04:40 AM   #7
mate1984
LQ Newbie
 
Registered: Jul 2010
Posts: 6

Original Poster
Rep: Reputation: 0
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.
 
Old 07-18-2010, 05:47 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
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.
 
Old 07-18-2010, 03:53 PM   #9
mate1984
LQ Newbie
 
Registered: Jul 2010
Posts: 6

Original Poster
Rep: Reputation: 0
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
 
Old 07-20-2010, 01:03 AM   #10
mate1984
LQ Newbie
 
Registered: Jul 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Wink

hi mates

i don't know how to thank you everything seems to be working just fine. thanks a lots
 
Old 10-22-2011, 07:06 AM   #11
yashu
LQ Newbie
 
Registered: Aug 2011
Posts: 25

Rep: Reputation: Disabled
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?

 
Old 10-22-2011, 09:09 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
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/ ? ?

.
 
Old 10-22-2011, 11:19 AM   #13
yashu
LQ Newbie
 
Registered: Aug 2011
Posts: 25

Rep: Reputation: Disabled
ns2

to perform otcl linkage

1) i have to exe ./configure
2)make
3) make clear

am trying to exe these commands
 
Old 05-03-2012, 03:31 AM   #14
yashu
LQ Newbie
 
Registered: Aug 2011
Posts: 25

Rep: Reputation: Disabled
obstacle in ns2

hi,

i want obstacle model in ns2.33,how can i add? please help me
 
Old 05-03-2012, 03:46 AM   #15
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
# 14.

Probably have a look here http://moment.cs.ucsb.edu/mobility/
> http://moment.cs.ucsb.edu/mobility/R...tacleModel-NS2

> Libraries http://moment.cs.ucsb.edu/mobility/libraries.html
> Plugins http://moment.cs.ucsb.edu/mobility/plugins.html
Don't know which ns2 it's for, but then again :
You can have as many versions of ns-allinone-2.xx as you want,
installed at the same time. But do not add any of them to a *PATH.

Other info : Google .. ns2 obstacle model ..

.

Last edited by knudfl; 05-03-2012 at 03:48 AM.
 
  


Reply

Tags
ns2 ns234, obstacle


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NS2.34 won't install on ubuntu 9.10 insync Linux - Wireless Networking 1 02-25-2010 02:34 AM
Can't run ns2.34 in ubuntu 8.10,urgently need help ritoban87 Linux - Networking 2 02-04-2010 07:40 PM
working with ns2 in Ubuntu 8.1 neeraj.dwivedi Linux - Newbie 5 11-16-2009 09:19 AM
[SOLVED] problem in installing ns2.33 in ubuntu 8.10 neeraj.dwivedi Linux - Newbie 18 09-12-2009 08:00 AM
NS2 2.33 allinone on Ubuntu Liz Mwaniki Linux - Newbie 1 01-26-2009 04:24 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration