Version 2 (modified by 18 years ago) ( diff ) | ,
---|
Using AODV with the testbed
Currently, we support AODV-UU protocol 0.9.1 on kernel version 2.6.12. Using the application and prototype definition format, we can currently specify
- the interface to run on
- enable logging
- enable route table logging
For Experimenters
- Step 1: In order to use AODV routing protocol in your experiment, make sure you use the baseline.ndz image on your nodes that has aodv installed.
- Step 2: Use the following experiment script. This will launch both the traffic generator and AODV on the nodes. AODV currently logs locally to the node every N secs which is configurable. However, in the future, this will be OMLized to log into the database instead.
AODV router prototype and app defs are installed on all consoles. So users should be able to use it from any console
Experiment script
################################################## # AODV with OTG # Every node has two prototypes: sender/receiver and AODV # AODV rt table logs are reported every 4 secs on the nodes to # /var/log/aodv.rtlog # These will soon be OMLized to report to the database instead ################################################## Experiment.name = "tutorial-aodv" Experiment.project = "orbit:tutorial" # # Define nodes used in experiment # defNodes('sender', [1,2]) {|node| node.image = nil # assume the right image to be on disk node.prototype("test:proto:sender", { 'destinationHost' => '192.168.1.1', 'packetSize' => 1024, 'rate' => 300, 'protocol' => 'udp' }) node.net.w0.mode = "master" } defNodes('receiver', [1,1]) {|node| node.image = nil # assume the right image to be on disk node.prototype("test:proto:receiver" , { 'hostname' => '192.168.1.1', 'protocol' => 'udp_libmac' }) node.net.w0.mode = "managed" } defNodes('everyone',[[1,1],[1,2]]) {|node| node.image = nil node.prototype("test:proto:aodvrouter", { 'interface' => 'ath0', #Run aodvd on interface ath0 'log' => nil, #Enable logging 'routelog' => 4 #Enable routing table logging every 4 secs }) } allNodes.net.w0 { |w| w.type = 'b' w.essid = "helloworld" w.ip = "%192.168.%x.%y" } # # Now, start the application # whenAllInstalled() {|node| #First start AODV daemon on all nodes NodeSet['everyone'].startApplications wait 10 #Then start receiver and sender NodeSet['receiver'].startApplications wait 30 NodeSet['sender'].startApplications wait 180 Experiment.done }
For Developers
The application definition and prototype definitions corresponding to AODV router are as follows
Application definition
# # Create an application representation from scratch # require 'handler/appDefinition' a = AppDefinition.create('test:app:aodvd') a.name = "aodvd" a.version(0, 0, 1) a.shortDescription = "Iperf traffic generator" a.description = <<TEXT Iperf is a traffic generator for TCP and UDP traffic. It contains generators producing various forms of packet streams and port for sending these packets via various transports, such as TCP and UDP. TEXT # addProperty(name, description, mnemonic, type, isDynamic = false, constraints = nil) a.addProperty('interface', 'Interface to run on', ?i, String, false) a.addProperty('log', 'Enable logging', ?l, String, false) a.addProperty('rttable', 'Log rting table every N secs', ?r, String, false) a.path = "/usr/sbin/aodvd" if $0 == __FILE__ require 'stringio' require 'rexml/document' include REXML sio = StringIO.new() a.to_xml.write(sio, 2) sio.rewind puts sio.read sio.rewind doc = Document.new(sio) t = AppDefinition.from_xml(doc.root) puts puts "-------------------------" puts t.to_xml.write($stdout, 2) end
Prototype definition
# # Define a prototype # require 'handler/prototype' require 'handler/filter' require 'handler/appDefinition' p = Prototype.create("test:proto:aodvrouter") p.name = "AODV daemon" p.description = "Nodes which receive packets" p.defProperty('interface', 'Interface to listen on') p.defProperty('log', 'Enable logging') p.defProperty('routelog', 'Enable logging') aodvd = p.addApplication('aodvd', "test:app:aodvd") aodvd.bindProperty('interface') aodvd.bindProperty('log') aodvd.bindProperty('rttable','routelog') if $0 == __FILE__ p.to_xml.write($stdout, 2) puts end
Note:
See TracWiki
for help on using the wiki.