How to install ZRP (Zone routing protocol) patch in ns-2.34
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hey hassan329,,
need your help,
can you explain me , step by step to install zrp in ns-2.34 ??
I will help you.
First Step:
You have working ns-2.34.
Second Step:
Go to post No.6 to download ZRP patch.
Third Step:
Copy all file to ns folder
Fourth Step:
Do this
a) cd ns-allinone-2.34/ && patch -p1 < PatchZRP.patch
b) touch ns-2.34/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.34/ns-2.34 && make -k
If this not work then you have to do it manually which open the PatchZRP.patch in that file they have written which file u have modified and their line number.
After that make the ns again (this is command make -k)
hello sir,
your site is very helpful to new beginners. i have patched zrp successfully but when i execute it shows the following error:
invalid command name "Agent/ZRP"
while executing
"Agent/ZRP set radius_ 2 "(file "zrp1.tcl" line 68)
can u pls help me to sort out this problem...
thank u....
hello sir,
when i run zrp.tcl file in ns2.33 it shows the following error:
num_nodes is set 10
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
ns: Agent/ZRP set radius_: can't read "radius_": no such variable
(Object set line 1)
invoked from within
"Agent/ZRP set radius_"
Hi everyone!
I have problem when i run ZRP test tcl file.
Attached file is the tcl file.
Someone knows about it ?
Quote:
vmuser@~$ns test_zrp.tcl
num_nodes is set 25
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
CO-ORD of Node 0=(20,20)
CO-ORD of Node 1=(160,20)
CO-ORD of Node 2=(300,20)
CO-ORD of Node 3=(440,20)
CO-ORD of Node 4=(580,20)
CO-ORD of Node 5=(20,160)
CO-ORD of Node 6=(160,160)
CO-ORD of Node 7=(300,160)
CO-ORD of Node 8=(440,160)
CO-ORD of Node 9=(580,160)
CO-ORD of Node 10=(20,300)
CO-ORD of Node 11=(160,300)
CO-ORD of Node 12=(300,300)
CO-ORD of Node 13=(440,300)
CO-ORD of Node 14=(580,300)
CO-ORD of Node 15=(20,440)
CO-ORD of Node 16=(160,440)
CO-ORD of Node 17=(300,440)
CO-ORD of Node 18=(440,440)
CO-ORD of Node 19=(580,440)
CO-ORD of Node 20=(20,580)
CO-ORD of Node 21=(160,580)
CO-ORD of Node 22=(300,580)
CO-ORD of Node 23=(440,580)
CO-ORD of Node 24=(580,580)
extra characters after close-quote
while executing
"$ns_ at $val(stop).0002 "puts /"NS EXITING.../";$ns_ halt"
puts $tracefd "M 0.0 nn $val(nn) x $val(x) y $val(y) rp $val(rp)"
puts $tracefd "M 0.0 prop..."
(file "test_zrp.tcl" line 65)
hello sir,
your site is very helpful to new beginners. i have patched zrp successfully but when i execute it shows the following error:
invalid command name "Agent/ZRP"
while executing
"Agent/ZRP set radius_ 2 "(file "zrp1.tcl" line 68)
can u pls help me to sort out this problem...
thank u....
i got the same problem like this one, Sir.
i type the command ns example-zrp.tcl.txt
is that right sir?
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 24
Quote:
I got the same problem like this one
? invalid command name "Agent/ZRP" ?
If you have no ZRP, then you didn't build zrp.
Like post #6 : It is assumed, that you have a working ns-allinone-2.33,
i.e. the './install' command was run with no errors.
Add d) : cd ns-allinone-2.33/ns-2.33 && mv ns ns233 && make clean && make -k
Reason for "ns233": Then you have a backup for "non zrp" tcl files.
You can download an Ubuntu 10.04 'ns' (ns233-zrp) that works, here .. https://docs.google.com/open?id=0B7S...mVEai1OVk1PS1U
> zrp-bin-ns233-ubu1004_i386.tar.bz2 ( 1.9 MB ).
EDIT : Please look into post #28 for an Ubuntu .deb package.
? invalid command name "Agent/ZRP" ?
If you have no ZRP, then you didn't build zrp.
Like post #6 : It is assumed, that you have a working ns-allinone-2.33,
i.e. the './install' command was run with no errors.
Add d) : cd ns-allinone-2.33/ns-2.33 && mv ns ns233 && make clean && make -k
Reason for "ns233": Then you have a backup for "non zrp" tcl files.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 26
The most common mistake is to add the patch in the wrong location.
( Ref. a) cd ns-allinone-2.33/ && patch -p1 < PatchZRP.patch )
And did you untar ns-allinone-2.33_ZRP.tar.gz in the folder with ns-allinone-2.33?
( Ref. c) in post # 6.)
Please install with : sudo dpkg -i zrp-ns-2.33-ubu1004-1_i386.deb
Then you have : /usr/local/bin/ ns ns-zrp nam
( ns and ns-zrp are identical.)
The few required libraries etc. are in /usr/local/ns2/ns-allinone-2.33/.
With that package installed, you can type 'ns-zrp <file>' in any location,
to run zrp examples.
The most common mistake is to add the patch in the wrong location.
( Ref. a) cd ns-allinone-2.33/ && patch -p1 < PatchZRP.patch )
And did you untar ns-allinone-2.33_ZRP.tar.gz in the folder with ns-allinone-2.33?
( Ref. c) in post # 6.)
ref a) i did that patch like you said:
Quote:
jeffrey@jeffrey-laptop:~/ns-allinone-2.33$ patch -p1 < patchZRP.patch.txt
(Stripping trailing CRs from patch.)
patching file ns-2.33/common/packet.h
(Stripping trailing CRs from patch.)
patching file ns-2.33/Makefile
(Stripping trailing CRs from patch.)
patching file ns-2.33/tcl/lib/ns-agent.tcl
(Stripping trailing CRs from patch.)
patching file ns-2.33/tcl/lib/ns-default.tcl
(Stripping trailing CRs from patch.)
patching file ns-2.33/tcl/lib/ns-lib.tcl
(Stripping trailing CRs from patch.)
patching file ns-2.33/tcl/lib/ns-packet.tcl
(Stripping trailing CRs from patch.)
patching file ns-2.33/trace/cmu-trace.cc
(Stripping trailing CRs from patch.)
patching file ns-2.33/trace/cmu-trace.h
and
ref c) i untar the ns-allinone-2.33_ZRP.tar.gz inside ns-allinone-2.33 folder.
Please install with : sudo dpkg -i zrp-ns-2.33-ubu1004_i386.deb
Then you have : /usr/local/bin/ ns ns-zrp nam
( ns and ns-zrp are identical.)
The few required libraries etc. are in /usr/local/ns2/ns-allinone-2.33/.
With that package installed, you can type 'ns-zrp <file>' in any location,
to run zrp examples.
already did this. and i type 'ns-zrp example-zrp.tcl.txt' in terminal
this message show up:
Quote:
jeffrey@jeffrey-laptop:~/ns-allinone-2.33/ns-2.33/tcl/ex$ ns-zrp example-zrp.tcl.txt
application-specific initialization failed: Can't find a usable init.tcl in the following directories:
/usr/local/ns2/ns-allinone-2.33/lib/tcl8.4 /usr/local/lib/tcl8.4 /usr/lib/tcl8.4 /usr/local/library /usr/library /usr/tcl8.4.18/library /tcl8.4.18/library /usr/local/ns2/ns-allinone-2.33/lib/tcl8.4
This probably means that Tcl wasn't installed properly.
invalid command name "Agent/ZRP"
while executing
"Agent/ZRP set radius_ 2 "
(file "example-zrp.tcl.txt" line 68)
maybe i should reinstall ns-allinone-2.33 Sir? and also reinstall the zrp patch ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.