In this DIY we will learn how to install Network Simulator (NS)-2.35 in Ubuntu 13.10 OR Ubuntu 14.04. If you found yourself here then I assume you already know about the NS, so I will skip the introduction part. And if you don't then you may want to follow this link.
Step 1: Setting up the Prerequisites
1. First of all, download Network Simulator (NS-2.35) from here.I assume you have downloaded it into your '/home/user_name/Documents' directory.
2 [Optional]. Now we have to update the Ubuntu with its latest components. Open up a terminal and run these commands:
Make sure that your Ubuntu is fully updated ( i.e. there should be no pending updates in your Ubuntu Software Center and in Software Updater).
3. Before installing the NS we have to install some essential packages required by the NS. So run the following commands:
Step 2: Extract and Install NS
1. Extract the downloaded NS package either using the right click context menu "Extract here" or using the following commands from a terminal:
2. After extracting the "ns-allinone-2.35" folder, open up the file "/ns-allinone-2.35/ns-2.35/linkstate/ls.h" in an editor. You can do it either from the terminal or from the file explorer (Nautilus). We have to make some changes in the ls.h file else it will show an error while installing the NS. Once you have opened the file move to the line 137 and replace the erase (image 1) with this—>erase (image 2) and save the file.
NOTE: If you don't make the above stated change then you will see an error while installing the NS (image 3).
3. Now its time to finally install the NS. Open up a terminal and move to the directory where you have extracted the package, in our case its '/home/user_name/Documents' and install NS using the following commands (image 4):
It will take around 15 minutes so have patience.
Step 3: Set the Environment Variables
1. Assuming everything went well in the previous step and you have successfully installed your NS. Now that NS is installed, there are some environment variables that need to be added to your profile. This can be done by editing the .bashrc file. Open a new terminal and open the file using:
NOTE: You may want to create a backup of the .bashrc before editing, the easiest way is to copy the file to a different location. Later you can replace the edited .bashrc with the copied one in case something goes sideways or if you want to remove the NS.
2. Add the following lines AT THE END of the file. Be sure to change "/path_to" to the path of where you have extracted the NS (e.g. '/home/user_name/Documents').
Save the file and restart the system, alternatively you can just reload the .bashrc as:
Step 4: Validate the Installation
You need to validate NS to check if everything is OK but keep in mind that it will take a lot of time (about 1:30 hrs). Open up a terminal and move to the directory ‘/home/user_name/Documents/ns-allinone-2.35/ns-2.35/' and run:
And That is it ! You can now run ns from a terminal window by executing: ns
If you received the "%" sign, it means that NS is running (image 5). Congratulations !!
* Uninstalling the NS
If you want to remove the NS from your system then follow these steps:
* Some Common Problems
1. Many people are getting the following error when they run the ns after the installation:
If you get this error then kindly ensure that you have set the path (as in step 3) correctly and try restarting the system. If the error persists then try running the ns from '/ns-allinone-2.35/ns-2.35/bin/'.
You can start working on NS now, the standard Marc Greis' tutorial on NS can be found here. Another tutorial is 'NS by example' by Jae Chung and Marc Claypool, and is available here.
P.S.
I am not working on ns anymore, if you face any problems then feel free to contact, comment but it's guaranteed that I would be able to help you. Also go through the comments before making your query. Thank you!
Have Fun !!
— * — * — * — * —
Step 1: Setting up the Prerequisites
1. First of all, download Network Simulator (NS-2.35) from here.I assume you have downloaded it into your '/home/user_name/Documents' directory.
2 [Optional]. Now we have to update the Ubuntu with its latest components. Open up a terminal and run these commands:
1 | sudo apt-get update |
2 | sudo apt-get dist-upgrade |
3 | sudo apt-get update |
Make sure that your Ubuntu is fully updated ( i.e. there should be no pending updates in your Ubuntu Software Center and in Software Updater).
3. Before installing the NS we have to install some essential packages required by the NS. So run the following commands:
1 | sudo apt-get install build-essential autoconf automake |
2 | sudo apt-get install tcl8.5-dev tk8.5-dev |
3 | sudo apt-get install perl xgraph libxt-dev libx11-dev libxmu-dev |
4 | sudo apt-get install gcc-4.4 |
Step 2: Extract and Install NS
1. Extract the downloaded NS package either using the right click context menu "Extract here" or using the following commands from a terminal:
1 | cd /home/user_name/Documents |
2 | tar -xvzf ns-allinone-2.35.tar.gz |
2. After extracting the "ns-allinone-2.35" folder, open up the file "/ns-allinone-2.35/ns-2.35/linkstate/ls.h" in an editor. You can do it either from the terminal or from the file explorer (Nautilus). We have to make some changes in the ls.h file else it will show an error while installing the NS. Once you have opened the file move to the line 137 and replace the erase (image 1) with this—>erase (image 2) and save the file.
Image 1. Replace erase. |
Image 2. With this->erase. |
NOTE: If you don't make the above stated change then you will see an error while installing the NS (image 3).
Image 3. Error (Please Follow the Previous Step). |
3. Now its time to finally install the NS. Open up a terminal and move to the directory where you have extracted the package, in our case its '/home/user_name/Documents' and install NS using the following commands (image 4):
1 | cd /home/user_name/Documents/ns-allinone-2.35 |
2 | sudo ./install |
It will take around 15 minutes so have patience.
Image 4. Installation in Progress. |
Step 3: Set the Environment Variables
1. Assuming everything went well in the previous step and you have successfully installed your NS. Now that NS is installed, there are some environment variables that need to be added to your profile. This can be done by editing the .bashrc file. Open a new terminal and open the file using:
1 | sudo gedit .bashrc |
NOTE: You may want to create a backup of the .bashrc before editing, the easiest way is to copy the file to a different location. Later you can replace the edited .bashrc with the copied one in case something goes sideways or if you want to remove the NS.
2. Add the following lines AT THE END of the file. Be sure to change "/path_to" to the path of where you have extracted the NS (e.g. '/home/user_name/Documents').
# LD_LIBRARY_PATH |
OTCL_LIB=/path_to/ns-allinone-2.35/otcl-1.14/ |
NS2_LIB=/path_to/ns-allinone-2.35/lib/ |
USR_Local_LIB=/usr/local/lib/ |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$USR_Local_LIB |
# TCL_LIBRARY |
TCL_LIB=/path_to/ns-allinone-2.35/tcl8.5.10/library/ |
USR_LIB=/usr/lib/ |
export TCL_LIBRARY=$TCL_LIBRARY:$TCL_LIB:$USR_LIB |
# PATH |
XGRAPH=/path_to/ns-allinone-2.35/xgraph-12.2/:/path_to/ns-allinone-2.35/bin/:/path_to/ns-allinone-2.35/tcl8.5.10/unix/:/path_to/ns-allinone-2.35/tk8.5.10/unix/ |
NS=/path_to/ns-allinone-2.35/ns-2.35/ |
NAM=/path_to/ns-allinone-2.35/nam-1.15/ |
export PATH=$PATH:$XGRAPH:$NS:$NAM |
Save the file and restart the system, alternatively you can just reload the .bashrc as:
1 | source ~/.bashrc |
Step 4: Validate the Installation
You need to validate NS to check if everything is OK but keep in mind that it will take a lot of time (about 1:30 hrs). Open up a terminal and move to the directory ‘/home/user_name/Documents/ns-allinone-2.35/ns-2.35/' and run:
1 | ./validate |
And That is it ! You can now run ns from a terminal window by executing: ns
If you received the "%" sign, it means that NS is running (image 5). Congratulations !!
Image 5. Installation Successful. |
* Uninstalling the NS
If you want to remove the NS from your system then follow these steps:
1 | Delete the directory 'ns-allinone-2.35'. |
2 | Delete the ns related files from '/user/local/bin'. |
3 | Edit the '.bashrc file' and remove the paths that you have added during the installation. |
4 | Restart the system and run following commands one by one: |
5 | sudo apt-get autoremove |
6 | sudo apt-get clean |
* Some Common Problems
1. Many people are getting the following error when they run the ns after the installation:
Image 6. Error: 'ns' is currently not installed. |
If you get this error then kindly ensure that you have set the path (as in step 3) correctly and try restarting the system. If the error persists then try running the ns from '/ns-allinone-2.35/ns-2.35/bin/'.
You can start working on NS now, the standard Marc Greis' tutorial on NS can be found here. Another tutorial is 'NS by example' by Jae Chung and Marc Claypool, and is available here.
P.S.
I am not working on ns anymore, if you face any problems then feel free to contact, comment but it's guaranteed that I would be able to help you. Also go through the comments before making your query. Thank you!
Have Fun !!
— * — * — * — * —
You Man! Superb and clear cut steps. It works like charm! Thank You so much! keep writing!
ReplyDeleteThanx bro... you write very well about ns2 installation.. keep writing bro... i get more idea about installation
ReplyDeletehello, i had a mistake when i typed 'nam' on terminal like that: segmentation fault (core dumped), how can i solve it. Please help me as soon as possible.
ReplyDeleteThanks in advance
Hello...would you please share the screenshot of your problem, and explain what did you do when u got that error ??
Deleteyeah, i did all above steps, but error 'segmentaion fault (core dumped)
Deleteafter some times 'sudo get - apt remove ns', 'sudo get - apt remove nam',
it still appear '%' when i write 'ns' :)
then i type 'sudo get-apt autoremove' 2 times
luckily, 'nam' is run,
i dont know what happen.
sorry that i reply later.
thanks,
Hi,
DeleteI install ns-allinone-2.35 successfully but when I type nam and error(segmentation fail(core dumped)) is displayed.
what is my problem and how can I solve it plz.
shehu
Hii..
ReplyDeleteI followed the steps mentioned above to install NS2. But after validating, if i give "ns" command in my terminal i get the below message,
"The program ns is currently not installed , you can install it by sudo apt-get install ns2"
Can you please provide some suggestion on the same
Thanks...!!!
hii
ReplyDeleteI would like add couple of screen shots o the same regarding my installation and validation report.. But i am not sure of how i can add the screen shots here..
Hii...
ReplyDeleteThe solution to the mentioned error is
""
thats the message you get when your ns installation is not complete. You can write the following command and run it.
sudo apt-get install ns2 nam xgraph
Provide the password. It will download some packaged online and install ns2.
You surely need internet connectivity for that. Otherwise, your problem cannot be resolved. ""
Thank you very much for posting the steps in this Blog.. I was able to install NS2 really fast.. :)
thanks in advance,but xgraph till not install
DeleteHiii'
ReplyDeleteAny time I try to run the nam executable I get a segmentation fault:
$> nam
Segmentation fault (core dumped)
when i searched for this issue, one website had mentioned
to copy nam-1.15 directory from /home//Documents/ns-allinone-2.35 to /usr/local/bin
and restart the terminal.
i did it , but i m still getting the same error..
Do u have any suggestions on the same..
Thanks and regards,
Deepthi
Hii
DeleteYou can try this
1. Update your nam version
$ sudo apt-get install --reinstall nam libotcl1 libtclcl1
if it still shows error please follow following steps:
a) Delete the nam-1.15/ folder and any other / folder.
b) $ sudo apt-get remove nam
download the following nam and install
https://drive.google.com/file/d/0B7S255p3kFXNUkx0LVU1NnFVQTA/view
hope this will help. Goodluck :)
Hii,
ReplyDeletethanks for the the quick reply.. i have downloaded nam patch from the link u specified and
i tried to extract it using command
sudo dpkg -i
it has created a nam* file in /usr/local/bin directory.
when i run the executable nam .i,e, $nam
it give the below message,
bash: /usr/local/bin/nam : No such file or directory
i am not sure of how to install nam patch..
should i use the
"sudo apt-get install nam" command to install the nam pacth.
can u please suggest on the same..
Thanks and Regards,
Deepthi
Hello...
DeleteIts a deb package it will install on its own you just need to open it by double clicking.
I am getting the folowing message when i tried to install by clicking on the file,
ReplyDeleteThe Package is of Bad Quality
The installation of a package which violates the quality standards isn't allowed. This could cause serious problems on your computer. Please contact the person or organisation who provided this package file and include the details beneath.
Details ->
Lintian check results for /home/deepthi/Documents/ns-allinone-2.35/nam_1.15-10_i386.deb:
perl:warning:setting locale failed.
perl:warning:please check that your locale settings:
Language=(unset),
LC_ALL=(unset),
LANG ="en_IN.ISO8859-1"
are supported and installed on your system.
perl:warning:Falling back to the standard locale("C").
E: nam: wrong-file-owner-uid-or-gid usr/ 1000/1000
E: nam: wrong-file-owner-uid-or-gid usr/local/ 1000/1000
E: nam: wrong-file-owner-uid-or-gid usr/local/bin/ 1000/1000
E: nam: wrong-file-owner-uid-or-gid usr/local/bin/lib 1000/1000
E: nam: wrong-file-owner-uid-or-gid usr/local/bin/nam 1000/1000
E: nam: wrong-file-owner-uid-or-gid usr/local/lib/ 1000/1000
E: nam: wrong-file-owner-uid-or-gid usr/local/lib/nam-1.15 1000/1000
E: nam: wrong-file-owner-uid-or-gid usr/local/lib/nam-1.15/bin 1000/1000
E: nam: wrong-file-owner-uid-or-gid usr/local/lib/nam-1.15/bin/tclsh8.5 1000/1000
E: nam: wrong-file-owner-uid-or-gid usr/local/lib/nam-1.15/bin/wish8.5 1000/1000
goes on and on and on...
----------------------------------------------
to get rid of pearl error i tried to do the following and tried to reinstall nam-1.15-10 but it again popped up the same error mentioned above during the installation,
# locale-gen en_US en_US.UTF-8 hu_HU hu_HU.UTF-8
# dpkg-reconfigure locales
-----------------------------------------------
If ignore the error and go ahead with the installation, and it appears to install correctly. However, I do not see any nam folder created in /home/deepthi/Documents/na-allinone-2.35/ directory. but nam* file is created in /usr/local/bin
i tried to install the pacth manually by using command --> sudo dpkg -i nam_1.15-10*.deb
but still did not work , it does not show any error but no folders of nam are created as required ..
when i run the executable nam .i,e, $nam
it gives the below message,
bash: /usr/local/bin/nam : No such file or directory
but i see some folders and file in /usr/local/lib/nam-1.15 of today's date and time
i am not sure if it is of old installation or the new nam pacth one.
i tried to creat a link from /usr/local/bin/nam to /usr/local/lib/nam-1.15,
but it did not help since when i again run the executable nam .i,e, $nam
it give the below message,
bash: /usr/local/bin/nam : is a directory.
Any help would be appreciated..!!!
Also please let me know how to upload screen shots , it will help me to explain better..
Thanks..
i have done all the steps above but receiving the following error at the end
ReplyDeleteThe program 'ns' is currently not installed. You can install it by typing:
sudo apt-get install ns2
Please do not try to install ns by 'sudo apt-get install ns2'. First of all you have to undo all the changes you have made so far. So delete the 'ns-allinone-2.35' directory, remove the path you have set in the .bashrc file restart your system and run the following commands one by one
Delete1. sudo apt-get upgrade
2. sudo apt-get update
3. sudo apt-get autoremove
4. sudo apt-get clean
Again restart your system and install the ns from the beginning. You may want to look at the next comment by "Deepthi" for more information.
Goodluck.
@ Shabeer
Deletecheck if u have set ur enivnoment variables properly in .bashrc file and make sure you have executed source ~/.bashrc after changing,
if u r still facing problem after doing the above step
try again by adding
export TCL_LIBRARY=$TCL_LIBRARY$TCLIB:$USRLIB
insted of
export TCL_LIBRARY=$TCLIB:$USRLIB
in ur .bashrc file and load it by "source ~/.bashrc" command.
if the problem still persist.
make sure ur ubuntu has all the softwares updated ( i.e, there should be no pending software update in you Appstore), also execute sudo apt-get update and sudo-apt get upgrade
do not install ns2 by typing sudo apt-get insatll, for me this created segementaton fault (core dump) error when executing nam
hii,
ReplyDeleteThanks for the reply
i am finally able to run the nam executable ... !!!! :) :)
This is what i did,
I unistalled ns2 ,
since i was running ubuntu on a virtual machine. i deleted ubuntu and reinstalled it on my VM ware
i updated ubuntu software from the app store - it took some time.
i also executed sudo apt-get upgrade,sudo apt-get update, as u suggested..
then as suggested in link -> http://askubuntu.com/questions/467901/segmentation-fault-core-dumped-in-ns2-ubuntu-14-04
i downloaded ns2-2.35 again from the link -> http://garr.dl.sourceforge.net/project/nsnam/allinone/ns-allinone-2.35/ns-allinone-2.35.tar.gz.
for installation of ns2 - i followed the similar steps as u mentioned
this time i did not execute "sudo apt-get install ns2 nam xgraph" from terminal since i was able to run ns and nam command after updating .bashrc file.
As per the link mentioned above , i suppose segmentaion fault error was because i installed it by terminal using command "sudo apt-get install ns2 nam xgraph" .
and also updating ubuntu before ns2 installation also helped i suppose.
Thank You for ur suggestions.
Best Regards,
Deepthi
what did you update in the .bashrc file..?
Deletehi
ReplyDeletei m installing ns2.35 on ubuntu 14.04 lts
i have got error BACKWORD COMPATIBILITY MODE while executing command ./validate
what solution will you suggest for this.
It seems that you have some problem with your installation. You may consider to re-install your ns from the beginning. For instruction on removal of ns and other steps to follow pls have a look at previous comments.
DeleteGood luck.
FYI..
ReplyDeleteThe uninstallation process is pretty simple. Please follow these steps:
1. Delete the directory 'ns-allinone-2.35'.
2. Delete the ns related files from /user/local/bin
3. Edit the .bashrc file and remove the paths that you have added during the installation.
4. restart the system and run following commands one by one
5. sudo apt-get autoremove
6. sudo apt-get clean
7. sudo apt-get upgrade
8. sudo apt-get update
After these restart your system and proceed the installation as usual.
Thats better ! Thank you. :)
Deleteerror is shown when ./install
ReplyDeletepermission denied
You should change to permission of the ns directory for your current user. You may use chown or chmod command to do so.
Delete)\) -DTCL_SHLIB_EXT=\".so\" -DTCL_CFG_OPTIMIZED=1 -DTCL_CFG_DEBUG=1 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_OPEN64=1 -DHAVE_LSEEK64=1 -DHAVE_TYPE_OFF64_T=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_INTPTR_T=1 -DHAVE_UINTPTR_T=1 -DHAVE_PW_GECOS=1 -DTCL_NO_DEPRECATED /home/rajveer/ns-allinone-2.35/tk8.5.10/unix/../generic/tk3d.c
ReplyDeleteIn file included from /home/rajveer/ns-allinone-2.35/tk8.5.10/unix/../generic/tkInt.h:19:0,
from /home/rajveer/ns-allinone-2.35/tk8.5.10/unix/../generic/tk3d.c:14:
/home/rajveer/ns-allinone-2.35/tk8.5.10/unix/../generic/tk.h:76:23: fatal error: X11/Xlib.h: No such file or directory
# include
^
compilation terminated.
make: *** [tk3d.o] Error 1
tk8.5.10 make failed! Exiting ...
For problems with Tcl/Tk see http://www.scriptics.com
help me to resolve this error
hi i have installed ns2 on my ubuntu 14.04lts by steps. but while validating it gives this error..
ReplyDeleteRunning test quiescent_500ms_coarse:
../../ns test-suite-tcp.tcl quiescent_500ms_coarse QUIET
Guide: Tahoe TCP after a quiescent period, coarse-grained timer, tcpTick_ 0.5.
ns: _o4 cleanup file5 quiescent_500ms_coarse(EnblRTTCtr__1): Can't locate getopts.pl in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at ../../bin/raw2xg line 37.
while executing
"exec $PERL ../../bin/set_flow_id -s all.tr | $PERL ../../bin/getrc -s 2 -d 3 | $PERL ../../bin/raw2xg -s 0.01 -m 90 -t $file > temp.rands"
(procedure "_o4" line 3)
(TestSuite finish line 3)
invoked from within
"$self finish $testname"
(procedure "_o4" line 11)
(TestSuite cleanup line 11)
invoked from within
"_o4 cleanup file5 quiescent_500ms_coarse(EnblRTTCtr__1)"
Test output differs from reference output
Diagnose with: diff test-output-tcp/quiescent_500ms_coarse.test test-output-tcp/quiescent_500ms_coarse
Or see URL "http://www.isi.edu/nsnam/ns/ns-problems.html".
Hi there, I am facing the same issue. Please could you tell me in case you have solved it. Any help would be highly appreciated.
Deletetry installing perl using
Deletesudo apt-get install perl
in these lines,
ReplyDelete# LD_LIBRARY_PATH
OTCLLIB=/path/to/ns-allinone-2.35/otcl-1.14
NS2=/path/to/Documents/ns-allinone-2.35/lib
here above in ns2= path/to/______ you have written documents again, we have to do it that way or its a mistake??
Hey..thank you for pointing it out. Its a mistake, you dont have to add the 'Documents'.
DeleteMy extracted files are in "Downloads" folder...
DeleteWhat do i have to replace "path/to" with?
1. my_user_name/Downloads
or
2. my_user_name/to
Thank you...
my_user_name/Downloads/
ReplyDeletehey i installed ns-2.34 according to steps given here,
ReplyDeletewhen i run the tcl script nam file will be generated but not able to get output.
Not able to get output ? As in nam file in empty or nam file is not running automatically ? If its not running automatically then you have to include 'exec nam namefile.nam' in your tcl script.
Deletei also have the same problem
Deleteplz tell me if u solved it ..... thx
hey i included "exec nam out.nam &" in tcl but then also not able to get output.
ReplyDelete(nam file generated is not empty,i think its not running automatically)
Ok. please try to run your file manually from the terminal, it will ensure whether you have a properly installed nam or not.
DeleteThank you so much....becz of u im able 2 install ns2 successfully....tnx again #Dhyan
ReplyDeleteafter installation i set my library paths
ReplyDelete# LD_LIBRARY_PATH
OTCL_LIB=/home/shabeer/ns-allinone-2.35/otcl-1.14
NS2_LIB=/home/shabeer/ns-allinone-2.35/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$USR_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=/home/shabeer/ns-allinone-2.35/tcl8.5.10/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/shabeer/ns-allinone-2.35/bin:/your/path/ns-allinone-2.35/tcl8.5.10/unix:/home/shabeer/ns-allinone-2.35/tk8.5.10/unix
NS=/home/shabeer/ns-allinone-2.35/ns-2.35/
NAM=/home/shabeer/ns-allinone-2.35/nam-1.15/
export PATH=$PATH:$XGRAPH:$NS:$NAM
and save it and after that i give the following command
shabeer@shabeer-Aspire-5742:~/ns-allinone-2.35$ source ~/.bashrc
it give the following error what can i do now plz give me quick reply
bash: 2.35/tcl8.5.10/unix:/home/shabeer/ns-allinone-2.35/tk8.5.10/unix: No such file or directory
hey....look at the path for the XGRAPH variable you forgot to replace '/your/path/' with '/home/shabeer/'. Correct it and it should run fine. Goodluck !!
Deletethanx bro ...it really helpful for me....
ReplyDeletehello sir
ReplyDeleteafter installation of ns2.35 when i tried to run some tcl file it gives following error
divya@divya-hp-dv6:~$ cd ns2\ files/
divya@divya-hp-dv6:~/ns2 files$ ns nodes.tcl
divya@divya-hp-dv6:~/ns2 files$ Can't find a usable init.tcl in the following directories:
/home/divya/NS/ns-allinone-2.35/tk8.5.10/library:/usr/lib /home/divya/ns-allinone-2.35/lib/tcl8.5 ./lib/tcl8.5 ./lib/tcl8.5 ./library ./library ./tcl8.5.10/library ./tcl8.5.10/library
This probably means that Tcl wasn't installed properly.
i removed tcl and reinstalled again..but again it shows the same error.
Hello...
DeleteIt seems like there is some problem with the path that you have set, kindly ensure that you have set the path correctly. Also are you getting a '%' when you simply run the 'ns' ?
yes... its showing % when i run the "ns"
DeleteI am getting the same error.I have entered the path correctly.How to solve it?? Do reply
DeletePls double check your locations and paths that you are giving. In the case of Miss Divya she has missed some path variables.
Deletei follow all the above steps but when i write command (ns) i get this messages
ReplyDeletesegmentation fault(core dumped)
and appers the fault window (sorry, the application nam has stopped unexpectedly)
It happens sometimes. Pls uninstall the ns, follow the following steps and start the installation from the beginning
Delete1. Delete the directory 'ns-allinone-2.35'.
2. Delete the ns related files from /user/local/bin
3. Edit the .bashrc file and remove the paths that you have added during the installation.
4. restart the system and run following commands one by one
5. sudo apt-get autoremove
6. sudo apt-get clean
7. sudo apt-get upgrade
8. sudo apt-get update
i am unable to uninstall ns2
Deletei del the drc
no files were in usr/local/bin
edit .bashrc
restart system and run autoremove and clean cmds
but still when i type ns it shows %
plz help.......................
Seems like ns executables are still in your system. pls run this command on a terminal
Deletelocate -i "ns.*"
it will return the every location which contains a ns executable file. delete these files and proceed further.
where cAN I FIND TCL SCRIPTS FOR TCP VARIANTS ????????
ReplyDeletePardon me I don't understand, TCP Variants for what ?
Deletetcp variants like vegas , reno , new reno , tcp door , tcp-f , to check tcp performance...on diferrent variants
DeleteTry this:
Deletehttps://sites.google.com/a/seecs.edu.pk/network-technologies-tcp-ip-suite/home/performance-analysis-of-tcp-variants-for-wireless-networks-using-ns-2
hi.. when i try to do this command"sudo gedit .bashrc" getting like this,
ReplyDeletearjun@arjun-HP-2000-Notebook-PC:~/sanju/ns-allinone-2.35$ sudo gedit .bashrc
(gedit:26982): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
arjun@arjun-HP-2000-Notebook-PC:~/sanju/ns-allinone-2.35$
hi.. in new terminal bash file is opening.. after editing that when i save it.. im getting like this...
ReplyDeletearjun@arjun-HP-2000-Notebook-PC:~$ sudo gedit .bashrc
[sudo] password for arjun:
(gedit:27739): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
(gedit:27739): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
arjun@arjun-HP-2000-Notebook-PC:~/sanju/ns-allinone-2.35$ nam
ReplyDeleteSegmentation fault (core dumped)
arjun@arjun-HP-2000-Notebook-PC:~/sanju/ns-allinone-2.35$ source ~/.bashrc
Does: command not found
bash: allinone-2.35/tcl8.5.10/unix:/sanju/ns-allinone-2.35/tk8.5.10/unix: No such file or directory
the: nothing found -- skipped.
file: nothing found -- skipped.
and: nothing found -- skipped.
restart: nothing found -- skipped.
the: nothing found -- skipped.
system,: nothing found -- skipped.
alternatively: nothing found -- skipped.
you: nothing found -- skipped.
can: nothing found -- skipped.
just: nothing found -- skipped.
reload: nothing found -- skipped.
the: nothing found -- skipped.
.bas: nothing found -- skipped.
done.
hello friend i hv a doubt that ... i save my file in home/sanju/.... but when i type a command cd home it showiing "such a file or directory not found", so in bash file which path should i give?
ReplyDelete1) home/sanju/ns.....
2)sanju/ns....
3)arjun/sanju/ns...
you should give the complete path to, at which you have your 'ns-allinone-2.35' folder.
Deletethanu u...
Deleteim getting this error after ./validate
Deletevalidate overall report: some tests failed:
./test-all-tcp ./test-all-testReno ./test-all-newreno ./test-all-sack ./test-all-tcpOptions ./test-all-tcpReset ./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-rfc793edu ./test-all-rfc2581 ./test-all-rbp ./test-all-tcpLinux ./test-all-frto ./test-all-ecn ./test-all-ecn-ack ./test-all-ecn-full ./test-all-quickstart ./test-all-manual-routing ./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-links ./test-all-oddBehaviors
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
Its allright....are you getting the "%" sign >
Deleteya dude im getting when i typed as "ns".
ReplyDeletetnq 4 ur response dude:)
hi sir.
ReplyDeletei already follow the step for install ns 2.35 on ubuntu 14.04 but there's missing .bashrc . how to solve this problem?
hello...
DeletePlz refer the following link:
http://superuser.com/questions/584540/no-bashrc-file-in-my-home-directory
Hello frnd... while executing ns2 prgrm, which file extension we hv to use and what is the command to obtain output or run the program?should we write program in editor window i.e by typing vi .... .... or in the starting terminal wr v get % symbol?
ReplyDeleteHello...Plz go through the tutorials first. Links are given in the Step 4, after the screenshot.
Deletethank u ... u helped me lot... just now i run my 1st ns2 prgrm :)
DeleteThanx for your kind information......
ReplyDeletethank you :) it was easy to install ns throuh your tutorial
ReplyDeletehey bro, after installing ns2 and validating, when i type 'ns' it says ns is not currently installed.
ReplyDeletewhat should i do? should i re install?
You should reinstall it. It happens sometimes reasons unknown.
Deletehey Dhyan , should i remove ns first and reinstalla it ? or enter : sudo apt-get install ns2 directly ?
DeleteHello, You should remove it first and then reinstall it. Please don't use sudo apt-get install ns2, it will not work.
Deletethank you :) tutorial very well done
ReplyDeletehow to applying the SCTP patch to NS2 package,
ReplyDeletePlease refer the following link:
Deletehttp://www.linuxjournal.com/article/5929
Hope it helps. Goodluck :)
is this ns 2.35 compatible to 64 bit?
ReplyDeleteYeah, it can be installed in both x86 and x64
Deletethank u so mch sir........ its working .....
ReplyDeleteI got following validation report and error
ReplyDeletevalidate overall report: some tests failed:
./test-all-tcp ./test-all-testReno ./test-all-newreno ./test-all-sack ./test-all-tcpOptions ./test-all-tcpReset ./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-rfc793edu ./test-all-rfc2581 ./test-all-rbp ./test-all-tcpLinux ./test-all-frto ./test-all-ecn ./test-all-ecn-ack ./test-all-ecn-full ./test-all-quickstart ./test-all-manual-routing ./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-links ./test-all-oddBehaviors
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
root@ubuntu:/home/shivanshu/ns-allinone-2.35/ns-2.35# ns
ns: error while loading shared libraries: libtcl8.5.so.0: cannot open shared object file: No such file or directory
please help....
Did you manage to solve this problem?
DeleteTry this:
DeleteTCLIB=/path/to/ns-allinone-2.35/tcl8.5.10/library
instead of
TCLIB=/path/to/ns-allinone-2.35/tk8.5.10/library
Problem remain the same unfortunately. Are there any other suggestion to solve it?
DeleteHello Mr. Dhyan
DeleteAfter validation I found the same problem TCLIB=/path/to/ns-allinone-2.35/tcl8.5.10/library already there in .bashrc file. would you please advise ?
When i am doing step 2, at "sudo apt-get upgrade" i got interrupted and saying "dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem."
ReplyDeleteWhat should i do now?
This problem is related to your ubuntu configuration. Kindly run the command suggested by the system i.e. sudo dpkg --configure -a
ReplyDeletecan ns2.35 run LTE projects ?
ReplyDeleteYou may try these links:
Delete1. http://naveenshanmugam.blogspot.in/2014/02/lte-long-term-evaluation-network-in-ns2.html
2. https://www.academia.edu/5258157/Traffic_Modeling_of_LTE_Mobile_Broadband_Network_Based_on_NS2_Simulator
3. Before installing the NS we have to install some essential packages required by the NS. So run the following commands:
ReplyDelete1 sudo apt-get install tcl8.5-dev tk8.5-dev
For the above step i'm getting error message as
"E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?"
What to do?
You may try to run:
Delete1. sudo apt-get update --fix-missing
2. sudo dpkg-reconfigure -all
Dhyan...when i tried to validate, the terminal shows "permission denied"...what can i do?
ReplyDeletePlease make sure that you the admin of the system or have necessary rights to run the command. You can also try "sudo ./validate".
ReplyDeletethank you works for me exactly!
ReplyDeleteTCLIB=/path/to/ns-allinone-2.35/tcl8.5.10/library
ReplyDeleteinstead of
TCLIB=/path/to/ns-allinone-2.35/tk8.5.10/library
Thanx for pointing it out. :)
Deleteafter success full installation ns 2.34 in ubuntu 14.04
ReplyDeleteadding path using gedit .barshrc ir=t works well and close terminal and again type ns it says "ns currently not installed"
i add path at proper location no doubt
can help me
Did you tried reloading the .bashrc using 'source ~/.bashrc' or tried restarting the system ?
DeleteAlso check your .bashrc and ensure that your changes have been saved successfully.
i have ah problem on during installation. i followed your steps it will perfectly working untiil the validation
ReplyDeleteprocess after i validate it shows " some test failed" after i type ns means "ns is not currently installed" this will be displayed plz hlp me go ahead
I have modified the procedure, please uninstall the NS first then start from the 1st step. Also let me know if it helps.
Deletens installed successfully
ReplyDeletebut when in run nam
it gives
bash /usr/local/bin/nam no such file or directory
please help
I have modified the procedure, please set the environmental variables again and follow the procedure from 3rd step. Let me know if it helps.
Deletei got % symbol after the installation but while i type nam means "segmentation fault (core dumped)" this error will be suited plz help me
ReplyDeleteI have modified the procedure, please uninstall the NS first then start from the 1st step. Also let me know if it helps.
Deletewhile uninstalling...how to edit .bashrc file i am not finding what i have edited in .bashrc file
Deletehello sir im facing problem when trying to run tcl file, it said "the program ns currently not installed, you can install by type sudo apt-get ns2" , but i havent type that command, so what should i do sir? thank you for your respon
ReplyDeletePlease ensure that you have set the path correctly. Also see the P.S. section of the above post.
DeleteI have followed all the steps but when I run 'ns' in terminal this error is displayed-
ReplyDelete"The program 'ns' is currently not installed. You can install it by typing:
sudo apt-get install ns2"
Please ensure that you have set the path correctly. Also see the P.S. section of the above post.
Deletei installed ns2 suceessfully
Deletebut nam was not working
can u help me out of this
i also got the same problem ...so i installed it by typing:
Deletesudo apt-get install ns2"
i follow all the above steps but when i write command (ns) it give me %
ReplyDeletebut when i write nam i get this messages
segmentation fault(core dumped)
when execute scenario tcl it's OK but without nam
Try to run the nam from the "ns-allinone-2.35/nam-1.15/bin". Also see if there's a nam file in "/usr/local/bin". Try to run the both one by one; see whether anyone of them is working correctly or not.
Deletenam which is in "/usr/local/bin" is working when ı click double.But when ı write "nam" in terminal,again ı got segmentation fault error.Then what should ı do? thanks in advance
Deletei get ....running nam... but nam animation will not open
Deleteplease help removing this error
ReplyDeletegaurav@ubuntu:~$ ns
ns: error while loading shared libraries: libtcl8.5.so.0: cannot open shared object file: No such file or directory
Dear Dhyan
ReplyDeletei'am a new ns2 my question is how do to integrate a new algorithm of scheduling packets in MANET by using ns2, please tell me the steps
thanks
Awesome sequential help! thumbs up bro. keep it up the good work!!!!!
ReplyDeletei hav a problem when calling nam
ReplyDeletechild killed: segmentation voilation
this error arise..
i insalled every thing you told above..
kindly help to get it working
immediately after adding path in .bashrc file i am getting this error in terminal
ReplyDelete(gedit:28544): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
Hi Dhyan,
ReplyDeleteAfter installation I have tried to run "ns" command which gives me the % which was fine.
But when I tried to run "nam" command I got the following error:
abhi@abhi-Inspiron-3521:~/Documents/ns-allinone-2.35$ nam
nam: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
abhi@abhi-Inspiron-3521:~/Documents/ns-allinone-2.35$
I have gone through all the comments and replies in this page, but didn't helped me out.
Hope you can help me out.
Thanks
sir i follow ur manual i git error while i give nam command error was segmentation fault(core dumped)
ReplyDeletei got % also.pls give suggestion very soon
I have following your guide up to the install. Everything seems to be running fine until I reach the "Build OTcl-1.14" section. Specifically, I see the following error:
ReplyDeletechecking for X11 header files
can't find X includes
otcl-1.14 configuration failed! Exiting ...
Can you please help me fix this? Thanks in advance.
In regards to my previous question (concerning OTcl-1.14 build), here is that entire section of the install:
ReplyDelete============================================================
* Build OTcl-1.14
============================================================
No .configure file found in current directory
Continuing with default options...
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking for main in -lXbsd... no
checking for socket in -lsocket... no
checking for gethostbyname in -lnsl... yes
checking for dcgettext in -lintl... no
checking for getnodebyname in -ldnet_stub... no
checking that g++ can handle -O2... yes
checking standard STL is available... no
checking for tcl.h... -I../include
checking for tclInt.h... -I../include
checking for libtcl8.5... -L../lib -ltcl8.5
checking for init.tcl... ../lib/tcl8.5
checking for http.tcl... ../lib/tcl8.5/http1.0
checking Tcl http.tcl library... yes
checking for tclsh8.5.10... no
checking for tclsh8.5... ../bin/tclsh8.5
checking for tk.h... -I../include
checking for libtk8.5... -L../lib -ltk8.5
checking for tk.tcl... ../lib/tk8.5
checking for X11 header files
can't find X includes
otcl-1.14 configuration failed! Exiting ...
Please check http://www.isi.edu/nsnam/ns/ns-problems.html
for common problems and bug fixes.
hi
ReplyDeleteI have set the path as per the directions given above in ubuntu 11.10 and reload the bash file also. During validation following response occurs in the terminal. Plz help why this is happening.
Some test failed.
Mon May 25 15:58:49 IST 2015
Mon May 25 15:58:51 IST 2015
*** ./test-all-sack
Tests: sack1 sack1z sack1a sack1aa sack1b sack1c sack3 sack5 sack5a sackB2 sackB4 sackB4a FalsePipe FalsePipe1 sack_dupacks sack_finiteflow sack_dupacks1
Running test sack1:
../../ns test-suite-sack.tcl sack1 QUIET
./test-all-template1: 149: ../../ns: not found
Running test sack1z:
../../ns test-suite-sack.tcl sack1z QUIET
./test-all-template1: 149: ../../ns: not found
Running test sack1a:
../../ns test-suite-sack.tcl sack1a QUIET
./test-all-template1: 149: ../../ns: not found
Running test sack1aa:
../../ns test-suite-sack.tcl sack1aa QUIET
./test-all-template1: 149: ../../ns: not found
Running test sack1b:
../../ns test-suite-sack.tcl sack1b QUIET
./test-all-template1: 149: ../../ns: not found
Running test sack1c:
../../ns test-suite-sack.tcl sack1c QUIET
./test-all-template1: 149: ../../ns: not found
Running test sack3:
../../ns test-suite-sack.tcl sack3 QUIET
./test-all-template1: 149: ../../ns: not found
Running test sack5:
../../ns test-suite-sack.tcl sack5 QUIET
./test-all-template1: 149: ../../ns: not found
Running test sack5a:
../../ns test-suite-sack.tcl sack5a QUIET
./test-all-template1: 149: ../../ns: not found
Running test sackB2:
Hi
ReplyDeleteI am getting the following response during validation. plz help..
Some test failed.
Mon May 25 15:58:49 IST 2015
Mon May 25 15:58:51 IST 2015
*** ./test-all-sack
Tests: sack1 sack1z sack1a sack1aa sack1b sack1c sack3 sack5 sack5a sackB2 sackB4 sackB4a FalsePipe FalsePipe1 sack_dupacks sack_finiteflow sack_dupacks1
Running test sack1:
../../ns test-suite-sack.tcl sack1 QUIET
./test-all-template1: 149: ../../ns: not found
Running test sack1z:
../../ns test-suite-sack.tcl sack1z QUIET
./test-all-template1: 149: ../../ns: not found
Running test sack1a:
../../ns test-suite-sack.tcl sack1a QUIET
./test-all-template1: 149: ../../ns: not found
Running test sack1aa:
../../ns test-suite-sack.tcl sack1aa QUIET
./test-all-template1: 149: ../../ns: not found
Running test sack1b:
../../ns test-suite-sack.tcl sack1b QUIET
./test-all-template1: 149: ../../ns: not found
Running test sack1c:
../../ns test-suite-sack.tcl sack1c QUIET
./test-all-template1: 149: ../../ns: not found
Running test sack3:
../../ns test-suite-sack.tcl sack3 QUIET
./test-all-template1: 149: ../../ns: not found
Running test sack5:
../../ns test-suite-sack.tcl sack5 QUIET
./test-all-template1: 149: ../../ns: not found
Running test sack5a:
../../ns test-suite-sack.tcl sack5a QUIET
./test-all-template1: 149: ../../ns: not found
Running test sackB2:
Hi;
ReplyDeleteI follow all these steps but when I wrote ./validate or sudo ./validate,firstly I saw in terminal "some test outputs agrees with reference outputs" but after that I saw this and it repeats for other tests ;
Running test resetSack1:
../../ns test-suite-tcpReset.tcl resetSack1 QUIET
Guide: Sack TCP, resetting a TCP connection.
ns: _o4 cleanup file5 resetSack1: Can't locate getopts.pl in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at ../../bin/raw2xg line 37.
while executing
"exec $PERL ../../bin/set_flow_id -s all.tr | $PERL ../../bin/getrc -s 2 -d 3 | $PERL ../../bin/raw2xg -s 0.01 -m 90 -t $file > temp.rands"
(procedure "_o4" line 3)
(TestSuite finish line 3)
invoked from within
"$self finish $testname"
(procedure "_o4" line 11)
(TestSuite cleanup line 11)
invoked from within
"_o4 cleanup file5 resetSack1"
Test output differs from reference output
Diagnose with: diff test-output-tcpReset/resetSack1.test test-output-tcpReset/resetSack1
Or see URL "http://www.isi.edu/nsnam/ns/ns-problems.html".
Running test resetReno:
../../ns test-suite-tcpReset.tcl resetReno QUIET
Guide: Reno TCP, resetting a TCP connection.
ns: _o4 cleanup file5 resetReno: Can't locate getopts.pl in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at ../../bin/raw2xg line 37.
while executing
"exec $PERL ../../bin/set_flow_id -s all.tr | $PERL ../../bin/getrc -s 2 -d 3 | $PERL ../../bin/raw2xg -s 0.01 -m 90 -t $file > temp.rands"
(procedure "_o4" line 3)
(TestSuite finish line 3)
invoked from within
"$self finish $testname"
(procedure "_o4" line 11)
(TestSuite cleanup line 11)
invoked from within
"_o4 cleanup file5 resetReno"
Test output differs from reference output
Diagnose with: diff test-output-tcpReset/resetReno.test test-output-tcpReset/resetReno
Or see URL "http://www.isi.edu/nsnam/ns/ns-problems.html".
Some test failed.
Could you help me please? thanks.
vikram2403@vikram2403-Inspiron-3541:~/vikram/ns-allinone-2.35$ sudo gedit .bashrc
ReplyDelete[sudo] password for vikram2403:
(gedit:19447): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
(gedit:19447): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
^Cvikram2403@vikram2403-Inspiron-3541:~/vikram/ns-allinone-2.35$ pwd
/home/vikram2403/vikram/ns-allinone-2.35
vikram2403@vikram2403-Inspiron-3541:~/vikram/ns-allinone-2.35$ sudo gedit .bashrc
(gedit:19499): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
(gedit:19499): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
(gedit:19499): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
(gedit:19499): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
(gedit:19499): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
devanshi@devanshi-virtual-machine:~$ ns lab1.tcl
ReplyDeletewarning: no class variable LanRouter::debug_
see tcl-object.tcl in tclcl for info about this warning.
devanshi@devanshi-virtual-machine:~$
hiii dere
ReplyDeletei m new to ns2,,i install ns2 using following commands
sudo apt-get update
sudo apt-get install ns2
sudo apt-get install nam
sudo apt-get install tcl
sudo apt-get install Xgraph
installed successfully,,,,tcl scripts are running smoothly
but tutorials m following describes some c files ,,, m not able to search any directory of such files
i search some cc files of protocol but not able to figure out where to compile these files and how to link those files with ns2,,,
please help
i tried nsallinone for installation of ns2 earlier but all in vain ,,,shows error file not found etc etc
warning is shown in terminal while editing in bashrc file
ReplyDelete(gedit:27884): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
hiii dere ..i m stucked ,,,file u have mentioned here to modify "erase" .. m not able to fing dis file ,,not manually not by GUI....what to do please. help...
ReplyDeleteHello !
ReplyDeleteI have completed all the instruction as said and got % after entering ns.
but after entering nam , it says dumped or something like that. How can I resolve ?
dawnload nam_1.15-10_i386
Deletethank you very very very much
ReplyDeletei cant remove ns from /user/local/bin
ReplyDeletepemishon denaid
file protected
Hi Dhyan Singh
ReplyDeleteI am getting error "package gcc-4.4 has no installation candidate" when i entered the following command "sudo apt-get install gcc-4.4"
kindly help me out.
thanks
Hey
ReplyDeleteI am getting this error after ./validate
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: some tests failed:
./test-all-tcp ./test-all-testReno ./test-all-newreno ./test-all-sack ./test-all-tcpOptions ./test-all-tcpReset ./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-rfc793edu ./test-all-rfc2581 ./test-all-rbp ./test-all-tcpLinux ./test-all-frto ./test-all-ecn ./test-all-ecn-ack ./test-all-ecn-full ./test-all-quickstart ./test-all-manual-routing ./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-links ./test-all-oddBehaviors
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
kindly help me out
thanks
Hi...!!
ReplyDeleteim not able to edit ls.h file...its an readonly file so what shall i do to make it writable to make necessary changes as stated above?
Hi! thanks for evry thing ......I have ubuntu 15.10 desktop amd64 and ns2.35 i need help to install it, so help me please.......THANKS
ReplyDeleteCan you please share steps to patch DTNAgent to ns2.35 ? Thanks in advance.
ReplyDeleteCan anybody help me with these errors? This happened when i tried to validate
ReplyDeletevalidate overall report: some tests failed:
./test-all-tcp ./test-all-testReno ./test-all-newreno ./test-all-sack ./test-all-tcpOptions ./test-all-tcpReset ./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-rfc793edu ./test-all-rfc2581 ./test-all-rbp ./test-all-tcpLinux ./test-all-frto ./test-all-ecn ./test-all-ecn-ack ./test-all-ecn-full ./test-all-quickstart ./test-all-manual-routing ./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-links ./test-all-oddBehaviors
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
Hi
ReplyDeleteI installed ns2.35 in ubuntu 12.04 LTS. It works. I changed the type of DSR cache from mobicache(the default cache) to linkcache. then recompile ns2. It gives me the following error
dsr/linkcache .cc: fatal error: list.h: no such file or directory.
I used locate list.h and this is its directory
/usr/src/linux-headers-3.2.0-29/include/linux/list.h
I tried to pass this directory then use #include "list.h" but it doesn't work. it gives another error
poisson.h no such file or directory
Please help me
hi,
ReplyDeletehow to add leach protocol for ns2.35 in ubuntu 14.04 64 bit.
please help
ram@ram-Lenovo-E40-70:~/Documents/ns-allinone-2.35/ns-2.35$ ns mannasim-rede-plana.tcl
ReplyDeletenum_nodes is set 12
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
invalid command name "EnergyModel/Battery"
while executing
"EnergyModel/Battery create _o33 _o15 100.0 0.5 0.2"
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new $energyModel_ $node $initialEnergy_ $l1 $l2"
invoked from within
"if [info exists energyModel_] {
if [info exists level1_] {
set l1 $level1_
} else {
set l1 0.5
}
if [info exists level2_] {
set l2 $level2_
} else {..."
(procedure "_o3" line 115)
(Simulator create-wireless-node line 115)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns_ node"
(procedure "create_sink" line 8)
invoked from within
"create_sink"
(file "mannasim-rede-plana.tcl" line 350)
where do we find ./bashrc file?
ReplyDeletePlease refer step 3
Deletei am getting an error called cant open file or directory.what to do please reply
ReplyDeletehow can i intergrate realapp patch in ns2.33
ReplyDeleteafter installation i set my library paths
ReplyDelete# LD_LIBRARY_PATH
OTCL_LIB=/home/jaziri/ns-allinone-2.35/otcl-1.14/
NS2_LIB=/home/jaziri/ns-allinone-2.35/lib/
USR_LOCAL_LIB=/usr/local/lib/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$USR_Local_LIB
# TCL_LIBRARY
TCL_LIB=/home/jaziri/ns-allinone-2.35/tcl8.5.10/library/
USR_LIB=/usr/lib/
export TCL_LIBRARY=$TCL_LIBRARY:$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/jaziri/ns-allinone-2.35/xgraph-12.2/:/home/jaziri/ns-allinone-2.35/bin/:/home/jaziri/ns-allinone-2.35/tcl8.5.10/unix/:/home/jaziri/ns-allinone-2.35/tk8.5.10/unix/
NS=/home/jaziri/ns-allinone-2.35/ns-2.35/
NAM=/home/jaziri/ns-allinone-2.35/nam-1.15/
export PATH=$PATH:$XGRAPH:$NS:$NAM
and save it and after that i give the following command
source ~/.bashrc
it give the following error what can i do now plz give me quick reply
jaziri@jaziri-virtual-machine:~$ source ~/.bashrc
: command not found
After Validating I am getting error as follows:-
ReplyDeletevalidate overall report: some tests failed:
./test-all-tcp ./test-all-testReno ./test-all-newreno ./test-all-sack ./test-all-tcpOptions ./test-all-tcpReset ./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-rfc793edu ./test-all-rfc2581 ./test-all-rbp ./test-all-frto ./test-all-ecn ./test-all-ecn-ack ./test-all-ecn-full ./test-all-quickstart ./test-all-manual-routing ./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-links ./test-all-oddBehaviors
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
What do I do?
My ubuntu version is 15.10.
Please do reply and help!
Hello, i have a problem when i run tcl script on ns, there is a text appear
ReplyDeletewarning: using backward compability mode
error when calling clas OldSim: x.tcl
So, what should i do? Please help me
Worked perfectly on Ubuntu 15.04. Thank you..
ReplyDeleteThank you sir.You have explained very well about the installation.The installation worked perfectly in Ubuntu 14.04 LTS.
ReplyDeletehello sir,
ReplyDeletecould you please guide me regarding broadcasting in one hop neighbors in mobile ad hoc networks.
hi.
ReplyDeletecan you please tell me how to run xgraph?
thanks Mr. Dhyan singh. The steps are very explanatory. It worked really well for me
ReplyDeleteHi Sir,
ReplyDeleteI have completed my installation, it gives the final reports which is basically some tests are failed. the output is below
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: some tests failed:
./test-all-tcp ./test-all-testReno ./test-all-newreno ./test-all-sack ./test-all-tcpOptions ./test-all-tcpReset ./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-rfc793edu ./test-all-rfc2581 ./test-all-rbp ./test-all-tcpLinux ./test-all-frto ./test-all-ecn ./test-all-ecn-ack ./test-all-ecn-full ./test-all-quickstart ./test-all-manual-routing ./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-links ./test-all-oddBehaviors
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
so how could i fix these failures.
bundle of thanks!
hi!!
ReplyDeleteim getting the same error as that is in the screenshot you put above.i tried the things u asked me to do.but im still getting the same error
I got this error:
ReplyDelete--------------------------------------------------------------------------------
/home/aa/Documents/ns-allinone-2.35/tk8.5.10/unix/../generic/tk.h:76:23: fatal error: X11/Xlib.h: No such file or directory
compilation terminated.
make: *** [tk3d.o] Error 1
--------------------------------------------------------------------------------
Any ideas?
rm: cannot remove ‘/home/adil/Documents/ns-allinone-2.35/lib/libtcl8.5.a’: Permission denied
ReplyDeletemv: cannot stat ‘/home/adil/Documents/ns-allinone-2.35/lib/#inst.32334#’: No such file or directory
ranlib: could not create temporary file whilst writing archive: No more archived files
make: *** [install-binaries] Error 1
tcl8.5.10 installation failed.
Tcl is not part of the ns project. Please see www.Scriptics.com
to see if they have a fix for your platform.
how to overcome this error sir
Hi dear Sir, I met the same problem as you. I want to know if you solved it or not and could you tell me the way to overcome it?
DeleteMany Thanks
Hello
ReplyDeleteI try to integrate mannasim with ns2.35 and when I run the command ./configure it shows me this error "Installation of tcl seems incomplete orcan't be found automatically" So I fix it with "./configure --with-tcl-ver=8.5" but unfortunetaly when I ran the command "make" I got this error "No rule to make target mannasim/accessPointApp.o,needed by 'ns'.Stop" So what should I do? and thanks in advance
Please can you guide me if i want to install some earlier release of NS-2 that is NS-2.1b4.SO there will be same installation process or any other way please guide me.
ReplyDeletewritetooadnan@gmail.com
Hi,
ReplyDeleteI have extracted the tar of nsallinone-2.35.
Downloaded the implementation of mptcp from https://code.google.com/archive/p/multipath-tcp/source/default/source.
Copied the mptcp and mptcp-full files in ns-2.35/tcp and trace files in ns-2.35/trace.
Made changes in Makefile accordingly.
I then build/install the ns-2.35 using ./install command. Confiured and validated; everything worked perfectly.
But now when I execute the mptcp script, I get this error
invalid command name "Agent/TCP/FullTcp/Sack/Multipath"
while executing
"Agent/TCP/FullTcp/Sack/Multipath create _o300 "
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new Agent/TCP/FullTcp/Sack/Multipath"
invoked from within
"set tcp0 [new Agent/TCP/FullTcp/Sack/Multipath]"
(file "mptcp-sample.tcl" line 98)
Please help me with it !!
Thank you in advance.
validate overall report: some tests failed:
ReplyDelete./test-all-tcpLinux
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
what to do although I am getting the % sign??
In file included from ./mdart/mdart.h:52:0,
ReplyDeletefrom ./mdart/mdart_adp.h:51,
from mdart/mdart_adp.cc:47:
./mdart/mdart_function.h:230:17:
note: candidates are: nsaddr_t hash(nsaddr_t)
inline nsaddr_t hash(nsaddr_t id) {
^~~~
In file included from /usr/include/c++/6.2.1/bits/basic_string.h:5628:0,
from /usr/include/c++/6.2.1/string:52,
from /usr/include/c++/6.2.1/bitset:47,
from ./mdart/mdart_function.h:62,
from ./mdart/mdart.h:52,
from ./mdart/mdart_adp.h:51,
from mdart/mdart_adp.cc:47:
/usr/include/c++/6.2.1/bits/functional_hash.h:58:12: note:
template struct std::hash
struct hash;
^~~~
Makefile:93: recipe for target 'mdart/mdart_adp.o' failed
make: *** [mdart/mdart_adp.o]
Error 1
Ns make failed!
I AM FACING ABOVE PROBLEM....
In file included from ./mdart/mdart.h:52:0,
ReplyDeletefrom ./mdart/mdart_adp.h:51,
from mdart/mdart_adp.cc:47:
./mdart/mdart_function.h:230:17:
note: candidates are: nsaddr_t hash(nsaddr_t)
inline nsaddr_t hash(nsaddr_t id) {
^~~~
In file included from /usr/include/c++/6.2.1/bits/basic_string.h:5628:0,
from /usr/include/c++/6.2.1/string:52,
from /usr/include/c++/6.2.1/bitset:47,
from ./mdart/mdart_function.h:62,
from ./mdart/mdart.h:52,
from ./mdart/mdart_adp.h:51,
from mdart/mdart_adp.cc:47:
/usr/include/c++/6.2.1/bits/functional_hash.h:58:12: note:
template struct std::hash
struct hash;
^~~~
Makefile:93: recipe for target 'mdart/mdart_adp.o' failed
make: *** [mdart/mdart_adp.o]
Error 1
Ns make fail
I AM FACING THIS PROBLEM....
Hello
ReplyDeletewhile i'm running simple tcl file nam file is not generating
please help me with this
hii
ReplyDeletei am not able to copy nam-1.14 from desktop to usr/local/bin and dont know how to use comand cdmod or cdowr plz help
copying name from desktop to your desired location use cp /home/user_name/Desktop/nam-1.14 /usr/local/bin
Deletei need a package of AES in NS2.35....how can we include that package... pls help me
ReplyDeletehow can we include AES package in ns2.35.
ReplyDeleteim getting this error after ./validate
ReplyDeletevalidate overall report: some tests failed:
./test-all-tcp ./test-all-testReno ./test-all-newreno ./test-all-sack ./test-all-tcpOptions ./test-all-tcpReset ./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-rfc793edu ./test-all-rfc2581 ./test-all-rbp ./test-all-tcpLinux ./test-all-frto ./test-all-ecn ./test-all-ecn-ack ./test-all-ecn-full ./test-all-quickstart ./test-all-manual-routing ./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-links ./test-all-oddBehaviors
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
thanks
hi, i am getting this problem after doing all the steps , what should i do plz let me know,
ReplyDeleteiqtidar@iqtidar:~$ ns
The program 'ns' is currently not installed. You can install it by typing:
sudo apt-get install ns2
iqtidar@iqtidar:~$ ns
The program 'ns' is currently not installed. You can install it by typing:
sudo apt-get install ns2
Hi sir,
ReplyDeleteI want to fix the number of packets for transmission from node1 to node2 in wireless scenario. Like i need to transmit only 50 packets from node 1 to 2. If this is possible please send me the tcl script sir
my mailid: gowthamsankarss@gmail.com
hi.
ReplyDeletenum_nodes is set 20
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 156.7
SORTING LISTS ...DONE!
Segmentation fault (core dumped)
apt-get fix missing
ReplyDeletehi guys i have done every thing as mentioned ..but i have getting error at last step..as follows: "sudo: ./install:command not found.pls help me
ReplyDeleteafter writing sudo gedit .bashrc
ReplyDeletethe .bashrc file is created empty....what to do..?????????????..
i also got the same error...please anyone tell what to do
DeleteHello sir when i tried to run the following command "sudo apt-get install perl xgraph libxt-dev libx11-dev libxmu-dev" to install essential for ns2 it show error 404 means the link are down. Can you provide this file manually through email(janafridi678@gmail.com). I am waiting for your response.
ReplyDeleteafter writing sudo gedit .bashrc
ReplyDeletethe .bashrc file is created empty....what to do..?????????????..
Which Ubuntu version is needed for ns2 xgraph ??
ReplyDeleteI am not able to run xgraph .. awk tcl files works properly in my Ubuntu 18 version .. please help