Search This Blog

Installing ns2.26 with nrlsensorsim on Fedora 8

Labels: , , , , , ,

ns2 sensor networks

NRLSensorSim is a patch developed and maintained by U.S. Naval Research Laboratory. This patch enables sensor network simulations on ns2. 

Due to new versions of gcc, ns2.26 with nrlsensorsim patch cannot be installed directly on fedora 8.


Minor modifications in the code of ns2.26 and nrlsensorsim are required.

Hence I have designed two patches that incorporate all the modifications required in ns2.26 and nrlsensorsim code to be installed on fedora 8 (or other linux distributions having similar gcc version). 

Following are the steps to install ns2.26 with nrlsensorsim on fedora 8 (or other linux distributions having similar gcc version): 



3) Download ns226.patch (after downloading the file change its name to ns226.patch in case if the file gets downloaded by some other name). 

If you encounter any problem in downloading from the above link please follow the link given below: 

4) Download ns226nrl226.patch (after downloading the file change its name to ns226nrl226.patch in case if the file gets downloaded by some other name). 

If you encounter any problem in downloading from the above link please follow the link given below:


5) Save ns-allinone-2.26.tar.gz and nrlsensorsim-2.26.tgz.gz in any directory (folder) of your file system. 

6) Open a new terminal and go to that directory. 

7) Give the following command to untar ns-allinone-2.26.tar.gz 
tar  -xzvf  ns-allinone-2.26.tar.gz 

and following command to untar nrlsensorsim-2.26.tgz.gz
tar  -xzvf  nrlsensorsim-2.26.tgz.gz

8) After executing the above command you will find the extracted folders named ns-allinone-2.26 and nrlsensorsim in the same directory.
Put the downloaded ns226nrl226.patch file in the extracted folder named nrlsensorsim. 

9) Using a terminal enter in this extracted folder (nrlsensorsim) and give the following command 
patch  -p1  -t  <  ns226nrl226.patch

then give the following command
./patch_script.sh 

if is asks for any permission, type yes and press enter.

10) Put the downloaded ns226.patch file in the extracted folder named ns-allinone-2.26.

11) Using a terminal enter in this folder (ns-allinone-2.26) and give the following command 
patch  -p1  -t  <  ns226.patch

12) After successfully completing the above procedure install ns2.26 by giving the following command (in same extracted folder) 
./install 

Installation may take several minutes !!! 

Regards

Comments (147)

Hi,
I tried your patch in Fedora 10. But it is not working. Please help me. How to install sensorsim in fedora 10. Thanks in advance.

by
shyam

Fedora 10 has a higher version of gcc than the one in Fedora 8.

To use this patch either you can try installing Fedora 8's gcc in Fedora 10 or else you can switch from Fedora 10 to Fedora 8.

Hope it helps.

Regards

Hi ,
What if I am using ns 2.34 and simulator is on Ubuntu 9.10 . would this patch work ?
Thanks in advance ..

Thanks ,
Janmesh

No this patch wont work because of several reasons:

1. NRL Sensorsim patch was designed for ns2.1b, ns2.26 and ns2.27 versions.

2. Ubuntu 9.10 has a higher gcc version than that of Fedora 8.

Hope it helps.

Regards

i just wanted to know about patch files...can u tell me what is patch...y v need that...how to use that...becoz im using ns 2.34 for simulating cellular 3gpp networks....and im new to ns2....so plz help me

Patch files give the difference between two files. Say you have file/folder named A and another file/folder named B which was same as A but we made bit modifications as per our requirements. Now we want to incorporate same modifications in A as well. So there is no need to redo the entire procedure. Instead we can create a patch file (which will give difference between A and B) and apply it to A.

To know more about how to create a patch file (its very simple - just few commands u need to know) please visit following link:

http://linux.byexamples.com/archives/163/how-to-create-patch-file-using-patch-and-diff/

Hope it helps.

Regards

hey i tried to install ns2.1b9a on my fedora8...i got the following error......

tclcl-mappings.h:51: error: incomplete type ‘Tcl’ used in nested name specifier
tclcl-mappings.h:52: error: invalid use of undefined type ‘struct Tcl’
tclcl-mappings.h:41: error: forward declaration of ‘struct Tcl’
tclcl-mappings.h:57: error: invalid use of undefined type ‘struct Tcl’
tclcl-mappings.h:41: error: forward declaration of ‘struct Tcl’
make: *** [Tcl.o] Error 1
tclcl-1.0b12 make failed! Exiting ...
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems......
;;;;;;;
can u help me out of this error....

U need to go in following directory

ns-allinone-2.xx/tclcl-xx (where xx is the version number)

and search for the following file

tclcl.h

In the list of header files you wil see the following line:

#include "tclcl-mappings.h"

Cut this line and paste it before the following line:

class InstVar;

This line will be most probably the 45th line of the file.

Hope it helps.

Regards

hey thank u mohit...i tried ur method....it works but i got a new error after doing that.....

./mobile/god.h:88: error: extra qualification ‘vector::’ on member ‘operator=’
./mobile/god.h:93: error: extra qualification ‘vector::’ on member ‘operator+=’
./mobile/god.h:98: error: extra qualification ‘vector::’ on member ‘operator==’
./mobile/god.h:101: error: extra qualification ‘vector::’ on member ‘operator!=’
make: *** [src_rtg/sragent.o] Error 1
Ns make failed!


....what to do yar...im struggling with this ns2.1b9a installation from around 1.5 month...please help me..

Go in ns-allinone-2.xx/ns-2.xx/mobile

and open god.h file

depending on the line numbers given in error i.e. 88, 93, 98, 101, etc try to search "vector::" and delete it.

I mean delete vector:: from all the 4 lines.

I will try creating and uploading the patch for ns2.1b9a on fedora 8 by this weekend. Till then you too try to install it.

Hope it helps.

Regards.

thanx...i vil try....thank u very much

i exactly did what u have posted...but those errors were gone but im getting new errors and also more number of errors in addition.....plzzz hurry up

Hello Sir, I am facing some problem in my project. I am doing target (object) tracking in WSN in NS2. What i want is a grid of snesors and when some mobile target passes through sensor range then they must communicate (target is TCP node and sensor are sink). I have written code for just one sensor but somehow only when sensor is at particular position then they are exchanging packets, if sensor position is changed then nothing happen. Please help meout if you have some code for that. I am a student of IIT kanpur and djeswani@iitk.ac.in is my mail id. Please telll me your mail id i will send u my small code so you can help me out.
Or if you have any code then please send me.
Thanks

plzz help mohit...my project totally depends on ur patch for ns2.1b9a for fedora8.....ur the only hope...i have been trying to install....but if i debug those errors during installation i used to get more new errors...so plzzz

@mahesh: The patch is almost ready!

I will be uploading it soon.

Regards

Hello Deepak,

I got your mail with tcl script.

I will get back to you soon!

Regards,
Mohit P. Tahiliani

This comment has been removed by the author.

im waiting for patch with crossed fingers mohith\\\\\\\\\............

@mahesh: the patch is ready. I will be uploading it by today evening.

Thank you for co-operation.

Regards,
Mohit P. Tahiliani

plzz hurry up.....

@mahesh: Find the patch on the following link:

http://www.esnips.com/doc/4392e5f2-6c95-43d6-b174-3e5b461d34c2/ns21b9a

It has been tried with Ubuntu 9.04 and Fedora 8.

Please Note: You need to install gcc-3.3 and g++-3.3 before you try installing ns-2.

Hope it helps.

Regards,
Mohit P. Tahiliani

thank u....its really working......i never forget ur help/.........thank u very very much

Hi Mohit,
i tried your patch and worked very well, but i need implement to NS-2.26 BGP module (BGP++,on web:
http://www.ece.gatech.edu/research/labs/MANIACS/BGP++/).

When i use patch of BGP++ implementation and recompiled NS-2.26, i got this error:


Compiling common/tclAppInit.cc
/home/david/ns-allinone-2.26/lib/libtcl8.3.a(tclUnixPipe.o): In function `TclpCreateTempFile':
tclUnixPipe.c:(.text+0x74d): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
common/agent.o: In function `hdr_bgp::access(Packet const*)':
/home/david/ns-allinone-2.26/ns-2.26/./bgp/hdr_bgp.h:14: undefined reference to `hdr_bgp::offset_'
common/agent.o: In function `hdr_atom::access(Packet const*)':
/home/david/ns-allinone-2.26/ns-2.26/./bgp/hdr_atoms.h:18: undefined reference to `hdr_atom::offset_'
collect2: ld returned 1 exit status
make: *** [ns] Error 1

is it because of your patch ?

My distribution is Fedora 8.

sorry for my bad english

thx a lot for your response

David

Again me,
i tried unpack NS-2.26, then patched BGP++ and then applied your steps to patch NS-2.26 .... when i write ./install and pressed enter a got this error:

creating indep-utils/cmu-scen-gen/setdest/Makefile
creating autoconf.h
Makefile:283: *** commands commence before first target. Stop.
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems

It is possible some linux distribution (with gcc 2.95, maybe gcc 3.2.3) to download ?

I need install BGP++ to work for my thesis =(

first i did rpm -e gcc and then
i got 2 files named (1) gcc-3.3.2-2.src.rpm and

gcc3.3-c++ rpm build by the following name called (2) gcc3.3-3.3.6-1pclos2007.src.rpm...

and then i did "rpm -i gcc.xxx.rpm" to install older version of gcc ..is this right? but i got this error...

error: cannot create %sourcedir /usr/src/redhat/SOURCES

funally im able to install..thank god and thank u mohit.....
one last question let us say i have installed ns2.31 ...ok...now to run my project i wanted to add apatch file called umts.patch......then i went for ns 2.30/ folder and did"patch -p1 -t < umts.patch " and the i closed that directory....
and then i wrote a code that uses those nodes or agents defined in that patch...but im getting error.....so where i was wrong in applying patch..or did i missed any steps in doing so.......this vil be my last question for u..

ok then i got fixed it.......one more thing buddy
suppose i have 2 nodes between a and b lets say...
i just wanted to plot the band width on the link between a and b...lets say we have tcp agent and cbr traffic running between them.........i just wanted to know how to plot a graph for that bandwidth consumption ...

how to install nrl sensorsim for NS 2.33 in fedora 9...
i am doing project on WSN....
pls help me out...

HAVE U EVER TRY TO INSTALL NS 2.27 ON FEDORA 11
I M FACING SOME TCL.O PROBLEM HELP

No I have not tried installing 2.27 on Fedora 11. What are the problems that you are facing?

@Timothy: NRLSensorsim cannot be installed on ns-2.33 since the basic patch is designed for ns-2.26/ns-2.27. There will be changes required in the original patch of nrlsensorsim.

Hope it helps.

Regards,
Mohit P. Tahiliani

hi plzz help me out.....

lets say i have 4 nodes a,b,c,d...here a and b have udp agents and runs exponential traffic and c and d have loss monitor agent...

these are connected like this
a-------b--------c
|
|
|
d

ok ...here im sending the same packets from a to c abd from a to d...
here i want to find out what is the bandwidth consumption onthe link between the nodes a and b when multiple packets are sent over the link between a and b which are destined to c and d nodes...plzzhelp me out....better with simple tcl script....and tell me how to plot that bandwidth consumption on that link..

hey there is a mistake....in the above post b is connected to d.but not to a....plzz have a look....in the above post by mistake a is connected to d..rectify plzz

otherwise take an example explained in the marc gracies tutorial to plot xgraph.....there i want to plot the bandwidth consumption on the nodes between "0" and "3" or "1 " and "3" or "2" and "3"....this tutorial is available on net...

http://www.isi.edu/nsnam/ns/tutorial/ and go for page"creating output files for xgraph".

hi im swathy...im trying to implement LEACH in ns 2.27..bt im nt able to install ns2.27 on fedora 12...im getting this error when i install---- tclcl-1.15 make failed in ns-2.27...pls do help me..

HI !

I try install followed your instructions. When I edit file tclcl.h like your guidance, then I do command "./install". It informs another error that :

checking for X11 header files
checking for X11 library archive
checking for XOpenDisplay in -lX11... (cached) no
can't find X library
Ns configuration failed! Exiting ...
Please check http://www.isi.edu/nsnam/ns/ns-problems.html
for common problems and bug fixes.

Please tell me how to fix this problem.
Thanks,
Regards
Vo

Hello,

The error is because X11 Libraries are not installed. You can try installing them from Fedora CD or you can download the package and install it.

Hope it helps.

Regards,
Mohit P. Tahiliani

Hello
I try to install NS2.26 with a pacth SIP on Ubunto9.10
but that does not have to work because of the version of the gcc which is more raised

I want to know which version of Linux is suited in ns2.26 Or how install a version of gcc < 4.01 on ubunto9.10

Thank you very much
Imen :imenkhamessi@yahoo.fr

hi sir
i am doing my project in wsn...i have a sample code in wsn..can u help me how to run the code..should i include the patch in ns2.33

@Imen: ns-2.26 will work well with gcc-3.3. To install this version of gcc you need to download gcc package along with other dependent packages from Ubuntu site.

@Gini: The patch provided in this blog is designed to work with ns-2.26. Which is the sample code that you have? Is it a patch or a tcl script?

Hope it helps.

Regards,
Mohit P. Tahiliani

Hello Mohit,,, I am facing one problem since 3 days, it drives me crazy... with Fedora core 2 I have installed ns-2.26 the installation was OK but always face (bash: ns: command not found) problem, and i couldn't do any thing, the gcc3.3 already installed there and i think my PATH is ok but not sure, so if u can, from your experience help me out to solve this problem.

Thanks in Advance

ALI

Go in ns-allinone-2.26/ns-2.26 directory and give the following commands:

./configure

make clean

make

make install

Hope it helps.

Regards,
Mohit P. Tahiliani

I want to install ns-allinone-2.26 on ubuntu10.4 .It has compiled all the packages but at the end of installation sayes :

queue/red.cc: In member function ‘virtual void REDQueue::trace(TracedVar*)’:
queue/red.cc:807: error: invalid conversion from ‘const char*’ to ‘char*’
queue/red.cc:808: error: invalid conversion from ‘const char*’ to ‘char*’
queue/red.cc:809: error: invalid conversion from ‘const char*’ to ‘char*’
queue/red.cc:810: error: invalid conversion from ‘const char*’ to ‘char*’
make: *** [queue/red.o] Error 1
Ns make failed!

how can I solve this problem ??
Thanks

Hello Sir, i am working on SIP protocol's performance evaluation in NS2, do you have any idea or suggestion about it..? Its an application layer protocol, i have patched it in ns2 with patch given in RUI PRIOR's homepage(www.dcc.fc.up.pt/~rprior/ns/index-en.html)

the sip patch contains an example tcl file, but it is very simple and i dont know how to modify it or to make it complex. In that tcl file only two proxy and two nodes are present, so no delay or congestion. I tried with adding more no. of nodes to increase the complexity, it worked but didnt help a lot, please suggest anything.

I just want to evaluate certain QoS parameters like, delay, thoughput, control overhead, for SIP protocol. please suggest if anything else i can add.

any kind of help will be highly appreciated, thanks in advance. My email-id is vaibhavmishra07@gmail.com

@Vaibhav - To carry out a performance evaluation, you need to consider and design a standard topology (may be from IEEE Transactions or any other reputed technical bodies). The TCL scripts provided with patches are generally meant only for testing the working of the patch. Rather than modifying it, I would recommend you to design the entire script from scratch as per your requirements.

Hope it helps.

Regards,
Mohit P. Tahiliani

hello sir i am trying to install ns2.26 and getting the following error..please reply

code:
checking for X11 header files
can't find X includes
otcl-1.0a8 configuration failed! Exiting ...

how to install ns2.34 in redhet 5 enterprize version

@Satya - The installation procedure remains same on all Linux operating systems. But you may face few problems if all the necessary packages (like gcc, g++, X11 files, etc) are not installed correctly.

If you encounter any installation errors, you may post your query here!

Regards,
Mohit P. Tahiliani

@Santosh - There is a file named "Intrinsic.h" which is accessed by Otcl's configure file. The error is generated because this file is missing. You need to install X11 packages (Intrinsic.h file is available in these packages). If you are working on Ubuntu install the following packages and their dependent packages (which will be automatically listed out in Synaptic Package Manager):

libx11-dev
libxmu-dev
libxt-dev
libx11-headers-dev

If you are working on any other Linux OS, just install X11 files (including header files).

Hope it helps.

Regards,
Mohit P. Tahiliani

hello sir pls tell me how to install gcc3.3 version on fedora8.this is very urgent to my project sir.no one help to me for this.plsssss help me sir.

thanks in advance

kavitha

Hi Kavitha,
Recently I installed gcc-3.3 with the help of Mohit and these links.
http://www.mjmwired.net/resources/mjm-fedora-gcc.html
http://bagalamukhi.blogspot.com/2010/12/how-to-install-gcc-33-in-ubuntu-904.html
Hope it helps.

Ritika Sharma

patch -p1 -t < ns226nrl226.patch
when execute this command in fedora 13,it shows command not found please help me....

@Yogesh - Check whether you have correctly installed all the development packages.

Hope it helps.

Regards,
Mohit P. Tahiliani

Hi Sir Mohit!

What are the consequences of using a lower versioned NS in simulating WSNs.
Do you still use this version on your current simulations?

Thanks in advance and more power!

hello Sir...
this patch is basically for WSN right?
can i patch with NS2.34?
pls help me out....so much worried for my project....

Hi

I get this error when i try to install ms2.27 in windows 7? I have been stuck on this for more than 1 month and its greatly affecting my college work. Pls anyone help

tclcl-mappings.h:51: error: incomplete type ‘Tcl’ used in nested name specifier
tclcl-mappings.h:52: error: invalid use of undefined type ‘struct Tcl’
tclcl-mappings.h:41: error: forward declaration of ‘struct Tcl’
tclcl-mappings.h:57: error: invalid use of undefined type ‘struct Tcl’
tclcl-mappings.h:41: error: forward declaration of ‘struct Tcl’
make: *** [Tcl.o] Error 1
tclcl-1.0b12 make failed! Exiting ...
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems......
;;;;;;;
can u help me out of this error....

@Wilmarc - Lower versions of NS do not support many new protocols (routing as well as transport) which have been included in latest versions of NS. NRLSensorsim patch is compatible only with ns-2.1bxx, ns-2.26 and ns-2.27. It has not been modified for latest versions of NS-2. Yes, people are still using this patch for WSN simulations.

@Vish - This patch wont work with ns-2.34. You need to modify it further.

@Therocker - You need to go in following directory

ns-allinone-2.xx/tclcl-xx (where xx is the version number)

and search for the following file

tclcl.h

In the list of header files you will see the following line:

#include "tclcl-mappings.h"

Cut this line and paste it before the following line:

class InstVar;

This line will be most probably the 45th line of the file.

Hope it helps.

Regards,
Mohit P. Tahiliani

Can u give the modification steps for it?

Hello Sir,
We are trying to simulate WSN based on routing(flooding). which ns2 version should i install? Which language i should learn to work on it?

@Vish - I have not yet tried that!

@Manoj - Flooding is available in all versions of NS-2. The basic implementation for WSN is also available in NS-2 (see sensor-nets folder in ns-2 directory). However, specific patches related to WSN are Mannasim and NRLSensorsim. You should be learning C++ and TCL to work with NS-2.

Hope it helps.

Regards,
Mohit P. Tahiliani

hello sir

i m doing work on geographic routing protocol. plz suggest me how to take initial step in easiest manner. actually i have short period of time.............

thanks in advance

Asha sohal

@Asha - You may try understanding or modifying the code for GEAR protocol which is available in the basic NS-2 package.

Hope it helps.

Regards,
Mohit P. Tahiliani

Hello Sir

Thanks For ur advice. Instead of GEAR protocol i got LAR n GPSR coding but there are .cc & .h files.how to save these files.......
Plz suggest me.

thanks
Asha Sohal

@Asha - Most of the codes related to NS-2 are available in the form of Patches. If you too have got the patches of GPSR and LAR then apply the patch by using the command given above in the blog and then run the following commands:

make clean

make

make install.

GPSR patch for ns-2.29 is available on the following link:

http://ns-2.blogspot.com/2007/07/greedy-perimeter-stateless-routing-gpsr.html

Hope it helps.

Regards,
Mohit P. Tahiliani

hi sir,
i am trying to recompile MAC protocol for Ns-2.30 in fedora. After ./configure
config.status: creating Makefile
config.status: creating tcl/lib/ns-autoconf.tcl
config.status: creating indep-utils/webtrace-conv/ucb/Makefile
config.status: creating indep-utils/webtrace-conv/dec/Makefile
config.status: creating indep-utils/webtrace-conv/nlanr/Makefile
config.status: creating indep-utils/webtrace-conv/epa/Makefile
config.status: creating indep-utils/cmu-scen-gen/setdest/Makefile
config.status: creating autoconf.h
config.status: autoconf.h is unchanged


please help me to solve this problem.


thanks

Abdul gaffar

Hello sir

i have ns 2.35 version and trying to implement LAR protocol. As per our earlier discussion u told me that use make clean etc commands. But my question is this if i use these commands then wat will happen to my current ns version? or to run all the patches of LAR i have to install compatible version now. i have LAR-DREAM.tgz folder in which we have different different patch........ plz suggest me sothat i will do well.......

Thanks
Asha Sohal

Hello sir,
I want to install ns-allinone-2.1b7a in fedora 10 but gcc version of fedora10 is not compatible with ns-allinone-2.1b7a. Now what to do and how to get rid of this problem . I need this ns-allinone-2.1b7a to execute some code implemented in this version.

thanks
sanjoy

@Abdul - It is not an error. It has successfully created a Makefile. Next you need to give following commands:

make

make install

@Asha - These commands will not affect your ns-2 version. These commands are same for all ns-2 versions and are standard Unix commands. Moreover, check whether the LAR patch that you have is compatible with ns-2.35. If not, you cannot install that patch on ns-2.35. You will then have to install a compatible version of NS-2 that supports LAR.

@Sanju - You may have to install a lower version of gcc OR try to correct the installation errors. First choice is a better one if you are not familiar with Linux OS.

Hope it helps.

Regards,
Mohit P. Tahiliani

Hi sir

Thanks for ur reply.when i run step.tcl script based on LAR protocol there are sum errors like
loading the mobility file........
couldn't read file: no such file or directory
which type of files i have to put in opt(sc). plz suggest me.

Thanks
Asha Sohal

@Asha - You need to generate mobility file and scenario file using setdest and cbrgen respectively. Go through Section XI of "Marc Greis tutorial" to know details on how to do it. After generating both the files, place them in the same folder where your TCL script is placed and remove the path given in TCL script. Instead just write the name of the files there.

Hope it helps.

Regards,
Mohit P. Tahiliani

hello sir
I am getting problem when executing a tcl script in NS2 please help me out
INITIALIZE THE LIST xListHead
using backward compatible Agent/CBR; use Application/Traffic/CBR instead
using backward compatible Agent/CBR; use Application/Traffic/CBR instead
using backward compatible Agent/CBR; use Application/Traffic/CBR instead
using backward compatible Agent/CBR; use Application/Traffic/CBR instead
Start of simulation..
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
SORTING LISTS ...DONE!
ns: finish: couldn't execute "nam": no such file or directory
while executing
"exec nam -r 5m 1_out.nam &"
(procedure "finish" line 10)
invoked from within
"finish"

@Swaroopa - You need to make one change in TCL Script. Instead of using

[new Application/CBR] use [new Application/Traffic/CBR]

This will eliminate "using backward compatible Agent/CBR; use Application/Traffic/CBR instead" warnings.

"ns: finish: couldn't execute "nam": no such file or directory" error is occuring because nam is either not installed correctly or the path to nam is not correctly set.

Go in ns-allinone-2.xx/nam-1.xx directory (where xx represents versions) and give the following commands:

./configure

make clean

make

make install

Hope it helps.

Regards,
Mohit P. Tahiliani

hi mohit sir thank you sir i got it thanks a lot
I am pursuing my M.Tech project sir in that reguard I am doing my project on NS2 to implement minimum distance packet forwarding algorithm using aodv routing protocol. sir please can u guide me to understand otcl and c++ linkage in aodv .cc and aodv.tcl
and in my project.
once again thank you sir because i was suffering from these error since long time thanks alot

@Swaroopa - A nice tutorial that gives all details about AODV implementation in C++ and TCL Scripts is available on the following link:

www-npa.lip6.fr/~rehmani/aodv_v2.pdf

Hope it helps.

Regards,
Mohit P. Tahiliani

Hello sir
i am getting the following errors when i was using iNSPect

[root@localhost iNSpect_4_beta_3]# ./iNSpect -c out.conf -l2 out4.tr
WARNING: packetString in config file not set. Using default of " ".
WARNING: simulationSpeedAtInit in config file not set. Using default of ".01".
WARNING: simulationSpeedMinimum in config file not set. Using default of ".005".
WARNING: simulationSpeedMaximum in config file not set. Using default of "1".
WARNING: simulationSpeedManipulation in config file not set. Using default of ".005".
WARNING: partitioned in config file not set. Using default of "0.4 0 0.4".
WARNING: off in config file not set. Using default of "0.8 0.8 0.8".
WARNING: wirelessPacket in config file not set. Using default of "0 0 0".
WARNING: wiredLinkDown in config file not set. Using default of "1 0.6 0.6".
WARNING: wiredLinkActive in config file not set. Using default of "0 .3 0".
WARNING: wiredLinkInactive in config file not set. Using default of "0.6 1 0.6".
WARNING: connectionGraph in config file not set. Using default of "0.6 0.6 1".
Unable to interpret ns-2 wireless line "N -t 1.002585 -n 62 -e 99.999217"
[root@localhost iNSpect_4_beta_3]#

Please suggest me wat to do now. Which types of files i have to install.

Thanks
Asha Sohal

hello sir

Thanks for helping me in my tough n struggler days. Finally i have finished my thesis work........... n nowadays feeling relaxing..........touchwood....

Thanks
Asha Sohal

Dear MR. Mohit ;
I working on project of WSN for water quialty monitoring phenomena (PH,Dissolved oxygen ,..)I am trying to find the right simulator for simulate the WSN network node and measuring the temperature or Dissolved oxen ...)So I choose NS2 and I am confused for the right model with good support WSN model (NRL ,sensorsim or mannasim )?
Per in mind I install NS-2 2.34 successfully and I can install ver 2.29 or 2.27.

Could you please sir help urgent with your valuables advice for my situation ?

Ihab

I want to install ns-allinone-2.26 on Fedora 12. It has compiled all the packages but at the end of installation sayes :

queue/red.cc: In member function ‘virtual void REDQueue::trace(TracedVar*)’:
queue/red.cc:807: error: invalid conversion from ‘const char*’ to ‘char*’
queue/red.cc:808: error: invalid conversion from ‘const char*’ to ‘char*’
queue/red.cc:809: error: invalid conversion from ‘const char*’ to ‘char*’
queue/red.cc:810: error: invalid conversion from ‘const char*’ to ‘char*’
make: *** [queue/red.o] Error 1
Ns make failed!

how can I solve this problem ??
Thanks

Hello...

I am getting error when am trying to patch in ubuntu 10.04. is this because of gcc difference between fedora and ubuntu. suggest me any alternative if not the above as i need to work on wireless sensor networks. can you please tell me which ns2 versions are supported in ubuntu 10.04, so that I can switch to another version of linux where the above is supported.

Thanks in advance

hello Mohit sir...can u plz tell me hw to create wormhole node in routing protocol...

@Matu - The patch available on the following link includes wormhole and other security related simulation code:

http://apachepersonal.miun.se/~qinwan/resources.htm

Hope it helps.

Regards,
Mohit P. Tahiliani

Hi,

When I run LAR in ns-2.32 there are no sent packets. I can only see received packets. What could be the problem or what change do I need to make?
Thanks in advance.

Regards,
Kennedy

Hi,
I have these problem when install ns2.26 , please help me....

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-red ./test-all-pi ./test-all-jobs ./test-all-diffusion3 ./test-all-wireless-lan-gaf
to
re-run a specific test, cd tcl/test; ../../ns test-all-TEST-NAME

Notice that some tests in webcache will fail on freebsd when -O is turned on.

This is due to some event reordering, which will disappear when -g is turned on.


[linuxlab@localhost test]$ ../../ns test-all-red ./test-all-pi ./test-all-jobs ./test-all-diffusion3 ./test-all-wireless-lan-gaf

invalid command name "file="test-suite-red.tcl""

while executing
"file="test-suite-red.tcl""

(file "test-all-red" line 39)

Thanks..

@Kennedy - Verify whether the topology designed is correct. Also verify the post processing method you are using is correct.

@Ghadeer - These are warnings and do not affect your simulation.

Hope it helps.

Regards,
Mohit P. Tahiliani

hello! I have some problem you can help me!
this is my problem
In file included from sensornets-NRL/sensoragent.cc:50:0:
./sensornets-NRL/sensorapp.h:63:28: error: expected ‘)’ before ‘*’ token
./sensornets-NRL/sensorapp.h:67:5: error: ‘SensorApp’ does not name a type
./sensornets-NRL/sensorapp.h:82:25: error: expected ‘)’ before ‘*’ token
./sensornets-NRL/sensorapp.h:86:5: error: ‘SensorApp’ does not name a type
sensornets-NRL/sensoragent.cc: In constructor ‘SensorAgent::SensorAgent()’:
sensornets-NRL/sensoragent.cc:62:48: error: class ‘SensorAgent’ does not have any field named ‘sensor_app’
sensornets-NRL/sensoragent.cc: In member function ‘virtual void SensorAgent::recv(Packet*, Handler*)’:
sensornets-NRL/sensoragent.cc:84:9: error: ‘sensor_app’ was not declared in this scope
sensornets-NRL/sensoragent.cc: At global scope:
sensornets-NRL/sensoragent.cc:93:6: error: prototype for ‘void SensorAgent::attach_sensor_app(SensorApp*)’ does not match any in class ‘SensorAgent’
./sensornets-NRL/sensoragent.h:56:10: error: candidate is: void SensorAgent::attach_sensor_app(int*)
make: *** [sensornets-NRL/sensoragent.o] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
tuyenhip@ubuntu:~/ns-allinone-2.27$
thanks for help ^^

hallo sir
i want to install obs ns simulator. i want to know that on wich version of linux and on wich version of ns2 it will be installed.

thanks

Hello!
I want to implement CBRP in NS2.
I implemented in NS2.34 (Ubuntu 10.04, gcc-4.3) success but when I run a TCL scenario that incorrect compare theory.
I have supported by a person, and he said that I should implement in NS2.1b5, but I can install NS2.1b5 (Fedora 12 on Virtual Machine, gcc 3.4.3).
Do you know version of Linux and gcc to help me install NS2.1b5?
Thanks!

is there any patch available for wireless sensor network in ns-2.35-RC7 ?

Please give me some example foe wsn in ns2.26

Thank's

@Tuyenhip - The patch provided on this post is for ns-2.26. To install ns-2.27 - this patch will not work. You may try using the patch given on the following link:

http://www.mediafire.com/?oxmqayym5livnrk

@Rohit - You may trying asking a query to OBS-NS's author. Link is given below:

http://www.it.uc3m.es/imyelmo/obs-wlan.html

@Unknown - ns-2.1b5 is very old version of ns2. You can try to install it but it will pop up many errors due to incompatibility with newer gcc versions.

@Hira - No, its not available yet.

@Ghadeer - You can find sample TCL Script for WSN in nrlsensorsim patch for ns2.

Hope it helps.

Regards,
Mohit P. Tahiliani

Hi Mohit,

Will it be possible for you to create a patch for NS-2.34?? i need it urgently.

Though i tried to install the patch of NS-2.26 by following the manual instructions provided but i am getting lots of error.

Looking ahead to see positive reply for you.

HI

MY SELF MANAS. i am doing some research project in ns-2.34 . like routing protocol analysis, Qos etc , lan simulation. i am analyzing only those routing protocol which are already implemented in ns2(aodv,dsdv,dsr,tora). i want to add my own routing protocol. i studied the c++ code for aodv, but i can not understand the code. CAN U HELP ME OR CAN U PROVIDE ME SOME MATERIAL HOW TO WRITE C++ IN NS2 AND HOW TO RECOMPILE IT.

THANKS IN ADVANCE

REGARDS
MANAS PRATIM SARMA
CDAC BANGALORE
STUDENT

EMAIL: sarma32@gmail.com

Hi Mohit sir......
I do some scenarios for wsn in ns2.26 and i want to read result from java class but didn't run becuase it for MANET, so please i want class in java read my resule , PDF , End-to-End Delay and RPO ..............

Thanks

Dear Mohit
Greetings
I have gone through your blog and I hope you will providing me below answer
can ns-allinone2.26 can be installed in fedora 14? HOW?
can ns code written in ns2.26 be run in ns2.34? HOW?
can two version of ns2 (ns2.26 and ns2.34) be installed in one OS (fedora14)
is there source code for game theory application in MANET or SENSOR NW
Regard
sanjay

does cbrp works on ns2.1b5?????
i got the following error while installing ns2.1b5...

configure: error: Installation of tcl seems incomplete.
Please correct the problem or re-run with --with-tcl=no.
tclcl-1.0b8 configuration failed! Exiting ...

please help me to resolve this error................
i want to patch cbrp on ns2.1b5...

thanks in advance
regards
shahid

Dear Mohit
I want to install ns2.27 on fedora 10 but it has error after ./validate:

Test output agrees with reference output
All test output agrees with reference output.
*** ./test-all-rng
Tests: rngtest
Running test rngtest:
../../ns test-suite-rng.tcl rngtest QUIET
Test output agrees with reference output
All test output agrees with reference output.
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-red
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
Notice that some tests in webcache will fail on freebsd when -O is turned on.
This is due to some event reordering, which will disappear when -g is turned on.


How can I solve this problem? Please help me.
Thanks in advance

@Rahul - It is a time consuming process and hence you may have to wait!

@Manas - Search for the following document:

Implementing a new MANET Unicast Routing Protocol in NS-2.

It is a nice guide to implement a new routing protocol in NS-2.

@Ghadeer - Sorry, I have not worked with that so cant help much!

@Sanjay - Yes you can install it. You may have to resolve all the gcc errors that pop up.

Yes you can port the code written for ns-2.26 to ns-2.34. You may have to make changes manually by going line by line, file by file.

Yes you can install any number of ns2's in same operating system. All that you need to do is keep active one at a time. Copy all the executables (available in ns-allinone-2.xx/bin) of ns2 which you want to make active and paste them in /usr/local/bin

I have not come across any patches for game theory application in MANETs or WSNs. Will post here if found any.

@Shahid - ns-2.1b5 is quite old version of ns2. Current gcc version may not support it. You may have to revert back to older gcc versions to install it.

@SMM - Validation of all tests is not always required. You may just check whether the protocols you need are tested correctly or not. If so, you may start using ns2 without verifying further.

Hope it helps.

Regards,
Mohit P. Tahiliani

How to use the $node at $time setdest in loop....
please help me ....
Thanks

How to use setdest -n -p pausetime -s -t -x -y Source: ns-2
I do not Know how to sue it...

thanks a lot mohit..

is it possible to use cryptography in ns2 sir? is ns2 use real network programming such as socket programming or it just simulation?

@Ghadeer- The following link will be helpful to you:

http://www.isi.edu/nsnam/ns/tutorial/

Section XI is related to your queries.

@Ravi- It can be used as a simulator as well as an emulator. Yes you can use it for cryptography but default allinone package does not provide any features related to it so you need to design your own C++ code.

Hope it helps.

Regards,
Mohit P. Tahiliani

hello sir... I am a new user to this simulator.. currently I am working on different radio propagation models along with fading models in a heterogeneous environment.. so please can you tell me how to interface bluetooth with zigbee and wifi..

hai Mr.Tahiliani. My name is jagan. I am doing project WSN in NS2. Can you tell me how to install ns2.26 in ubuntu 10 or ubuntu 11 version. The above patch is not working with ns2.35. i become mad ( i dont know how to complete my project) bad days for me.. Please help me..

@Nair - As of now you cannot directly interface them in NS-2. You may try to work with NIST patch which interfaces two heterogeneous networks. The patch is available for ns-2.29.

@Jagan - You may try to work with Ubuntu 9.04 as you can easily install ns-2.26 and hence NRLSensorsim patch as well. A patch for NRLSensorsim on ns-2.34/ns-2.35 is in progress.

Hope it helps.

Regards,
Mohit P. Tahiliani

hello sir ,

i need source code or patch for gpsr routing in manet
please help me

can i install ns2.27 in fedora 13?

sir.
please say d steps to create wireless sensor node in ns2 with 802.11
i need it for project.

sir,

I have followed all the above steps u mentioned and successfully installed the ns2.26 with nrlsensorsim 2.26 in fedora 8.but when i run the example simulation programs i get the following error

ccproject@localhost pradeep]$ ns finally.tcl
This is a multi-channel sensor network test program.
num_nodes is set 27
Starting Simulation...
ns: [Simulator instance] puts-nam-traceall {r -t 20.027277460 -s 15 -d -1 -p NRLOLSR -e 76 -c 2 -a 0 -i 0 -k RTR -R 192.96 -D 0.02}: can not find channel named "file4"
while executing
"puts $namtraceAllFile_ $str"
(procedure "_o3" line 4)
(Simulator puts-nam-traceall line 4)
invoked from within
"[Simulator instance] puts-nam-traceall {r -t 20.027277460 -s 15 -d -1 -p NRLOLSR -e 76 -c 2 -a 0 -i 0 -k RTR -R 192.96 -D 0.02}"

pls help with this....

ns:
[code omitted because of length]
: wrong # args: should be {Simulator instproc name args body}
(Class instproc line 1)
invoked from within
"Simulator instproc { node } {
set ragent [new Agent/TORA [$node id]]
$node set ragent_ $ragent
return $ragent
}"

can anyone help me..

i found this error when i had execute /root/ns-allinone-2.34/ns-2.34/tcl/mobility/tora.tcl file in which it include creating a node as a routing agent..

Hi Mohit,
i am trying to implement LEACH protocol in ns2.35.
Can you help??Is it the right version for testing LEACH??
i am stuck!!

Hi Mohit
I am trying to simulate a power aware dual tree based MAODV.can i simulate Maodv using ns2.34 and how?

hello sir.. i m swapna. i m doing project in Ns-2.1b5 using CBRP protocol. i want the patch file that has to be attached to run CBRP as not pre defined in NS. or let me know which version of NS is having CBRP with out attaching patch file.. plz help me.. i need to do my project n submit it in 3 days.. plz help me. thank yu in advance

hi sir,
Can I simulate MAODV in ns2.34.?i have read that u hav to use ns2.26 to run MAODV.If i hav to use ns2.26 which version of linux might b used?Is it possible to downgrade gcc version of ubuntu 10.04 to gcc 3.3.

hi mohit.
I am trying to install ns2.27 in fedora 8,12 but unable to get it done. Its giving an error "make failed". please help me out of this problem as i want to implement FSR protocol

Hi MR.Mohit i am working with ns2.26 and follow all the instruction in for implementation of DRAND in it. It is successfully installed and i now i am facing problem during execution.To reach this point i took almost 1 year a huge duration. Now its the final stage could you help me the how should i execute the tcl file i mean the syntax etc.
Syntax in tutorial is as ns simple-wireless.tcl
i have tried many syntax but failed. here above mentioned syntax i am not sure what does the author refer the
would you guide me thanks in advance

r/s sir i m suman persuning my mtech
my thesis on multipath routing protocol
sir whom version of ns2 support multipath dsr, smr,msr
sir plz reply me urgent
thanks

Dear Mohit
Greetings
I have gone through your blog and I hope you will providing me below answer
can ns-allinone2.26 can be installed in fedora 14? HOW?
can ns code written in ns2.26 be run in ns2.34? HOW?
can two version of ns2 (ns2.26 and ns2.34) be installed in one OS (fedora14)
is there source code for game theory application in MANET or SENSOR NW
Regard
suman

mohit sir i m working on multipath routing protocols
but not able to find code of my porotocol on version ns2.34
on whom verson dsr mpdsr, smr ,msr protocol belongs plz reply me sir
thanks
regards
suman

sir , i am trying to add phenom and sensoraget by nrl both to ns2.35 using fedora 16 platform, it has taken from me a long time ,but still not successful.
your cooperation with user of ns2 on this forum cannot be appreciated in words,,, you help is requested , your guidance is urgently required ...thank you

sir , i am trying to add phenom and sensoraget by nrl both to ns2.35 using fedora 16 platform, it has taken from me a long time ,but still not successful.
your cooperation with user of ns2 on this forum cannot be appreciated in words,,, you help is requested , your guidance is urgently required ...thank you

I am getting the following errors after i do
./configure

make depend

make install and then ....

make

from ns2.35 director on fedora 16 platform....



In file included from sensornets-NRL/sensoragent.cc:50:0:
./sensornets-NRL/sensorapp.h:63:28: error: expected ‘)’ before ‘*’ token
./sensornets-NRL/sensorapp.h:67:5: error: ‘SensorApp’ does not name a type
In file included from sensornets-NRL/sensoragent.cc:50:0:
./sensornets-NRL/sensorapp.h:82:25: error: expected ‘)’ before ‘*’ token
./sensornets-NRL/sensorapp.h:86:5: error: ‘SensorApp’ does not name a type
sensornets-NRL/sensoragent.cc: In member function ‘virtual void SensorAgent::recv(Packet*, Handler*)’:
sensornets-NRL/sensoragent.cc:97:14: warning: unused variable ‘ch’ [-Wunused-variable]
make: *** [sensornets-NRL/sensoragent.o] Error 1

Any support for WSN simulation in ns2.34 or 2.35. As NRL SensorSim and Mannasim both are for older versions of ns2. Mannasim patch for 2.34 is available but doen not have many in-built protocols. Please help

Hi
Can you please help me to install ns2.26 in fedora 16. During installation, i got a problem. Do you where i have to make changes regarding this?

Hi
I am doing my project on "cooperative mac protocol design"
can anyone tell how to use multirate transmission in my protocol design
Thanks in advance
Naga Lakshmi A

Hi
I am trying to install obs-ns but
when I write make clean; make i get some errors:
make:*** obs-0.9a/ccp/integrated-agent.o Error1
can anybody help me?

Thanks

Hello sir, Do know about any ns-2(2.34v) patch which supports gts mechanism in ieee 802.15.4 protocol?

hello sir,
I want help to run umts script for ns-2.30 available at eurane website to study tcp performance evolution over UMTS network...

Dear Mohit,

You are doing great service to NS2 community. i appreciate it.
I Could not find the nrl sensorism patch for ns2.1ba patch in the link you specified.
http://www.esnips.com/doc/4392e5f2-6c95-43d6-b174-3e5b461d34c2/ns21b9a

Is there any other source to get that?.

Could you also suggest How we shall port older ns2.1bX source codes to ns2.33.

Thanks & Regards
swecha

sir plz reply

Mohit Sir, I am working on ipv4 and ipv6 mobility model if you have any ns2 patch or code regarding this, kindly send me

Hello Sir,
I have started using ns-2 for sensor network but most of the website gives we can use SensorAgent for WSN for that we need to install nrlssensor how to install this on ns-2.34 please help me

Have u done implementation of SPINS protocol by Adrian Perrig in any programming language. Even partial implementation or code with some bugs will also help. Need pointers on how to start implementing it.

which patch is required for cooperative mac protocol in wireless network?

Dear every one, I am implementing malicious node in dsdv but I have found big challenges. I can add the malicious nodes in aodv but I have failled for dsdv. Can any one out there help me?

thanks a lot

Sir, I want to simulate WSN routing protocols in ns2.35. I am new to this field. Is it possible in ns 2.35 if yes pls guide me sir. provide me steps of installation of ns for WSN environment. If any other software please let me know. Thanks

sir, i am installing ns2.26 with nrlsensorsim on ubuntu,,,and following errors occurs.
In file included from sensornets-NRL/sensoragent.cc:49:0:
./sensornets-NRL/sensoragent.h: At global scope:
./sensornets-NRL/sensoragent.h:56:28: error: ‘SensorApp’ has not been declared
./sensornets-NRL/sensoragent.h:60:5: error: ‘SensorApp’ does not name a type
In file included from sensornets-NRL/sensoragent.cc:50:0:
./sensornets-NRL/sensorapp.h:63:28: error: expected ‘)’ before ‘*’ token
./sensornets-NRL/sensorapp.h:67:5: error: ‘SensorApp’ does not name a type
./sensornets-NRL/sensorapp.h:82:25: error: expected ‘)’ before ‘*’ token
./sensornets-NRL/sensorapp.h:86:5: error: ‘SensorApp’ does not name a type
sensornets-NRL/sensoragent.cc: In constructor ‘SensorAgent::SensorAgent()’:
sensornets-NRL/sensoragent.cc:62:48: error: class ‘SensorAgent’ does not have any field named ‘sensor_app’
sensornets-NRL/sensoragent.cc: In member function ‘virtual void SensorAgent::recv(Packet*, Handler*)’:
sensornets-NRL/sensoragent.cc:84:9: error: ‘sensor_app’ was not declared in this scope
sensornets-NRL/sensoragent.cc: At global scope:
sensornets-NRL/sensoragent.cc:93:6: error: prototype for ‘void SensorAgent::attach_sensor_app(SensorApp*)’ does not match any in class ‘SensorAgent’
./sensornets-NRL/sensoragent.h:56:10: error: candidate is: void SensorAgent::attach_sensor_app(int*)
make: *** [sensornets-NRL/sensoragent.o] Error 1
Ns make failed!


can u help me to remove this error..thank you

@Sharru - In sensoragent.h, just after the header files are included, add the following line:

class SensorApp;

This should solve your problem.

Hope it helps.

Regards,
Mohit P. Tahiliani

@mohit
si,i added the line,but it did not work.still same error.
thanks for ur help.

Hello Mohit!

Could you please give me some clarification regarding which is better one, either NRLSensorsim or Mannasim? What are the differences between these two tools?

Also, can we try to install nrlsensorsim on ubuntu 12.04 (32-bit OS) and ns-allinnoe-2.35? I am facing some problems even in ns-2.36 and ns-2.27... like

ntax error: Unterminated quoted string
tcl8.3.2 configuration failed! Exiting ...
Tcl is not part of the ns project. Please see www.Scriptics.com
to see if they have a fix for your platform.

@Sharru - Try

class SensorAgent;

@Manjula - It depends on what type of work you are trying to do in WSNs.

NRLSensorsim is good option if you focusing on routing protocols. Mannasim is a good option if you are working specifically on LEACH or energy related issues.

Since both were made for older versions of ns-2, they will certainly have issues with the recent most GCCs. You will have to go through tedious installation procedure!

Hope it helps.

Regards,
Mohit P. Tahiliani

Sir,nrlsensorsim installed but following error occurs when i run sample files...

ns: [Simulator instance] puts-nam-traceall {r -t 10.067273770 -s 0 -d -1 -p PHENOM -e 0 -c 2 -a 0 -i 7012364 -k RTR -R 192.96 -D 0.02}: can not find channel named "file4"
while executing
"puts $namtraceAllFile_ $str"
(procedure "_o3" line 4)
(Simulator puts-nam-traceall line 4)
invoked from within
"[Simulator instance] puts-nam-traceall {r -t 10.067273770 -s 0 -d -1 -p PHENOM -e 0 -c 2 -a 0 -i 7012364 -k RTR -R 192.96 -D 0.02}"


can you please help to resolve it...

@Sharru - Comment the following line using a #

puts $namtraceAllFile_ $str

It is just a print line and I believe would not affect your simulation even if you comment it.

Hope it helps.

Regards,
Mohit P. Tahiliani

sir actually there is no line like puts-nam-traceall in sample files ...

@Sharru - The fourth line of your error message says that the error is coming from that line itself. Take a look at the error messages, specifically line 2 and line 4.

Hope it helps.

Regards,
Mohit P. Tahiliani

Hello sir
I am Mtech student doing my thesis in WSN Routing protocol i e Minimum Cost Forwarding.
Can u Provide me any example related to it. And which patch should i use mannasim or nrlsensorsim.

Hello sir
I have started working with NS2.35 for implementing clusters in MANET.If u have ns2 code or patch for CBRP , kindly send me

@Nahid - Check the thread on the following link:

http://www.linuxquestions.org/questions/linux-newbie-8/how-to-install-cbrp-protocol-in-ns2-35-a-925564/

Hope it helps.

Regards,
Mohit P. Tahiliani