LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-22-2014, 06:59 AM   #1
Riaz Khan
Member
 
Registered: Apr 2012
Posts: 41
Blog Entries: 2

Rep: Reputation: Disabled
mannasim on ns2.35


Hi everyone,
i followed the procedure given here : http://www.nsnam.com/2013/06/mannasi...lator-for.html

After #./configure, when i ran "#make" command i got the following errors:

.text._ZN11WirelessPhyD2Ev' referenced in section `.text._ZN11WirelessPhyD1Ev[non-virtual thunk to WirelessPhy::~WirelessPhy()]' of mac/wireless-phy.o: defined in discarded section `.text._ZN11WirelessPhyD2Ev[_ZN11WirelessPhyD5Ev]' of mac/wireless-phy.o
collect2: ld returned 1 exit status
make: *** [ns] Error 1



Please anybody help me to resolve this, even after this my ns2 has stopped working and it shows a message:

"[riazkhan@localhost ~]$ ns
Command not found. Similar command is: 'nc'
[riazkhan@localhost ~]$
"
please help me...
 
Old 08-23-2014, 08:07 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
If you want to use the example files from Pradeepkumar,
http://www.nsnam.com/2013/06/mannasi...lator-for.html
... you will have to clean the provided mannasim/ folder :
$ rm -f *.o
I.e. the already compiled ``objects.o´´ may not work with your OS.
Also : The files.cc may not be usable with a contemporary g++ compiler.


The tested solution that I know is the mannasim patched "ns-allinone-2.35-paultsr"
https://github.com/paultsr/ns-allinone-2.35
>>> $ git clone https://github.com/paultsr/ns-allinone-2.35
$ cd ns-allinone-2.35/ && ./install
$ cd ns-2.35/
$ strip ns
$ cp ns ns235-mannasim
# cp ns235-mannasim /usr/local/bin/
$ ns235-mannasim mannasim-rede-plana.tcl
Comments : The `paultsr´ ns-allinone-2.35 is updated to use e.g. gcc-4.7,
may be 4.8 (I don't remember), like the upcoming ns-allinone-2.36 .

Ref. #24 http://www.linuxquestions.org/questi...77#post4970177

? Any questions ? Then please specify your OS :
a) $ uname -a
b) OS name and version.

-

Last edited by knudfl; 08-23-2014 at 08:11 AM.
 
Old 08-25-2014, 06:10 AM   #3
Riaz Khan
Member
 
Registered: Apr 2012
Posts: 41
Blog Entries: 2

Original Poster
Rep: Reputation: Disabled
thanks Knudfl,
i resolved the problem mentioned above, i again ran ./install with the MANNASIM folder pasted unde cd ns-2.35 and after that i tried those two scripts shown in http://www.nsnam.com/2013/06/mannasi...lator-for.html to check it, it worked and showed the expected outcome.

Now i want some more help, i want to implement FHPMIPv6 and PMIPv6 protocols for WSN on NS2, As i know mannasim is for providing WSN environment that i have patched but now please suggest me how to implement FHPMIPv6 and PMIPv6 for the same. your suggestions are always helpful to us. thanks...

Last edited by Riaz Khan; 08-25-2014 at 06:11 AM.
 
Old 08-28-2014, 01:27 AM   #4
Riaz Khan
Member
 
Registered: Apr 2012
Posts: 41
Blog Entries: 2

Original Poster
Rep: Reputation: Disabled
hello Knudfl,
Please suggest me some solution, i am waiting for your valuable suggestions.
 
Old 08-28-2014, 06:03 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
# 3 .
Quote:
I want to implement FHPMIPv6 and PMIPv6 protocols for WSN on NS2
Not a subject, I know anything about.

FHMIP info http://www.linuxquestions.org/questions/tags/fhmip/

PMIP6 http://www.linuxquestions.org/questions/tags/pmip6/

Also see Wimax http://www.linuxquestions.org/questions/tags/wimax/
.. and NIST http://www.linuxquestions.org/questions/tags/nist-mob/

-
 
Old 08-28-2014, 06:19 AM   #6
Riaz Khan
Member
 
Registered: Apr 2012
Posts: 41
Blog Entries: 2

Original Poster
Rep: Reputation: Disabled
thanks knudfl,
Now i am trying ns2.29 for the same and also will go through the links you have provided in #3. I installed ns2.29 succesfully but the already installed NAM-1.14 is only working in ROOT mode '#'. please tell me how to change the privileges. one more query is when we install more than two versions of ns2 then how to set the paths in .bashrc file or how to switch between the two. please if possible give steps here and do no the links as i have followed the links but could not understand them well.

thanks in anticipation.

Last edited by Riaz Khan; 08-28-2014 at 06:33 AM.
 
Old 08-28-2014, 07:36 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
# 6 .

? What happens when you type $ /usr/local/bin/nam

? Which OS are you using ?
Should be told by every question !
. http://www.linuxquestions.org/linux/...Ask_a_Question
. http://linuxsilo.net/docs/smart-questions_en.html
Or you can add the OS specs to your profile, here at LQ.
Like "CentOS 7 - 64bits".

Making sure you have the right permissions :
# chmod 0755 /usr/local/bin/nam

Also :
Are you sure that /usr/local/bin/ is in the PATH of your ordinary user ?
→ → $ echo $PATH

-

Last edited by knudfl; 08-28-2014 at 07:39 AM.
 
Old 08-28-2014, 07:53 AM   #8
Riaz Khan
Member
 
Registered: Apr 2012
Posts: 41
Blog Entries: 2

Original Poster
Rep: Reputation: Disabled
i tried the above command "# chmod 0755 /usr/local/bin/nam" and resolved the nam problem .
i am using FEDORA 14.

NOW i am with "ns2.29" installed with "mannasim-patch.diff" successfully along with working NAM and separately installed XGRAPH.

I have downloaded "pmip6-for-ns-2.29-nist.patch" and "ns-2.29-nist-mob-022707 package", Please guide me how to patch "pmip6-for-ns-2.29-nist.patch" . Do i need "ns-2.29-nist-mob-022707 package" for the patch as i want to simulate PMIPv6 protocol for WSN.

Your help is always great. Really thankful to you Mr. Knudfl
 
Old 08-28-2014, 08:09 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
# 8 .

OK, Fedora. The 32bits (i686) Fedora 14 can be used. Not 64bits !
Ref. http://www.linuxquestions.org/questi...-a-4175463585/
(#10 etc.) Please read all the posts.
Please use this command to test the OS : $ uname -m

The build goes like this ...
$ tar xvf ns-allinone-2.29.3.tar.gz
$ cd ns-allinone-2.29/
$ tar xvf ns-2.29-nist-mob-022707.tgz
$ patch -p0 < pmip6-for-ns-2.29-nist.patch
$ export CC=gcc34 CXX=g++34 && ./install

Please read http://www.linuxquestions.org/questions/tags/pmip6/

-

Last edited by knudfl; 08-28-2014 at 08:10 AM.
 
Old 08-28-2014, 08:14 AM   #10
Riaz Khan
Member
 
Registered: Apr 2012
Posts: 41
Blog Entries: 2

Original Poster
Rep: Reputation: Disabled
thanks Mr. Knudfl for you immediate reply,
I will follow the post #8 and will get back to you soon.
Thanks alot
 
Old 08-29-2014, 05:56 AM   #11
Riaz Khan
Member
 
Registered: Apr 2012
Posts: 41
Blog Entries: 2

Original Poster
Rep: Reputation: Disabled
hello Mr. Knudfl
As my OS is FEDORA 14- 64bit and I got the package "pmip6-nistmob-ns-2.29-1.el5.x86_64.rpm". I was not knowing how to use it. I put it in the "ns-allinone-2.29" and double clicked it and it get installed. Further i put the patch "pmip6-for-ns-2.29-nist.patch" in "ns-allinone-2.29" and tried to patch it with command and showed the following:


"[riazkhan@localhost ~]$ cd ns-allinone-2.29/
[riazkhan@localhost ns-allinone-2.29]$ patch -p1 < pmip6-for-ns-2.29-nist.patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -uNr ns-2.29-nist/hsntg/nd.cc ns-2.29/hsntg/nd.cc
|--- ns-2.29-nist/hsntg/nd.cc 2007-01-20 07:31:42.000000000 +0900
|+++ ns-2.29/hsntg/nd.cc 2009-08-11 15:14:27.031250000 +0900
--------------------------
File to patch:
Skip this patch? [y] "



Please help me to resolve this...
 
Old 08-29-2014, 06:56 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Ref. #11 .

Please read post #9 :
! It's $ patch -p0 < pmip6-for-ns-2.29-nist.patch
! Not -p1 → → You will have to start from scratch with ..
$ tar xvf ns-allinone-2.29.3.tar.gz

And : You cannot use a 64bits OS for ns2 / the above additions.
Please install a 32bits OS on a spare partition / a spare disk.

-
 
Old 08-29-2014, 07:36 AM   #13
Riaz Khan
Member
 
Registered: Apr 2012
Posts: 41
Blog Entries: 2

Original Poster
Rep: Reputation: Disabled
Sir i followed your steps given in #9

"The build goes like this ...
$ tar xvf ns-allinone-2.29.3.tar.gz
$ cd ns-allinone-2.29/
$ tar xvf ns-2.29-nist-mob-022707.tgz
$ patch -p0 < pmip6-for-ns-2.29-nist.patch
$ export CC=gcc34 CXX=g++34 && ./instal"

It got patched successfully even on 64 bit OS.
"[riazkhan@localhost Desktop]$ ns pmip.tcl
num_nodes is set 6
INITIALIZE THE LIST xListHead
_o97 channelID = 2412000000.000000
_o127 channelID = 2437000000.000000
_o200 channelID = 2412000000.000000
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 513.3
SORTING LISTS ...DONE!
Link Connect to AP 0 on Channel 1
Link Connect to AP 1 on Channel 6
[riazkhan@localhost Desktop]$ "


After this i tried the patch "mannasim-patch.diff" but it showed me error:

"....patching file ns-2.29/tcl/lib/ns-default.tcl
Hunk #1 succeeded at 559 (offset 6 lines).
patching file ns-2.29/tcl/lib/ns-lib.tcl
Hunk #1 FAILED at 334.
Hunk #2 succeeded at 380 (offset 8 lines).
Hunk #3 succeeded at 784 (offset 36 lines).
1 out of 3 hunks FAILED -- saving rejects to file ns-2.29/tcl/lib/ns-lib.tcl.rej
[riazkhan@localhost ns-allinone-2.29]$
"

And if i install "mannasim...diff" seperately without pmipv6 then it works well. Sir i want both these on the same version. can't we have both of these together. please suggest sir..

Last edited by Riaz Khan; 08-29-2014 at 07:48 AM. Reason: wanted to show output
 
Old 08-29-2014, 09:50 AM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Ref. #13 .

There is a conflict when mannasim is added with pmip6-for-ns-2.29-nist.
Quote:
mac/mac-802_11.cc: In member function `void Mac802_11::sendAssocRequest(int)':
mac/mac-802_11.cc:1784: error: `dh' was not declared in this scope
mac/mac-802_11.cc:1788: error: `rTime' was not declared in this scope
I have no solution.


The combined patch, mannasim+nist+pmip6.patch_ns229.gz
https://drive.google.com/file/d/0B7S...it?usp=sharing

$ cd ns-allinone-2.29/
$ zcat mannasim+nist+pmip6.patch_ns229.gz | patch -p0

-
 
Old 08-29-2014, 01:17 PM   #15
Riaz Khan
Member
 
Registered: Apr 2012
Posts: 41
Blog Entries: 2

Original Poster
Rep: Reputation: Disabled
Sir i also tried #14 but got the same error:

"mac/mac-802_11.cc: In member function `void Mac802_11::sendAssocRequest(int)':
mac/mac-802_11.cc:1784: error: `dh' was not declared in this scope
mac/mac-802_11.cc:1788: error: `rTime' was not declared in this scope
make: *** [mac/mac-802_11.o] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
[riazkhan@localhost ns-allinone-2.29]$ "

Please suggest some way as i want to implement PMIPv6 and FPMIPv6 for WSN
please help...
 
  


Reply

Tags
mannasim, ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mannasim ns2.34 thikathika Linux - Software 7 10-09-2014 07:35 AM
Error in mannasim simulation in ns2.35 kien2106 Linux - Software 6 05-08-2014 09:22 PM
want to install ns2.29.3 along with mannasim patch for ns2.29 jeevanpinto Linux - Software 4 10-02-2013 01:09 AM
How to add NAM with mannasim in ns2.34 Aska123 Linux - Software 1 04-10-2013 03:14 PM
How to install Mannasim on Ns2.33 Aska123 Linux - Wireless Networking 1 04-05-2013 04:50 AM


All times are GMT -5. The time now is 06:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration