LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 03-02-2013, 08:31 PM   #91
conglongit90
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Rep: Reputation: Disabled

Quote:
Originally Posted by alwaleed View Post
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$

Thanks
OMG

khalid@khalid-linux:~/ns-allinone-2.33/ns-2.33$ ns example-zrp.tcl.txt ??

what is " example-zrp.tcl.txt " ??
 
Old 03-03-2013, 12:40 AM   #92
conglongit90
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Rep: Reputation: Disabled
error run file.tcl

Quote:
long@long-desktop:~/ns-allinone-2.33/ns-2.33/tcl/ex$ ns 2.tcl
210
0.0037499999999999999
running nam...
long@long-desktop:~/ns-allinone-2.33/ns-2.33/tcl/ex$ nam:
[code omitted because of length]
: no event type or button # or keysym
while executing
"bind Listbox <MouseWheel> {
%W yview scroll [expr {- (%D / 120) * 4}] units
}"
invoked from within
"if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
bind Listbox <MouseWheel> {
%W yview scroll [expr {- (%D)}] units
}
bind Li..."

Can you help me , mr knudfl
 
Old 03-03-2013, 01:57 AM   #93
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 92 .

The usual : Please read the zrp threads with your posts.
Post #2 http://www.linuxquestions.org/questi...-4175425967/#2
... where there is a link to nam-1.14.i586.tar.gz
Unpack, and : cd nam-1.14*/ && sudo cp nam /usr/local/bin/

And the corrupt 'nam' that you created, must be deleted.

-
 
Old 03-03-2013, 02:01 AM   #94
alwaleed
LQ Newbie
 
Registered: Feb 2013
Posts: 22

Rep: Reputation: Disabled
zrp

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$

Thanks
 
Old 03-03-2013, 02:48 AM   #95
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 94 : OK.

Should be equally OK with all examples listed in # 85.


-
 
Old 03-04-2013, 06:21 AM   #96
alwaleed
LQ Newbie
 
Registered: Feb 2013
Posts: 22

Rep: Reputation: Disabled
zrp

Dear Mr.knudfl, I was executed the attached example with no error, but I want to simulate ZRP when AODV or DSR or DSDV is there?
is the example used any of the existing protocols (such as AODV and DSDV)?
since this protocol is hybrid, which reactive and proactive protocol are used?

Thanks
Attached Files
File Type: txt example-zrp.tcl.txt (6.4 KB, 14 views)
 
Old 03-04-2013, 12:07 PM   #97
conglongit90
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Rep: Reputation: Disabled
thank you, everybody !
 
Old 03-04-2013, 02:03 PM   #98
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 96, @alwaleed : Tcl files are text : You can easily read what's about.

Finding AODV DSR DSDV in your tcl files :
$ cd ns-allinone-2.33/ns-2.33/tcl/
$ grep -Rni aodv *
$ grep -Rni dsr *
$ grep -Rni dsdv *
.. And you will get line numbers / file names for all AODV DSR DSDV content.

No tcl files with ZRP and any AODV / DSR / DSDV.
If it is possible at all to get the result you want,
you will have to write a file.tcl yourself.
( And I have no knowledge about the subject.)
-
Attached Files
File Type: txt comparison-zrp-aodv-dsdv-dsr.txt (1,010 Bytes, 24 views)

Last edited by knudfl; 03-04-2013 at 02:07 PM.
 
Old 03-05-2013, 09:45 AM   #99
conglongit90
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Rep: Reputation: Disabled
hello ,you knudfl

i running zrp for ns-2
file zrp.tcl :

Quote:
# Link : https://sites.google.com/site/securezrp/tclcode
#
# Demo1.tcl edited 17-Nov-2012 >>> zrp-Demo1-1.tcl , @knudfl

set val(chan) Channel/WirelessChannel ;#Channel Type
set val(prop) Propagation/TwoRayGround ;# radio-propagationmodel
set val(netif) Phy/WirelessPhy ;# network interface type
set val(mac) Mac/802_11 ;# MAC type
set val(ifq) Queue/DropTail/PriQueue ;# interface queue type
set val(ll) LL ;# link layer type
set val(ant) Antenna/OmniAntenna ;# antenna model
set val(ifqlen) 500 ;# max packet in ifq
set val(nn) 10 ;# number of mobilenodes
set val(rp) ZRP ;# Routing protocol
set val(x) 1100
set val(y) 1100
Agent/ZRP set radius_ 2 ;# Setting ZRP radius=2


# Initialize Global Variables

set ns_ [new Simulator]

set tracefile [open zrp.tr w]

$ns_ trace-all $tracefile


set namtrace [open zrp.nam w]

$ns_ namtrace-all-wireless $namtrace $val(x) $val(y)


#$ns_ use-newtrace


# set up topography object

set topo [new Topography]


$topo load_flatgrid $val(x) $val(y)


# Create God

create-god $val(nn)

# New API to config node:

# 1. Create channel (or multiple-channels);

# 2. Specify channel in node-config (instead of channelType);

# 3. Create nodes for simulations.


# Create channel #1 and #2

set chan_1_ [new $val(chan)]

set chan_2_ [new $val(chan)]


# configure node, please note the change below.

$ns_ node-config -adhocRouting $val(rp) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON \
-macTrace ON \
-movementTrace ON \
-channel $chan_1_


for {set i 0} {$i < $val(nn)} {incr i} {

set node_($i) [$ns_ node]

$node_($i) random-motion 0

$ns_ initial_node_pos $node_($i) 120

}

puts $tracefile "Nodes Defined"


$node_(0) set X_ 300.0

$node_(0) set Y_ 400.0

$node_(0) set Z_ 0.0

$ns_ initial_node_pos $node_(0) 200


$node_(1) set X_ 700.0

$node_(1) set Y_ 500.0

$node_(1) set Z_ 0.0

$ns_ initial_node_pos $node_(1) 200


$node_(2) set X_ 0.0

$node_(2) set Y_ 0.0

$node_(2) set Z_ 0.0

$ns_ initial_node_pos $node_(2) 0


$node_(3) set X_ 0.0

$node_(3) set Y_ 0.0

$node_(3) set Z_ 0.0

$ns_ initial_node_pos $node_(3) 0


$node_(4) set X_ 0.0

$node_(4) set Y_ 0.0

$node_(4) set Z_ 0.0

$ns_ initial_node_pos $node_(4) 0








$node_(7) set X_ 100.0

$node_(7) set Y_ 600.0

$node_(7) set Z_ 0.0

$ns_ initial_node_pos $node_(7) 100




$node_(5) set X_ 800.0

$node_(5) set Y_ 300.0

$node_(5) set Z_ 0.0

$ns_ initial_node_pos $node_(5) 100


$node_(6) set X_ 1000.0

$node_(6) set Y_ 500.0

$node_(6) set Z_ 0.0

$ns_ initial_node_pos $node_(6) 100


$node_(8) set X_ 600.0

$node_(8) set Y_ 900.0

$node_(8) set Z_ 0.0

$ns_ initial_node_pos $node_(8) 100


$node_(9) set X_ 1000.0

$node_(9) set Y_ 700.0

$node_(9) set Z_ 0.0

$ns_ initial_node_pos $node_(9) 100




puts $tracefile "Nodes' coordinates are Defined"


$ns_ at 1.0 "$node_(0) setdest 301.0 401.0 0.0"

$ns_ at 1.0 "$node_(1) setdest 700.0 500.0 0.0"



$ns_ at 1.0 "$node_(5) setdest 800.0 300.0 0.0"

$ns_ at 1.0 "$node_(6) setdest 900.0 500.0 0.0"

$ns_ at 1.0 "$node_(7) setdest 200.0 600.0 0.0"

$ns_ at 1.0 "$node_(8) setdest 600.0 700.0 0.0"

$ns_ at 1.0 "$node_(9) setdest 1000.0 700.0 0.0"


#$ns_ at 1.0 "$node_(2) setdest 0.0 0.0 0.0"

#$ns_ at 1.0 "$node_(3) setdest 0.0 0.0 0.0"

#$ns_ at 1.0 "$node_(4) setdest 0.0 0.0 0.0"

#$ns_ at 1.0 "$node_(12) setdest 0.0 0.0 0.0"

#$ns_ at 1.0 "$node_(13) setdest 0.0 0.0 0.0"

#$ns_ at 1.0 "$node_(14) setdest 0.0 0.0 0.0"

#$ns_ at 1.0 "$node_(16) setdest 0.0 0.0 0.0"

#$ns_ at 1.0 "$node_(17) setdest 0.0 0.0 0.0"

#$ns_ at 1.0 "$node_(18) setdest 0.0 0.0 0.0"

#$ns_ at 1.0 "$node_(19) setdest 0.0 0.0 0.0"


#Creating TCP agents


set tcp0 [new Agent/TCP]

$ns_ attach-agent $node_(0) $tcp0

set tcp1 [new Agent/TCP]

$ns_ attach-agent $node_(1) $tcp1




set tcp5 [new Agent/TCP]

$ns_ attach-agent $node_(5) $tcp5

set tcp6 [new Agent/TCP]

$ns_ attach-agent $node_(6) $tcp6

set tcp7 [new Agent/TCP]

$ns_ attach-agent $node_(7) $tcp7

set tcp8 [new Agent/TCP]

$ns_ attach-agent $node_(8) $tcp8

set tcp9 [new Agent/TCP]

$ns_ attach-agent $node_(9) $tcp9


#Creating NULL agents


set sink0 [new Agent/Null]

$ns_ attach-agent $node_(0) $sink0

$ns_ connect $tcp0 $sink0


set sink1 [new Agent/Null]

$ns_ attach-agent $node_(1) $sink1

$ns_ connect $tcp1 $sink1







set sink5 [new Agent/Null]

$ns_ attach-agent $node_(5) $sink5

$ns_ connect $tcp5 $sink5


set sink6 [new Agent/Null]

$ns_ attach-agent $node_(6) $sink6

$ns_ connect $tcp6 $sink6


set sink7 [new Agent/Null]

$ns_ attach-agent $node_(7) $sink7

$ns_ connect $tcp7 $sink7


set sink8 [new Agent/Null]

$ns_ attach-agent $node_(8) $sink8

$ns_ connect $tcp8 $sink8


set sink9 [new Agent/Null]

$ns_ attach-agent $node_(9) $sink9

$ns_ connect $tcp9 $sink9

# Creating CBR Agents


set cbr0 [new Agent/CBR]

$ns_ attach-agent $node_(0) $cbr0

$cbr0 set packetSize_ 100

$cbr0 set interval_ 0.05

$ns_ connect $cbr0 $sink0


set cbr1 [new Agent/CBR]

$ns_ attach-agent $node_(1) $cbr1

$cbr1 set packetSize_ 100

$cbr1 set interval_ 0.05

$cbr1 set rate_ 1mb

$ns_ connect $cbr1 $sink1








set cbr6 [new Agent/CBR]

$ns_ attach-agent $node_(6) $cbr6

$cbr6 set packetSize_ 100

$cbr6 set interval_ 0.05

$cbr6 set rate_ 1mb

$ns_ connect $cbr6 $sink6


set cbr7 [new Agent/CBR]

$ns_ attach-agent $node_(7) $cbr7

$cbr7 set packetSize_ 100

$cbr7 set interval_ 0.05

$cbr7 set rate_ 1mb

$ns_ connect $cbr7 $sink7


set cbr8 [new Agent/CBR]

$ns_ attach-agent $node_(8) $cbr8

$cbr8 set packetSize_ 100

$cbr8 set interval_ 0.05

$cbr8 set rate_ 1mb

$ns_ connect $cbr8 $sink8


set cbr9 [new Agent/CBR]

$ns_ attach-agent $node_(9) $cbr9

$cbr9 set packetSize_ 100

$cbr9 set interval_ 0.05

$cbr9 set rate_ 1mb

$ns_ connect $cbr9 $sink9


puts $tracefile "All Agents Created"


$ns_ at 1.1 "$cbr0 start"

$ns_ at 1.1 "$cbr1 start"





$ns_ at 1.1 "$cbr6 start"

$ns_ at 1.1 "$cbr7 start"

$ns_ at 1.1 "$cbr8 start"

$ns_ at 1.1 "$cbr9 start"

$ns_ at 5.0 "$cbr0 stop"

$ns_ at 5.0 "$cbr1 stop"





$ns_ at 5.0 "$cbr6 stop"

$ns_ at 5.0 "$cbr7 stop"

$ns_ at 5.0 "$cbr8 stop"

$ns_ at 5.0 "$cbr9 stop"


for {set i 0} {$i < $val(nn) } {incr i} {

$ns_ at 5.1 "$node_($i) reset";

}


$ns_ at 5.2 "stop"

$ns_ at 5.3 "puts \"NS EXITING...\" ; $ns_ halt"


proc stop {} {

global ns_ tracefile

$ns_ flush-trace

close $tracefile

}

puts "Starting Simulation..."

$ns_ run


Now, i want have xgraph ? how?
can you help me,
thank
 
Old 03-07-2013, 08:38 PM   #100
alwaleed
LQ Newbie
 
Registered: Feb 2013
Posts: 22

Rep: Reputation: Disabled
ZRP

Thank you so much Mr.knudfl, excuse me I want to ask you when can I put the AODV or DSR or DSDV code in the tcl file in order to make comparative between them and ZRP.

Thanks
 
Old 03-08-2013, 02:21 AM   #101
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 99, @conglongit90 : Please edit post #99 to use 'code tags' :
Type [/code] at code text end, and [code] at code start : zrp-Demo1-1.tcl



# 100, @alwaleed : I think this was answered in post #98.
All the information that I have found is included in #98.

-
 
Old 03-10-2013, 11:47 PM   #102
alwaleed
LQ Newbie
 
Registered: Feb 2013
Posts: 22

Rep: Reputation: Disabled
zrp

Dear Mr.knudfl, excuse me any part of the attached example can I add the AODV or DSR or DSDV code to make comparative between them and ZRP.

Thanks
 
Old 03-10-2013, 11:59 PM   #103
alwaleed
LQ Newbie
 
Registered: Feb 2013
Posts: 22

Rep: Reputation: Disabled
ZRP

Dear Mr.knudfl, excuse me any part of the attached example can I add the AODV or DSR or DSDV code to make comparative between them and ZRP.

Thanks
Attached Files
File Type: txt example-zrp.tcl.txt (6.4 KB, 23 views)
 
Old 03-11-2013, 04:08 AM   #104
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 103 .

The known work is mostly about "compare aodv, dsr, dsdv".
I guess you will have to study that carefully.
And read all the examples, and then experiment adding zrp to an example
<aodv>.tcl or <dsr>.tcl or <dsdv>.tcl or <aomdv>.tcl .

Examples, links : ex_aodv-dsr-dsdv-aomdv_0313.tar.bz2
https://docs.google.com/file/d/0B7S2...it?usp=sharing

-
 
Old 03-26-2013, 04:05 AM   #105
dsproffitt
LQ Newbie
 
Registered: Feb 2013
Posts: 4

Rep: Reputation: Disabled
I just want to say thank you for answering a lot of my questions before I ask them.

I appreciate your time and your effort.
Thank you again

Duncan
 
  


Reply

Tags
ns2, setdest, zrp, zrp#2



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 11:28 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
Open Source Consulting | Domain Registration