LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   How to install ZRP (Zone routing protocol) patch in ns-2.34 (https://www.linuxquestions.org/questions/ubuntu-63/how-to-install-zrp-zone-routing-protocol-patch-in-ns-2-34-a-905025/)

knudfl 09-06-2012 04:35 AM

# 29
Quote:

ref c) i untar the ns-allinone-2.33_ZRP.tar.gz inside ns-allinone-2.33 folder.
That's the error.
a) cd ns-allinone-2.33/ && patch -p1 < PatchZRP.patch
Your location is ns-allinone-2.33/ ; then we "go outside" with ../ !
c) cd ../ && tar xvf ns-allinone-2.33_ZRP.tar.gz
See post # 27 :
"did you untar ns-allinone-2.33_ZRP.tar.gz in the folder with ns-allinone-2.33?"
The folder that is containing ns-allinone-2.33/. Not inside ns-allinone-2.33/!

.

helok 09-10-2012 09:10 PM

Quote:

Originally Posted by knudfl (Post 4495586)
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".
..

sir i run this step and its successfully work.
thank you so much for your help sir.

can you explain me, what is touch example.scen and example.traffic for?
when we create a new file, is the example.scen and example.traffic should be the different name?
thank you

knudfl 09-11-2012 01:39 AM

# 32

example.scen and example.traffic :
You can use the files from the old zrp.tar.gz
http://sites.google.com/site/nsnamzrp/
> https://3b137281-a-62cb3a1a-s-sites....zrp/zrp.tar.gz
>>> zrp.tar.gz > zrp/example/ example.scen example.traffic

The touch command creates empty files.
I used those until I found the real files : EDIT : See post # 25.
.

helok 09-11-2012 04:04 AM

Quote:

Originally Posted by knudfl (Post 4777439)
# 32

example.scen and example.traffic :
You can use the files from the old zrp.tar.gz
http://sites.google.com/site/nsnamzrp/
> https://3b137281-a-62cb3a1a-s-sites....zrp/zrp.tar.gz
>>> zrp.tar.gz > zrp/example/ example.scen example.traffic

The touch command creates empty files.
I used those until I found the real files.
.

set val(cp) "example.scen"
set val(trfile) "example.traffic"

what is val(cp) and val(trfile) for sir?
please explain to me
actually i dont know anything about that.

knudfl 09-11-2012 04:55 AM

# 34

It seems that both are used for file references like IX.2. here ..
http://www.isi.edu/nsnam/ns/tutorial/nsscript5.html
set val(cp) "../mobility/scene/cbr-3-test"

Some of the commands in ns2 tcl files are basic tcl commands.
And some commands / words are special ns2 definitions.
( I am not a coder, and do not write tcl files.)

.

helok 09-17-2012 08:04 AM

Quote:

Originally Posted by knudfl (Post 4777538)
# 34

It seems that both are used for file references like IX.2. here ..
http://www.isi.edu/nsnam/ns/tutorial/nsscript5.html
set val(cp) "../mobility/scene/cbr-3-test"

Some of the commands in ns2 tcl files are basic tcl commands.
And some commands / words are special ns2 definitions.
( I am not a coder, and do not write tcl files.)

.

okay sir,

Thank you so much for your help Sir
i can start doing my tcl file right now

truongvutgg 10-03-2012 11:26 AM

install zrp on windows xp error
pls help
--
STEP-1
======

First put following files into NS-2 home's parent directory.

1) ns-allinone-2.33_zrp.tar.gz

2) zrp4NS2_33.patch

3) patchZRP.sh (THIS SHELL-SCRIPT FILE - This script file should be run from NS-2 home' parent directory)


STEP-2
======

Run patchZRP.sh from shell.
...
but error such as:
Admin@TruongVu ~
$ sh patchZRP.sh
patchZRP.sh: 1: Syntax error: newline unexpected

Admin@TruongVu ~
$

knudfl 10-03-2012 12:13 PM

Post #37, @ truongvutgg : Welcome to LQ.

Windows XP ? Would that be Cygwin ? ?

Syntax error : Probably a shell issue ? Not a genuine bash / Linux shell ?
Anyway it doesn't matter so far concerns the "patchZRP.sh" script.
The script is no good. Please read post # 6.

.

khinmyo 10-26-2012 03:51 AM

Quote:

Originally Posted by knudf
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.

at second step ,
how to touch ns-2.33/common/packet.h && touch ns-2.33/trace/cmu-trace.h
I'm unable to do this step. Is is to do manually? If so, how to do ?
Please guide me in detail.
It is important for me!!!
Please help me ,sir

knudfl 10-26-2012 05:01 AM

# 39

How to use the 'touch' command : Type touch

$ touch ns-2.33/common/packet.h && touch ns-2.33/trace/cmu-trace.h


.

khinmyo 10-27-2012 12:55 AM

hi sir.
Now I'm ok to patch ZRP in ns2.33 successfully!
But I can't run .tcl file.
I downlaod example-zrp.tcl form your post #13 and put this file to ns-allinoe-2.33>> ns-2.33>>tcl>>ex.
And then , I do as follow,
khinmyo@ubuntu:~/ns-allinone-2.33/ns-2.33/tcl/ex$ ns example-zrp.tcl
invalid command name "Agent/ZRP"
while executing
"Agent/ZRP set radius_ 2 "
(file "example-zrp.tcl" line 68)
khinmyo@ubuntu:~/ns-allinone-2.33/ns-2.33/tcl/ex$
[COLOR="Red"][/COLOR

So, how can I solve this problem.Please Help Me,Sir!
Your instructions are very useful to me!

knudfl 10-27-2012 02:07 AM

# 41

Looks like no ZRP was installed. Probably reread the LQ zrp threads.


Also suggest : Install the package zrp-ns-2.33-ubu1010_i386.deb
https://docs.google.com/open?id=0B7S...kxHY3dQQlR4bjg
.. And do : $ ns-zrp example-zrp.tcl
No errors. The files pktdemo.nam pktdemo.tr are created.

.

khinmyo 10-27-2012 03:38 AM

Yeah, sir
I already do as your instruciton. But I have this error again!
Please help me,sir!

khinmyo@ubuntu:~/ns-allinone-2.33/ns-2.33/tcl/ex$ ns-zrp example-zrp.tcl
num_nodes is set 20
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
Loading connection pattern...
couldn't read file "example.scen": no such file or directory
while executing
"source.orig example.scen"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source $val(cp)"
(file "example-zrp.tcl" line 198)
khinmyo@ubuntu:~/ns-allinone-2.33/ns-2.33/tcl/ex$

knudfl 10-27-2012 04:11 AM

# 43
Quote:

couldn't read file "example.scen": no such file or directory
That's a new error. Required : 'example.scen' and 'example.traffic'. See post #25 :

Files from the old (year 2000) zrp.tar.gz > zrp/example/* can be used ..
http://sites.google.com/site/nsnamzrp/
> https://3b137281-a-62cb3a1a-s-sites....zrp/zrp.tar.gz

.

vishalpolara 11-15-2012 02:31 AM

i has try to do zrp patch in ns-2.33 as per your step it will show me this
is this completely install???

make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/vishal/ns-allinone-2.33/ns-2.33/indep-utils/cmu-scen-gen/setdest'
make[1]: Entering directory `/home/vishal/ns-allinone-2.33/ns-2.33/indep-utils/webtrace-conv/dec'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/vishal/ns-allinone-2.33/ns-2.33/indep-utils/webtrace-conv/dec'
make[1]: Entering directory `/home/vishal/ns-allinone-2.33/ns-2.33/indep-utils/webtrace-conv/epa'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/vishal/ns-allinone-2.33/ns-2.33/indep-utils/webtrace-conv/epa'
make[1]: Entering directory `/home/vishal/ns-allinone-2.33/ns-2.33/indep-utils/webtrace-conv/nlanr'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/vishal/ns-allinone-2.33/ns-2.33/indep-utils/webtrace-conv/nlanr'
make[1]: Entering directory `/home/vishal/ns-allinone-2.33/ns-2.33/indep-utils/webtrace-conv/ucb'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/vishal/ns-allinone-2.33/ns-2.33/indep-utils/webtrace-conv/ucb'
make: Target `all' not remade because of errors.

then i had try to run your program
then it will show me below error

invalid command name "Agent/ZRP"
while executing
"Agent/ZRP set radius_ 2 "
(file "example-zrp.tcl.txt" line 68)

tell me what to do


All times are GMT -5. The time now is 02:45 PM.