LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 09-26-2011, 04:25 AM   #1
hassan329
LQ Newbie
 
Registered: Sep 2011
Posts: 18

Rep: Reputation: Disabled
How to install ZRP (Zone routing protocol) patch in ns-2.34


I am new in ns, I want to install the patch of zrp in ns-2.34 on ubuntu 10.10. Did anyone know how to do that. Thanks.
 
Old 10-04-2011, 04:01 AM   #2
hassan329
LQ Newbie
 
Registered: Sep 2011
Posts: 18

Original Poster
Rep: Reputation: Disabled
no reply. please anyone help me in this problem
 
Old 10-05-2011, 12:10 AM   #3
hassan329
LQ Newbie
 
Registered: Sep 2011
Posts: 18

Original Poster
Rep: Reputation: Disabled
I download the patch from the following link (http://sites.google.com/site/nsnamzrp/) but it did not install
 
Old 10-05-2011, 06:16 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,668

Rep: Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544
The code from http://sites.google.com/site/nsnamzrp/
.. is for the ancient ns-allinone-2.1b6a.
Ns-allinone-2.1b6a cannot be used, unless you have an old computer
with a 10 year old Linux OS.


The only hints, I have found about zrp for a later ns2, is this
http://magnet.daiict.ac.in/magnet_me.../ZRPManual.pdf
The headline says "ZRP Agent for NS2 (NS-2 v2.33) ..."

..
 
Old 10-05-2011, 11:58 PM   #5
hassan329
LQ Newbie
 
Registered: Sep 2011
Posts: 18

Original Poster
Rep: Reputation: Disabled
Thank you for your reply.I read that manual, but when i install it i get error after writing the command
administrator@ubuntu:~/ns2/ns-allinone-2.34/zrp$ patch -p1 <patchmyZRP.sh && ./configure && make
bash: patchmyZRP.sh: No such file or directory

and if i run it from root i get error
root@ubuntu:~# patch -p1 <patchmyZRP.sh && ./configure && make
-bash: patchmyZRP.sh: No such file or directory

root@ubuntu:/home/administrator/ns2/ns-allinone-2.34/zrp# patch <patchmyZRP.sh && ./configure && make
patch: **** Only garbage was found in the patch input.

Last edited by hassan329; 10-06-2011 at 12:55 AM.
 
Old 10-06-2011, 04:38 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,668

Rep: Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544
#5 : http://magnet.daiict.ac.in/magnet_me...n.html#Sec_1.2

http://magnet.daiict.ac.in/magnet_me....33_ZRP.tar.gz
http://magnet.daiict.ac.in/magnet_me...PatchZRP.patch
http://magnet.daiict.ac.in/magnet_me.../patchmyZRP.sh

It is assumed, that you have a working ns-allinone-2.33,
i.e. the './install' command was run with no errors.

""Section 3.2 Instructions :
1. First put following files into NS-2 home's parent directory:
* ns-allinone-2.33_ZRP.tar.gz (This contains my code)
* PatchZRP.patch
* patchmyZRP.sh (THIS SHELL-SCRIPT FILE -
This script file should be run from NS-2 home' parent directory)
2. Run patchZRP.sh from shell."" ( Like 'sh patchZRP.sh' ).
.....

But the script patchZRP.sh isn't working, easier to do manually :
a) cd ns-allinone-2.33/ && patch -p1 < PatchZRP.patch
b) touch ns-2.33/common/packet.h && touch ns-2.33/trace/cmu-trace.h
c) cd ../ && tar xvf ns-allinone-2.33_ZRP.tar.gz
d) cd ns-allinone-2.33/ns-2.33 && make -k
... Tested this morning on Ubuntu 10.10, 32bits : OK.

.

Last edited by knudfl; 10-06-2011 at 05:12 AM.
 
Old 10-09-2011, 01:38 AM   #7
hassan329
LQ Newbie
 
Registered: Sep 2011
Posts: 18

Original Poster
Rep: Reputation: Disabled
Thank you for the installation instruction. I am installing this ZRP patch in ns-2.34.
 
Old 10-09-2011, 06:08 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,668

Rep: Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544
1) A patch / modification will most often only work for
the version of ns-2.xx, that it was meant for.

2) The Zrp files do not work with ns-2.34 .

3) You can have as many versions of ns-allinone-2.xx
as you want, installed at the same time.
But do not add any of them to a PATH, LD_LIBRARY_PATH.
( I have up to 10 version installed on each OS.)

..
 
Old 10-10-2011, 12:38 AM   #9
hassan329
LQ Newbie
 
Registered: Sep 2011
Posts: 18

Original Poster
Rep: Reputation: Disabled
Then how that version works if we do not set its path.
 
Old 10-10-2011, 02:59 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,668

Rep: Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544
1) nam is a separate application. One 'nam' in /usr/local/bin/ will do.

2) The binary 'ns' is coded to know or find the path by itself. Usually.
All binary ns can have a copy in /usr/local/bin/ns-<version> ,
like this real life example
Code:
/usr/local/bin/ns*            /usr/local/bin/ns229-LTE*
/usr/local/bin/ns227*         /usr/local/bin/ns233*
/usr/local/bin/ns227-dtn*     /usr/local/bin/ns233-lte*
/usr/local/bin/ns227-leach*   /usr/local/bin/ns234*
/usr/local/bin/ns228*         /usr/local/bin/ns-234-vbr*
/usr/local/bin/ns228-mympeg*
And ns can also be used inside ns-2.xx/ as ./ns

..
 
Old 10-10-2011, 03:38 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,668

Rep: Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544
A little more information about where ns looks for its libraries.

Imagine an "ns-allinone-2.34" built in /home/name/tmp-1 : The binary
ns will use libtcl* etc. from /home/name/tmp-1/ns-allinone-2.34/lib/


Then we try moving the whole application ns-allinone-2.34/ away from
/home/name/tmp-1/ .... .... to : /home/name/tmp-0

Now an 'ns command will reply :
This ns was built with /home/name/tmp-1/ns-allinone-2.34/lib/,
not present, instead using "/home/name/tmp-0/ns-allinone-2.34/lib/*

Conclusion : There is no reason to write any path for ns in .bashrc.

.
 
1 members found this post helpful.
Old 10-11-2011, 05:56 AM   #12
hassan329
LQ Newbie
 
Registered: Sep 2011
Posts: 18

Original Poster
Rep: Reputation: Disabled
Thank for such useful information. i have install the ns-2.33 and also the zrp patch. but when i run the example which i attach it give me this error "ns: Agent/ZRP set radius_: can't read "radius_": no such variable
(Object set line 1)
invoked from within
"Agent/ZRP set radius_"

could help me in this
Thank you.
Attached Files
File Type: txt example.txt (6.4 KB, 83 views)
 
Old 10-11-2011, 10:32 AM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,668

Rep: Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544Reputation: 2544
I found another "example-?-zrp.tcl" : with "Agent/ZRP set radius_"
http://groups.google.com/group/ns-us...0a8fa590?pli=1

Your file : Added to line 68 : Agent/ZRP set radius_ 2 ;
And a couple more edits ( See for yourself )
and the file seems to be usable ? :
1) touch example.scen ( Will create an empty file 'example.scen'.)
2) touch example.traffic
( May be you have those 2 files ? )
3) ns example-zrp.tcl.txt : Will create pktdemo.tr, pktdemo.nam.
4) nam pktdemo.nam ; Click the 'Play button' : Will display "something".
..
Attached Files
File Type: txt example-zrp.tcl.txt (6.4 KB, 166 views)

Last edited by knudfl; 10-11-2011 at 10:59 AM.
 
1 members found this post helpful.
Old 10-12-2011, 01:59 AM   #14
hassan329
LQ Newbie
 
Registered: Sep 2011
Posts: 18

Original Poster
Rep: Reputation: Disabled
Thank you it runs. i delete the line 51 and add this line (Agent/ZRP set radius_ 2 ;# Setting ZRP radius=2)after line 81.
and also delete these line if u do not have these lines ( #set val(cp) "example.scen" ...#set val(trfile) "example.traffic") and also their source.

but one problem in the trace file their is no zrp is showing instead AOMDV and cbr traffic is generating.

i also install ZRP in ns-allinone-2.34 successfully according to above instruction in post#6 but i did not follow write the command which is in step a; i copy it by myself in every file.

Thank you alot for your help
 
Old 02-05-2012, 02:01 AM   #15
numusz
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Rep: Reputation: Disabled
hey hassan329,,
need your help,
can you explain me , step by step to install zrp in ns-2.34 ??
 
  


Reply

Tags
ns2, setdest, zrp, zrp#154


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
How to patch GPSR routing protocol to ns-2.34 nimacasino Linux - Software 287 06-10-2014 12:27 PM
LXer: Tutorial: Border Gateway Protocol, The Routing Protocol of the Internet LXer Syndicated Linux News 0 11-13-2008 05:11 AM
Time Zone patch diskoe Slackware 41 03-13-2007 12:52 PM


All times are GMT -5. The time now is 07:17 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration