PDA

View Full Version : Help with ns-2


squared
May 21st, 2007, 05:30 PM
I live in southern Maryland. I'm trying to get ns-2 to run on UBUNTU for my dissertation. It's been a while since I've used UNIX or C++ and am struggling with it. I got it to install and verify successfully, but when I type 'ns' it looks like it is pointing to 'host'. When I type man ns, it seems like it gives me the info for host. host is not aliased with ns, and I can't figure out what to do short of re-installing it.

Iokua
May 21st, 2007, 09:37 PM
I'm not familiar with ns-2 so I can't help you there, but I recommend that you post this in the help section of the forums. You're much more likely to reach a wider audience and, hopefully, find a solution.

squared
May 21st, 2007, 10:14 PM
Thanks, I've posted it twice there and got no response. I'm not sure it's related to ns-2, but that the term 'ns' is somehow interpreted as 'host'. I get the same response from the terminal when I type either one. Is there another way that Linux binds user defined terms with system defined commands...like alias, only another way? I used to be very familiar with VMS and DOS both, but not with Linux. There has to be a script file that is executing on login/startup that associates ns with host, but I have no clue where to look.

Iokua
May 22nd, 2007, 10:49 AM
Thanks, I've posted it twice there and got no response. I'm not sure it's related to ns-2, but that the term 'ns' is somehow interpreted as 'host'. I get the same response from the terminal when I type either one. Is there another way that Linux binds user defined terms with system defined commands...like alias, only another way? I used to be very familiar with VMS and DOS both, but not with Linux. There has to be a script file that is executing on login/startup that associates ns with host, but I have no clue where to look.

I'm not sure I understand exactly what you mean, but are you having trouble executing the program? If so, the current working directory is not generally included in PATH by default, so to execute a program or script, you have to include it, as in:

./ns

But this will only work if the program you're trying to execute is in your present working directory. If it's somewhere else, you need to include the path to it.

Your problems with the manual may be the result of "ns" (nameserver) being considered a synonym for "host." That may explain why man brings up entries for host. I'm not on my Ubuntu machine right now so I can't test this. If you're looking for documentation specifically for ns-2, I would suggest trying:

apropos ns-2

Or you can check the website: http://www.isi.edu/nsnam/ns/

phegdepatil
September 22nd, 2007, 11:01 AM
I have Ubuntu 7.04 Feisty Fawn OS loaded on my laptop and now I have installed ns2.31 (network simulator) using ns2allinone tar file from sourceforge.com, I have followed all the instructions given in it for installation. But when I try to run ns from the prompt it gives NameServer not responding message. kindly help me.

Pratidnya.

aptenix
September 24th, 2007, 10:37 AM
I saw this after a bit of Googling:
http://www.dii.unimo.it/wiki/index.php/The_Network_Simulator_-_NS_2

Sakthivel
February 11th, 2008, 11:38 AM
Hi ,
I am doing project in ns2 simulator...
Actually i have installed ns2 in Windows XP...
How to make llinkage between C++ ie.,back end and OTCL ie., front end..
How to define protocol in back end ..
Can you give me some examples that uses both C++ and OTCl ...

Ayeshaaltaf
May 4th, 2008, 04:52 PM
I live in southern Maryland. I'm trying to get ns-2 to run on UBUNTU for my dissertation. It's been a while since I've used UNIX or C++ and am struggling with it. I got it to install and verify successfully, but when I type 'ns' it looks like it is pointing to 'host'. When I type man ns, it seems like it gives me the info for host. host is not aliased with ns, and I can't figure out what to do short of re-installing it.

well i had experiances with the same problem for last 4 dayz now Alhumdulillah it is solved.. well wahat u have to do is ...
when u get the message to install "udo apt-get install host" DONT DO THIS
if u have already installed the host then u should remove it by using the command " sudo apt-get remove host"
then u have to reinstall the NS by using comand "./install" in the curent directory of NS..
plz do reply me if it works
best of luck

rizalutm
August 12th, 2008, 11:34 PM
Hi, I'm in malaysia, study at University Technology of Malaysia - new user ubuntu and also NS2, for my dissertation I will use NS2. I have install NS2 in ubuntu, but when i want to run NS2 with command $ ns, I cannot, because ns in ubuntu, command for name server, anybody can help me???
tq

relikya
October 11th, 2008, 10:51 PM
hi community, i have a similar problem with my ns2 on ubuntu 8.04.

I don't know what's the problem, i guess the path is ok, my message:

Usage: host [-v] [-a] [-t querytype] [options] name [server]
Listing: host [-v] [-a] [-t querytype] [options] -l zone [server]
Hostcount: host [-v] [options] -H [-D] [-E] [-G] zone
Check soa: host [-v] [options] -C zone
Addrcheck: host [-v] [options] -A host
Listing options: [-L level] [-S] [-A] [-p] [-P prefserver] [-N skipzone]
Common options: [-d] [-f|-F file] [-I chars] [-i|-n] [-q] [-Q] [-T] [-Z]
Other options: [-c class] [-e] [-m] [-o] [-r] [-R] [-s secs] [-u] [-w]
Special options: [-O srcaddr] [-j minport] [-J maxport]
Extended usage: [-x [name ...]] [-X server [name ...]]


I edit the path (bashrc) with the following lines:

# LD_LIBRARY_PATH
OTCL_LIB=/home/relikya/ns-allinone-2.33/otcl-1.13
NS2_LIB=/home/relikya/ns-allinone-2.33/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LI B
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$X11_LIB:$USR_LOC AL_LIB

# TCL_LIBRARY
TCL_LIB=/home/relikya/ns-allinone-2.33/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/relikya/ns-allinone-2.33/bin
XGRAPH=$XGRAPH:/home/relikya/ns-allinone-2.33/tcl8.4.18/unix
XGRAPH=$XGRAPH:/home/relikya/ns-allinone-2.33/tk8.4.18/unix
NS=/home/relikya/ns-allinone-2.33/ns-2.33/
NAM=/home/relikya/ns-allinone-2.33/nam-1.13/
PATH=$PATH:$XGRAPH:$NS:$NAM

or these lines

NS_HOME=/home/relikya/ns-allinone-2.33
export NS_HOME
PATH=$PATH:$NS_HOME/bin
export PATH

and they show me the same problem


I appreciate your help

neha21
September 1st, 2009, 01:53 AM
I'm also facing the same problem while running ns in Ubuntu......

Usage: host [-v] [-a] [-t querytype] [options] name [server]
Listing: host [-v] [-a] [-t querytype] [options] -l zone [server]
Hostcount: host [-v] [options] -H [-D] [-E] [-G] zone
Check soa: host [-v] [options] -C zone
Addrcheck: host [-v] [options] -A host
Listing options: [-L level] [-S] [-A] [-p] [-P prefserver] [-N skipzone]
Common options: [-d] [-f|-F file] [-I chars] [-i|-n] [-q] [-Q] [-T] [-Z]
Other options: [-c class] [-e] [-m] [-o] [-r] [-R] [-s secs] [-u] [-w]
Special options: [-O srcaddr] [-j minport] [-J maxport]
Extended usage: [-x [name ...]] server [name ...]]


I edit the path (bashrc) with the following lines:

# LD_LIBRARY_PATH
OTCL_LIB=/home/user/ns-allinone-2.33/otcl-1.13
NS2_LIB=/home/user/ns-allinone-2.33/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LI B
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$X11_LIB:$USR_LOC AL_LIB

# TCL_LIBRARY
TCL_LIB=/home/user/ns-allinone-2.33/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/user/ns-allinone-2.33/bin
XGRAPH=$XGRAPH:/home/user/ns-allinone-2.33/tcl8.4.18/unix
XGRAPH=$XGRAPH:/home/user/ns-allinone-2.33/tk8.4.18/unix
NS=/home/user/ns-allinone-2.33/ns-2.33/
NAM=/home/user/ns-allinone-2.33/nam-1.13/
PATH=$PATH:$XGRAPH:$NS:$NAM

PLz help me.....

Turin36
October 28th, 2009, 01:53 PM
Hello everybody,

I'm student and i have to make a project to compare two protocols in NS2,
MRSVP and M-YESSIR. Does anybody knows were i can find that patces?

Thanks a lot.
Constantine

pixel05
November 7th, 2009, 01:44 PM
i faced the same problem..
did the following and it got solved

>found which ns process was running by typing- which ns
>it showed /usr/bin/ns
>removed ns from /usr/ns (rm ns)

then came back to the original directory and successfully ran $ns to get %