LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-28-2015, 01:50 AM   #1
sims2801
Member
 
Registered: Aug 2012
Posts: 50

Rep: Reputation: Disabled
to install different ns2 versions on my system


hello kudfl,

I was working on ns2.32 . But now i require ns2.34 also . I read some of threads and found it is possible to have two diffrent ns2 versions on the same machine.
Installed ns2.32 and ns2.34 in diffrent directories.
Installed successfully . when i type ns % sign appears . But i dont know which ns version it is running ?

i read ur thread 2 on the following link
http://www.linuxquestions.org/questi...ne-4175503576/

so i delete the path varibale for ns2.32 from bashrc file .
and did the following
ns-2.32/ : $ cp ns ns-orig
cp ns-orig /usr/local/bin/
but it is giving me error : permission denied .

working on ubuntu 12.04
plz advise further

rgds
sims
 
Old 04-28-2015, 05:29 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
You can have as many ns-allinone-2.xx as you want, on the same OS.
( I have about 170 on one OS ! )

"$ cp ns-orig /usr/local/bin/" is wrong.
Right is : $ sudo cp ns-orig /usr/local/bin/

As all simulation files.tcl can be run with $ ns-any-name
.. you are supposed to save all the 'ns' executable`s as e.g. :
/usr/local/bin/{ ns, ns-orig, ns232, ns234, ns232-<protocol>, ns234-<protocol> }.

-
 
Old 05-04-2015, 11:14 PM   #3
sims2801
Member
 
Registered: Aug 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
thanks a lot.
My problem resolved.

Is there a need to store ns path in bashrc file . directly we can run our programs with ns232 or ns234 command .
 
Old 05-05-2015, 08:13 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Re #3.
Quote:
Is there a need to store ns path in bashrc file ?
No. The advice to do so, is an old text (~1999),
from a time when students used the 'University Computers',
and thus had no write access to /usr/.
Today we run 'make install', and get /usr/local/bin/ns ,
.. or we copy ns-<any-name> to usr/local/bin/.

The executable ns (and ns-new-name) is hard coded to know the library location:
ns-allinone-2.xx/{ bin/tcsh8* , lib/*/* }.

Xgraph path : $ sudo apt-get install xgraph
Nam path : No usable 'nam' packages from Ubuntu, get one here ...
http://www.linuxquestions.org/questi...-4175524760/#2

-
 
Old 05-06-2015, 11:31 PM   #5
sims2801
Member
 
Registered: Aug 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
thanks

could you please help me

I want to make a new protocol in ns2. Could you please tell me "how a simulation tcl script would be executed internally in ns2". That is how aodv.cc would be called from a simulation script.
Although we define AODV as Val(rp) , but recv would be called or command function or anything else
In command function , we write argv[1] == "start" . is it same as "$cbr start" .

I would be very greatful if you provide me some link or give some insights under this.
 
Old 05-07-2015, 03:38 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Re #5.
Quote:
"how a simulation tcl script would be executed internally in ns2"
There is no internal (ns-2.xx/), so far concerns a simulation.
Everything {c++, otcl, tcl/lib/*} is compiled into one file : The executable 'ns'.

For an 'ns' from an ns-allinone-2.xx/ to run, these tcl files are used :
ns-allinone-2.35/{ bin/tcsh8*, lib/*/* }.
(Some simulations will also use ns-2.xx/tcl//<tcl-"libraries">, //"scene-files".)

Quote:
.. define AODV as val(rp) ,
but recv would be called or command function or anything else .
In command function , we write argv[1] == "start" . is it same as "$cbr start".
I don't know. See http://www.isi.edu/nsnam/ns/doc/index.html
And ... you can ask here
https://stackoverflow.com/questions/tagged/ns2

-

Last edited by knudfl; 05-07-2015 at 03:42 AM.
 
Old 05-07-2015, 04:26 AM   #7
sims2801
Member
 
Registered: Aug 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
I want to ask the following --
Suppose we have a simulation script "wireless.tcl " . In this file we create agents and invoking mobility file , traffic file cbr etc. ....... when we run this .tr and .nam file would be created.
We also have in ns2.32 or in any ns folder --> .cc files , .h files , packet files etc. How this functionality automatically would be called from a tcl script file.

if anyone else can help , kindly do

thanks & regards
 
Old 05-07-2015, 05:23 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Re #7.

Quote:
ns-2.32/ { .cc files , .h files , packet files etc. }.
? How this functionality automatically would be called from a tcl script file.
See post #6 : Usually you will save the following :
1) /usr/local/bin/{ ns, ns-orig, ns232, ns-<any-name> }.
2) ns-allinone-2.32/{ bin/, lib/ }.
3) Examples, with the connected (tcl) files : Saved in a random location.
.... I.e. no files are called, it's all inside the executable "ns".


There are ways to call a file outside 'ns', but I have never seen it in use.
. http://www.linuxquestions.org/questi...cl-4175464805/
. http://www.linuxquestions.org/questi...9/#post4094259
< http://www.linuxquestions.org/questi...ines-813129/#7
. http://wiki.tcl.tk/1491
C++ http://cpptcl.sourceforge.net/doc/quickstart.html
. http://wiki.tcl.tk/13040
. http://cpptcl.sourceforge.net/

-

Last edited by knudfl; 05-07-2015 at 05:26 AM.
 
  


Reply

Tags
ns2, ns2-c++-tcl


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
how to install both ns2.28 and ns2.34 versions on ubuntu 10.04? popoaung Linux - Software 3 06-10-2013 05:52 PM
compatible Fedora versions for ns2.29.3 aarcha Linux - Newbie 1 01-04-2013 05:17 AM
can i install two or more intel compilers with different versions on same system?? sonu kumar Linux - Newbie 3 01-17-2010 05:37 AM
LXer: HOWTO Install Multiple Wine Versions on One System LXer Syndicated Linux News 0 12-05-2009 06:21 PM
Install ns2 in my system alaios Ubuntu 1 05-28-2008 03:09 PM


All times are GMT -5. The time now is 04:44 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration