LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 10-21-2018, 07:01 AM   #1
mms
LQ Newbie
 
Registered: Sep 2018
Posts: 6

Rep: Reputation: Disabled
Using AODV in LAR protocol in NS2


Hi,
I am using the LAR code for NS2.35.
In box.tcl, I'm trying to understand why it use the AODV in the routing protocol, and I asked Dr. Tracy Camp to explain how LAR protocol is using AODV in the .tcl but she told me this work was 15-20 years ago.
Can you help me please, Thank you.
Attached Files
File Type: txt box.tcl.txt (7.2 KB, 5 views)
 
Old 10-21-2018, 10:01 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2018 CentOS6.10 CentOS7.5 + 50+ other Linux OS, for test only.
Posts: 17,110

Rep: Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489
The main protocol used for LAR simulations is e.g. AODV.
The "Location-Based routing" is done with the "Agent/LAR" settings.
Other main protocol example, DSDV : See dsdv__Lar.tcl → → lar+dream-examples-0918.tar.gz
https://drive.google.com/file/d/1NDK...ew?usp=sharing

Example, LAR settings (from "box-Helen.tcl") :
Code:
# the format now for the lar send is
#
# "$nodeId sendData <dest ID> <size> <method>"
#
# this will be used to test in a static configuration, and will
# change once the mobility portion is figured out.
#Schedule events

puts "Scheduling the send events"
for {set k $val(dataStart)} {$k < $val(dataStop)} {set k [expr $k + 0.25] } \
{
$ns_ at $k "$g(0) sendData 49 64 B"
$ns_ at [expr $k + .0001] "$g(1) sendData 48 64 B"
$ns_ at [expr $k + .0002] "$g(2) sendData 47 64 B"

}

# this is done to make the simulator continue running and "settle" things out
for {set i 0} {$i < $val(nn)} {incr i} {
$ns_ at $val(signalStop) "$g($i) larDone"
}
And "Lar.tcl"
Code:
.
#Create lar agents and attach them to the nodes 
puts "creating lar agents and attaching them to nodes..." 
for {set i 0} {$i < $val(nn)} {incr i} {
  set g($i) [new Agent/LAR]
  $node_($i) attach $g($i) 254

  # need to tell the lar agents about their link layers
  set ll($i) [$node_($i) set ll_(0)]
  $ns_ at 0.0 "$g($i) set-ll $ll($i)"

  # need to tell the lar agents which nodes they're on also
  $ns_ at 0.0 "$g($i) set-node $node_($i)"
}
.
.
The usable LAR code is "LAR-dream__ns235.patch"
https://drive.google.com/file/d/0B7S...ew?usp=sharing

-

Last edited by knudfl; 10-21-2018 at 10:08 AM.
 
Old 10-21-2018, 10:49 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2018 CentOS6.10 CentOS7.5 + 50+ other Linux OS, for test only.
Posts: 17,110

Rep: Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489
Overview : "Protocols Used in NS2"
http://networksimulationtools.com/pr...s-used-in-ns2/
 
Old 10-22-2018, 03:53 AM   #4
mms
LQ Newbie
 
Registered: Sep 2018
Posts: 6

Original Poster
Rep: Reputation: Disabled
Can you please explain for me how it is work the Agent/LAR?
 
Old 10-22-2018, 05:51 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2018 CentOS6.10 CentOS7.5 + 50+ other Linux OS, for test only.
Posts: 17,110

Rep: Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489Reputation: 3489
Re #4.

May be you can figure it out from the code ...

Agent/LAR :
Code:
lar/lar.cc:39:    LARClass() : TclClass("Agent/LAR") {}
lar/lar.cc:57:  //LARClass() : TclClass("Agent/LAR") {}
sendData :
Code:
lar.cc:345:    if (strcmp(argv[1], "sendData") == 0)
lar.cc:392:    } // if (strcmp(argv[1], "sendData") == 0)
larDone :
Code:
lar.cc:248:    if (strcmp(argv[1], "larDone") == 0)
 
  


Reply

Tags
lar, ns2


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
grayhole attack in ns2 using aodv protocol absharma Linux - Newbie 19 12-29-2016 03:26 PM
Error when adding LAR protocol in NS2 Helen jameel Linux - Software 28 04-03-2016 09:15 PM
sendData in "location aided routing" (LAR protocol) in NS2 sims2801 Linux - Software 1 12-16-2014 09:40 AM
NS2: MFR and LAR routing protocol anisabutsi Linux - Software 1 06-04-2013 01:20 PM

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

All times are GMT -5. The time now is 07:00 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration