Comments on Installing Network Simulator 2 (NS2) on Ubuntu 14.04

Network simulators are tools used to simulate discrete events in a network and which helps to predict the behaviours of a computer network. Generally the simulated networks have entities like links, switches, hubs, applications, etc. Once the simulation model is complete, it is executed to analyse the performance. Administrators can then customize the simulator to suit their needs. Network simulators typically come with support for the most popular protocols and networks in use today, such as WLAN,UDP,TCP,IP, WAN, etc.

65 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Jaspreet Kaur

I m currently working on SAODV in manet. Can you please mail me the source code of SAODV in ns2. In which hash chain and digital signature is being embedded into AODV. 

By: aaram

thank you so much. that was really helpful.

By: Mauricio

Excelent instructions. It works for me on Xubuntu.

By: mukesh verma

thanks a lot......

By: Pardeep Peddy

Perfect guide.... installed straight away.

Thanks

By: Dave Mc

Works perfectly on Ubuntu 15.04,,Excellent instructions!

By: punitha

  I could not save the file after making changes in the ls.h file. It is displaying a message as Could not save the file “/home/user/ns-allinone-2.35/ns-2.35/linkstate/ls.h”.You do not have the permissions necessary to save the file. Please check that you typed the location correctly and try again. Can someone help me ?

By: Ravi Kumar

Perfect guided of ns2 installation.

By: Akshay

My ./install is not working as given above. The image you provided doesnt match with mine.

Output for mine is 

.

.

.

.Makefile:1601: warning: overriding commands for target `/home/akshay/Desktop/Networking'

Makefile:1514: warning: ignoring old commands for target `/home/akshay/Desktop/Networking'

Makefile:1603: warning: overriding commands for target `/home/akshay/Desktop/Networking'

Makefile:1601: warning: ignoring old commands for target `/home/akshay/Desktop/Networking'

Makefile:1605: warning: overriding commands for target `/home/akshay/Desktop/Networking'

Makefile:1603: warning: ignoring old commands for target `/home/akshay/Desktop/Networking'

make: Circular /home/akshay/Desktop/Networking

make: Circular softs/ns-allinone-2.35/tcl8.5.10/unix/../macosx/configure

make: *** No rule to make target `softs/ns-allinone-2.35/tcl8.5.10/unix/../macosx/configure.ac', needed by `softs/ns-allinone-2.35/tcl8.5.10/unix/../macosx/configure'.  Stop.

tcl8.5.10 make failed! Exiting ...

For problems with Tcl/Tk see http://www.scriptics.com

 

By: pratibha

easy instructions.......thanks a lot.....

By: Pavan

Hey, I could install ns2 properly according to your steps! They even matched with snapshots associated with every command of yours. But when I restarted my system and tried giving 'ns' command, it says

"The program 'ns' is currently not installed. You can install it by typing:sudo apt-get install ns2"

I'll be very thankful if I get a response to my problem. :)

By: lichuhuang

Thank you!

By: Prasad

how to run NS2 on ubuntu

By: Ashish Malani

Thanks a lot !!

Very well explained

By: chandrabhan pradhan

Did not work in Ubuntu 15.04

 

By: ayoub sarvetani

thank you.

By: elmira

im working in vanet topic. in step 3 i have error and idont know how to fix it.please help me.

error schema: Reading package lists... Done

Building dependency tree       

Reading state information... Done

Package autoconf is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

 

E: Unable to locate package build-essential

E: Package 'autoconf' has no installation candidate

E: Unable to locate package automake

E: Unable to locate package libxmu-dev

By: lucas

thx a lot. It was of great help!

By: shehu

I followed your procedure but when I typed nam I got the following error: Segmentation fault(core dumped).

Kindly advice further.

Thanks

By: akhil pulimath

thankyou verymuch and very helpful

 

By: ABOLFAZL

hi

I've done all that has been saidUnfortunately, when I enter commands and files to be builtInside that no contentHelp me please

 

I enter the following commands I

#create a new simulator objectset ns [new Simulator]#open the nam trace fileset nf [open out.nam w]$ns namtrace-all $nf#define a 'finish' procedureproc finish {} {global ns nf$ns flush-trace#close the trace fileclose $nf#execute nam on the trace fileexec nam out.nam &exit 0}

#create two nodesset n0 [$ns node]set n1 [$ns node]#create a duplex link between the nodes$ns duplex-link $n0 $n1 1Mb 10ms DropTail

By: priya

my nam windowis not opening but did installation properly

By: vikash kumar

sir i have succesfully installed ns2 now how to open it please suggest me..

By: aimi19930326

hello ,when i do "na reconnect.tcl",it has a problem like this "

    (_o10 cmd line 1)

    invoked from within

"_o10 cmd get-bgp-agent"

    invoked from within

"catch "$self cmd $args" ret"

    invoked from within

"if [catch "$self cmd $args" ret] {

set cls [$self info class]

global errorInfo

set savedInfo $errorInfo

error "error when calling class $cls: $args" $..."

    (procedure "_o10" line 2)

    (SplitObject unknown line 2)

    invoked from within

"$n0 get-bgp-agent"

    invoked from within

"set bgp_agent0 [$n0 get-bgp-agent]"

    (file "reconnect.tcl" line 27)

"could you help me solve this problem ,thank you in advance ?

By: vi

thanks lots

By: RAM BHUSHAN

while installing mannasim in ns2.35 this error found

 

configure: error: Installation of tcl seems incomplete or can't be found automatically.Please correct the problem by telling configure where tcl isusing the argument --with-tcl=/path/to/package(perhaps after installing it),or the package is not required, disable it with --with-tcl=no.

By: Srikar

I have the same error as well while using ./configure

If you've found a solution, please let me know:email: [email protected] be of tremendous help!

By: Mariem

Hello 

I have the same problem when I run ./configure can you help me if you've found a solution and thanks a solution,

Mariem

By: Mariem Ben Rekhissa

Hello Sir,

I have the same problem when I run ./configure so can you help me please if you have found the solution and thanks in advance

By: karuppaiah

how to install ns2 in boss linux GNOME version 3.4.2

By: david

hi i received this message

make: gcc-4.4: Command not foundMakefile:91: recipe for target 'libotcl.a' failedmake: *** [libotcl.a] Error 127otcl-1.14 make failed! Exiting ...See http://www.isi.edu/nsnam/ns/ns-problems.html  

what do i? result of gcc --version is 5.2.1 or 5.2.1 20151010

By: Jyoti

jyoti@jyoti-Inspiron-N5110:~$ sudo su cd ~/ns-allinone-2.35/./installNo passwd entry for user 'cd'

By: Anup Patil

Can anyone tell me how to configure NAM after configuring above setting for visualization??

By: Vinayak

MakeFile.in opened as empty....! plz help me

By: Vaishali

@Vinayak May be you are also doing the same mistake which I was doing.

Check the path again its cd ns-allinone-2.35/otcl-1.14  and then type the command gedit Makefile.in

By: piyush09

Hello , I am facing this error, kindly resolve it 

config.status: creating Makefile

rm -f libotcl.a otcl.o

gcc-4.4 -c -g -O2 -DNDEBUG -DUSE_SHM -DHAVE_UNISTD_H=1 -I. -I/home/piyush/ns-allinone-2.35/include -I/home/piyush/ns-allinone-2.35/include -I/home/piyush/ns-allinone-2.35/include -I/include  otcl.c

make: gcc-4.4: Command not found

make: *** [libotcl.a] Error 127

otcl-1.14 make failed! Exiting ...

See http://www.isi.edu/nsnam/ns/ns-problems.html for problems

 

By: Sakshi Dubey

Awesome tutorial...very clear steps

By: Behzad

Perfect guide!.thank U alot

By: Gerald Nathan Balekaki

Well Documentated installation manual. i just done it perfectly simple because of your candid guide. Cheers

By: Adnan

Hi,Please guide me if i want to install some earlier version of NS 2.That is NS2-1b4.then there will be same process and pre-requisite or any different way please guide me...or from where i can get the details please

By: Afsah

Many thanks for guide. I have installed ns-2.31 on Ubuntu 16.04. When i write ns in the terminal, the % sign appears, but while writing nam on the terminal, following error occurs "segmentation fault (core dumped). Please suggest me the solution to rectify this. Thanks in advance

By: Anjaiah Induri

Hey Akshay! I've installed according to your steps. Everything was successful. After restarting the system I tried to run command ns in terminal, it shows the following response.

"The program 'ns' is currently not installed. You can install it by typing:sudo apt-get install ns2"

I'll be very thankful if I get a response to my problem. :)

By: thamizh

thank u so much bro

By: Sneha

Do NSG support heterogeneous transmission range?

 

By: Shwetha

I followed your procedure but when I typed nam I got the following error: Segmentation fault(core dumped).

Kindly advice further.

Thanks

By: Shwetha

Hello plz help me, i have installed properly but now getting error like segmentation fault(Core dumped), plz give me the solution for this..

Thanks in Advance.

By: Yanutomo

haii i'm new about ns2

currently i work in umts network, does this included with umts patch?

because i've search the umts patch and i can't find it, please someone help me

By: Leo

Thank you for the guidance. I was very helpful.

By: ankita

sir my nam file is not opening .when i write nam in in terminal then it shows segmentation fault .in desktop for example demo.nam is genrating.what should i do?

 

By: misbah

sir, i am a PG student, i am getting problem while installing xgraph nsnam and gnuplot. it's showing some segmentation error. kindly help me please.

By: pratiksha

i get segmentation eorror when i run nam file 

can you please help me in that

By: Armin

Im installing ns-2.35 on ubuntu 16.04, i got the following error:

============================================================

* Build OTcl-1.14

============================================================

./install: 489: ./install: ./configure: Permission denied

otcl-1.14 configuration failed! Exiting ...

Please check http://www.isi.edu/nsnam/ns/ns-problems.html

for common problems and bug fixes.

[email protected] // :/home/armin/ns-allinone-2.35# 

By: zannou

if ns not work ,you must restart computer the enter sudo su then ns

By: vijay sethupathi

ns2 is not installing due to the impropre network services

By: Ali Hussain Mir

works beautifully thanks,

is someone has already gcc installed then he may skip that step.

and while mentioning "CC=gcc-4.4" (if you have installed this) , you can write it like this "CC=gcc" only

it will work pretty fine thanks 

By: krishna

hey..! Thanks a lot, I am currently working on clustering algorithms of VANETS .Can you mail me if you have any sample codes with you

By: varma

 i am getting this error while installing ns2

autoconf has no installation candidate

automake has no insatllation candidate

what can i do

By: Bindeshwar

very nice demonstration

By: Alaa

alaa@alaa-virtual-machine:~$ sudo apt-get install build-essential autoconf automake libxmu-dev[sudo] password for alaa: Reading package lists... DoneBuilding dependency tree       Reading state information... Doneautoconf is already the newest version (2.69-9).automake is already the newest version (1:1.15-4ubuntu1).automake set to manually installed.build-essential is already the newest version (12.1ubuntu2).libxmu-dev is already the newest version (2:1.1.2-2).0 upgraded, 0 newly installed, 0 to remove and 90 not upgraded.alaa@alaa-virtual-machine:~$ sudo apt-get install gcc-4.4Reading package lists... DoneBuilding dependency tree       Reading state information... DonePackage gcc-4.4 is not available, but is referred to by another package.This may mean that the package is missing, has been obsoleted, oris only available from another sourceE: Package 'gcc-4.4' has no installation candidate

 

why the result dont match the picture

By: fatima

Hermoso.

 

Solo agregaría source ~/.bashrc despues del gedit ~/.bashrc  para validar las rutas.

 

 

Muchas gracias.

By: prathi

plz helpm me to fix this bug.

ns: finish: couldn't execute "nam": no such file or directory    while executing"exec nam p1.nam &"    (procedure "finish" line 4)    invoked from within"finish"

By: Praveen

it's too tough ,please help me also to solve this

By: Rudramurthy V C

thanks a lot.very good document.

By: Ruchitha

It helped me to complete my assignments. Thank you so much

By: nandhini

how to fix this error

 

CBR packet size = 1000

CBR interval = 0.0080000000000000002

ns: finish: couldn't execute "nam": no such file or directory

    while executing

"exec nam out.nam &"

    (procedure "finish" line 7)

    invoked from within

"finish"