Changes between Initial Version and Version 1 of HowTo/UsingAODV


Ignore:
Timestamp:
Nov 23, 2005, 7:55:20 PM (18 years ago)
Author:
Surya Satyavolu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • HowTo/UsingAODV

    v1 v1  
     1= Using AODV with the testbed =
     2
     3Currently, 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
     4 * the interface to run on
     5 * enable logging
     6 * enable route table logging
     7
     8
     9
     10== For Experimenters ==
     11 * 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.
     12 * 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.
     13
     14'''AODV router prototype and app defs are installed on all consoles. So users should be able to use it from any console'''
     15=== Experiment script ===
     16
     17{{{
     18##################################################
     19# AODV with OTG
     20# Every node has two prototypes: sender/receiver and AODV
     21# AODV rt table logs are reported every 4 secs on the nodes to
     22# /var/log/aodv.rtlog
     23# These will soon be OMLized to report to the database instead
     24##################################################
     25
     26Experiment.name = "tutorial-aodv"
     27Experiment.project = "orbit:tutorial"
     28
     29#
     30# Define nodes used in experiment
     31#
     32defNodes('sender', [1,2]) {|node|
     33  node.image = nil  # assume the right image to be on disk
     34
     35  node.prototype("test:proto:sender", {
     36    'destinationHost' => '192.168.1.1',
     37    'packetSize' => 1024,
     38    'rate' => 300,
     39    'protocol' => 'udp'
     40  })
     41  node.net.w0.mode = "master"
     42}
     43
     44defNodes('receiver', [1,1]) {|node|
     45  node.image = nil  # assume the right image to be on disk
     46  node.prototype("test:proto:receiver" , {
     47    'hostname' => '192.168.1.1',
     48    'protocol' => 'udp_libmac'
     49  })
     50  node.net.w0.mode = "managed"
     51}
     52
     53defNodes('everyone',[[1,1],[1,2]]) {|node|
     54  node.image = nil
     55  node.prototype("test:proto:aodvrouter", {
     56'interface' => 'ath0',   #Run aodvd on interface ath0
     57  'log' => nil,            #Enable logging
     58  'routelog' => 4          #Enable routing table logging every 4 secs
     59  })
     60}
     61
     62
     63allNodes.net.w0 { |w|
     64  w.type = 'b'
     65  w.essid = "helloworld"
     66  w.ip = "%192.168.%x.%y"
     67}
     68
     69#
     70# Now, start the application
     71#
     72whenAllInstalled() {|node|
     73 #First start AODV daemon on all nodes
     74  NodeSet['everyone'].startApplications
     75
     76  wait 10
     77
     78  #Then start receiver and sender
     79  NodeSet['receiver'].startApplications
     80  wait 30
     81  NodeSet['sender'].startApplications
     82
     83  wait 180
     84
     85  Experiment.done
     86}
     87
     88}}}
     89
     90
     91
     92== For Developers ==
     93The application definition and prototype definitions corresponding to AODV router are as follows
     94
     95== Application definition ==
     96{{{
     97#
     98# Create an application representation from scratch
     99#
     100require 'handler/appDefinition'
     101
     102a = AppDefinition.create('test:app:aodvd')
     103a.name = "aodvd"
     104a.version(0, 0, 1)
     105a.shortDescription = "Iperf traffic generator"
     106a.description = <<TEXT
     107Iperf is a traffic generator for TCP and UDP traffic. It contains generators
     108producing various forms of packet streams and port for sending
     109these packets via various transports, such as TCP and UDP.
     110TEXT
     111
     112# addProperty(name, description, mnemonic, type, isDynamic = false, constraints
     113= nil)
     114a.addProperty('interface', 'Interface to run on', ?i, String, false)
     115a.addProperty('log', 'Enable logging', ?l, String, false)
     116a.addProperty('rttable', 'Log rting table every N secs', ?r, String, false)
     117a.path = "/usr/sbin/aodvd"
     118
     119if $0 == __FILE__
     120  require 'stringio'
     121  require 'rexml/document'
     122  include REXML
     123
     124  sio = StringIO.new()
     125  a.to_xml.write(sio, 2)
     126  sio.rewind
     127  puts sio.read
     128
     129  sio.rewind
     130  doc = Document.new(sio)
     131  t = AppDefinition.from_xml(doc.root)
     132
     133  puts
     134  puts "-------------------------"
     135  puts
     136  t.to_xml.write($stdout, 2)
     137
     138end
     139
     140}}}
     141 
     142=== Prototype definition ===
     143{{{
     144#
     145# Define a prototype
     146#
     147
     148require 'handler/prototype'
     149require 'handler/filter'
     150require 'handler/appDefinition'
     151
     152p = Prototype.create("test:proto:aodvrouter")
     153p.name = "AODV daemon"
     154p.description = "Nodes which receive packets"
     155p.defProperty('interface', 'Interface to listen on')
     156p.defProperty('log', 'Enable logging')
     157p.defProperty('routelog', 'Enable logging')
     158
     159aodvd = p.addApplication('aodvd', "test:app:aodvd")
     160aodvd.bindProperty('interface')
     161aodvd.bindProperty('log')
     162aodvd.bindProperty('rttable','routelog')
     163
     164
     165if $0 == __FILE__
     166  p.to_xml.write($stdout, 2)
     167  puts
     168end
     169
     170
     171}}}