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.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517
Rep:
# 77.
Please read your posts.
You was informed that there is no zrp for ns-2.35 .
And : No ns-2.35 is required for zrp.
Once the executable file ns* is created, no version of ns-2.xx is required.
The file 'ns-zrp'/ the package zrp-ns + the examples.tcl will do.
Please read the two threads where you have "zrp posts".
Thank you so much Mr.knudfl, I installed ns-2.33 on ubuntu 10.10 32bit and now working but when I tried to install ZRP the following error appear after the last command (make -k):
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/khalid/ns-allinone-2.33/ns-2.33/indep-utils/webtrace-conv/ucb'
Thank you so much Mr.knudfl, I installed ns-2.33 on ubuntu 10.10 32bit and now working but when I tried to install ZRP the following error appear after the last command (make -k):
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/khalid/ns-allinone-2.33/ns-2.33/indep-utils/webtrace-conv/ucb'
What can I do to solve this problem.
Thanks
i still setup ZRP for ubuntu 10.10 ,
can i help me,
thanks!
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)
can help me,
ubuntu 10.04, i want setup ZRP for NS-2.35?
how set?
thank you
Dear Mr.knudfl, I'm really appreciate your efforts with me. excuse me how can I run examples in ZRP to check the validation of it.
I diid the following:
khalid@khalid-linux:~$ cd ns-allinone-2.33/ns-2.33/
khalid@khalid-linux:~/ns-allinone-2.33/ns-2.33$ sudo make install
for d in /usr/local/man/man1; do \
if [ ! -d $d ]; then \
mkdir -p $d ;\
fi;\
done
/usr/bin/install -c -m 755 ns /usr/local/bin
/usr/bin/install -c -m 644 ns.1 /usr/local/man/man1
khalid@khalid-linux:~/ns-allinone-2.33/ns-2.33$ ns example-zrp.tcl
couldn't read file "example-zrp.tcl": no such file or directory
khalid@khalid-linux:~/ns-allinone-2.33/ns-2.33$
hello.
thank you, i can succesful ZRP for ns-2.3 on ubuntu 10.04
i want have file_zrp.tcl for me test zrp protocol?
i have code: zrp.tcl
Quote:
#"Agent/ZRP set radius_ 2"
set val(chan) Channel/WirelessChannel;#
set val(prop) Propagation/TwoRayGround;#
set val(netif) Phy/WirelessPhy;#
set val(mac) Mac/802_11;#
set val(ifq) Queue/DropTail/PriQueue;#
set val(ll) LL;#
set val(ant) Antenna/OmniAntenna;#
set val(ifqlen) 50;#
set val(nn) 25;#
set val(rp) ZRP;#
set val(x) 600;#
set val(y) 600;#
set val(stop) 30.0;#
Agent/ZRP set radius_ 2;#
remove-all-packet-headers
add-packet-header Common Flags IP RTP ARP GAF LL LRWPAN Mac ZRP
set ns_ [new Simulator]
$ns_ use-newtrace
set tracefd [open Grid-TCl.tr w]
$ns_ trace-all $tracefd
set namtrace [open Grid-TCl.nam w]
$ns_ namtrace-all-wireless $namtrace $val(x) $val(y)
set topo [new Topography]
$topo load_flatgrid $val(x) $val(y)
set god_ [create-god $val(nn)]
for {set i 0} {$i<$val(nn)} {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0;#
}
for {set i 0} {$i<5} {incr i} {
for {set j 0} {$j<5} {incr j} {
set id [expr $i*5+$j]
set X [expr $j*140+20]
set Y [expr $i*140+20]
$node_($id) set X_ [expr $j*140+20]
$node_($id) set Y_ [expr $i*140+20]
$node_($id) set Z_ 0.0
puts "CO-ORD of Node $id=($X,$Y)"
}
}
for {set i 0} {$i<$val(nn)} {incr i} {
$ns_ at $val(stop).0 "$node_($i) reset"
}
$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 $val(prop) ant $val(ant)"
proc stop {} {
global ns_ tracefd
$ns_ flush-trace
close $tracefd
}
puts "Starting Simulation..."
$ns_ run
and :
long@long-desktop:~/ns-allinone-2.33/ns-2.33/tcl/ex$ ns zrp.tcl
error :
num_nodes is set 25
invalid command name "-llType"
while executing
"-llType $val(ll)/"
(file "zrp.tcl" line 30)
Dear Mr.knudfl, are these the following results ensure that ZRP was installed and worked without any problem after run the command (ns example-zrp.tcl.txt)
khalid@khalid-linux:~$ cd ns-allinone-2.33/ns-2.33/
khalid@khalid-linux:~/ns-allinone-2.33/ns-2.33$ sudo make install
for d in /usr/local/man/man1; do \
if [ ! -d $d ]; then \
mkdir -p $d ;\
fi;\
done
/usr/bin/install -c -m 755 ns /usr/local/bin
/usr/bin/install -c -m 644 ns.1 /usr/local/man/man1
khalid@khalid-linux:~/ns-allinone-2.33/ns-2.33$ ns example-zrp.tcl.txt
num_nodes is set 20
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
Loading connection pattern...
Loading traffic file
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
SORTING LISTS ...DONE!
NS EXITING...
khalid@khalid-linux:~/ns-allinone-2.33/ns-2.33$
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.