Changes between Version 1 and Version 2 of GEC17Agenda/AdvancedOpenFlow/Procedure/Appendices


Ignore:
Timestamp:
03/09/14 20:02:37 (10 years ago)
Author:
divyashri.bhat@gmail.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC17Agenda/AdvancedOpenFlow/Procedure/Appendices

    v1 v2  
    44
    55{{{
     6defProperty('theSender', "outside-loadbaltest", "ID of sender node")
     7defProperty('theReceiver', "inside-loadbaltest", "ID of receiver node")
     8defProperty('theSwitch',"switch-loadbaltest","ID of switch node")
     9defProperty('setinterval','1.0',"Time between iperf")
     10defProperty('serverip', "10.10.10.2","Server interface IP")
     11defProperty('clientip', "10.10.10.1","Client interface IP")
     12defProperty('setbandwidth', "100m", "Throughput of Sender")
     13defApplication('trace') do |app|
     14  app.description = 'Packet capture'
     15  app.binary_path = "/usr/bin/trace-oml2"
     16  app.defProperty('filter', 'Filter expression BPFEXP', '-f', {:type => :string, :mnemonic => 'f'})
     17  app.defProperty('interface', 'Interface to trace', '-i',{:type => :string, :mnemonic => 'i', :default => '"eth0"'})
     18  app.defProperty('config', 'config file to follow', '--oml-config',{:type => :string, :default => '"/tmp/monitor/conf.xml"'})
     19
     20app.defMeasurement("ip") do |m|
     21    m.defMetric('pktid',    :uint64, ' internal packet ID to link MPs')
     22    m.defMetric('ip_tos',   :uint32, ' Type of Service')
     23    m.defMetric('ip_len',   :uint32, ' Total Length')
     24    m.defMetric('ip_id',    :int32,  ' Identification')
     25    m.defMetric('ip_off',   :uint32, ' IP Fragment offset (and flags)')
     26    m.defMetric('ip_ttl',   :uint32, ' Time to Live')
     27    m.defMetric('ip_proto', :uint32, ' Protocol')
     28    m.defMetric('ip_sum',   :uint32, ' Checksum')
     29    m.defMetric('ip_src',   :string, ' Source Address')
     30    m.defMetric('ip_dst',   :string, ' Destination Address')
     31    m.defMetric('ip_sizeofpacket', :uint32, ' Size of the Packet')
     32    m.defMetric('ip_ts',    :double, ' timestamp of the measurement')
     33  end
     34
     35end
     36defApplication('iperf') do |app|
     37  app.description = "Iperf is a traffic generator and bandwidth measurement
     38tool. It provides generators producing various forms of packet streams and port
     39for sending these packets via various transports, such as TCP and UDP."
     40  app.binary_path = "/usr/bin/iperf_oml2"
     41
     42  #app.defProperty('interval', 'pause n seconds between periodic bandwidth reports', '-i',
     43   # :type => :double, :unit => "seconds", :default => '1.')
     44  app.defProperty('len', 'set length read/write buffer to n (default 8 KB)', '-l',
     45                  :type => :integer, :unit => "KiBytes")
     46  app.defProperty('print_mss', 'print TCP maximum segment size (MTU - TCP/IP header)', '-m',
     47                  :type => :boolean)
     48  app.defProperty('output', 'output the report or error message to this specified file', '-o',
     49                  :type => :string)
     50  app.defProperty('port', 'set server port to listen on/connect to to n (default 5001)', '-p',
     51                  :type => :integer)
     52  app.defProperty('udp', 'use UDP rather than TCP', '-u',
     53                  :type => :boolean,
     54                  :order => 2)
     55  app.defProperty('window', 'TCP window size (socket buffer size)', '-w',
     56                  :type => :integer, :unit => "Bytes")
     57  app.defProperty('bind', 'bind to <host>, an interface or multicast address', '-B',
     58                  :type => :string)
     59  app.defProperty('compatibility', 'for use with older versions does not sent extra msgs', '-C',
     60                  :type => :boolean)
     61  app.defProperty('mss', 'set TCP maximum segment size (MTU - 40 bytes)', '-M',
     62                  :type => :integer, :unit => "Bytes")
     63  app.defProperty('nodelay', 'set TCP no delay, disabling Nagle\'s Algorithm', '-N',
     64                  :type => :boolean)
     65  app.defProperty('IPv6Version', 'set the domain to IPv6', '-V',
     66                  :type => :boolean)
     67  app.defProperty('reportexclude', 'exclude C(connection) D(data) M(multicast) S(settings) V(server) reports', '-x',
     68                  :type => :string, :unit => "[CDMSV]")
     69  app.defProperty('reportstyle', 'C or c for CSV report, O or o for OML', '-y',
     70                  :type => :string, :unit => "[CcOo]", :default => "o") # Use OML reporting by default
     71
     72  app.defProperty('server', 'run in server mode', '-s',
     73                  :type => :boolean)
     74
     75  app.defProperty('bandwidth', 'set target bandwidth to n bits/sec (default 1 Mbit/sec)', '-b',
     76                  :type => :string, :unit => "Mbps")
     77  app.defProperty('client', 'run in client mode, connecting to <host>', '-c',
     78                  :type => :string,
     79                  :order => 1)
     80  app.defProperty('dualtest', 'do a bidirectional test simultaneously', '-d',
     81                  :type => :boolean)
     82  app.defProperty('num', 'number of bytes to transmit (instead of -t)', '-n',
     83                  :type => :integer, :unit => "Bytes")
     84  app.defProperty('tradeoff', 'do a bidirectional test individually', '-r',
     85                  :type => :boolean)
     86  app.defProperty('time', 'time in seconds to transmit for (default 10 secs)', '-t',
     87                  :type => :integer, :unit => "seconds")
     88  app.defProperty('fileinput', 'input the data to be transmitted from a file', '-F',
     89                  :type => :string)
     90  app.defProperty('stdin', 'input the data to be transmitted from stdin', '-I',
     91                  :type => :boolean)
     92  app.defProperty('listenport', 'port to recieve bidirectional tests back on', '-L',
     93                  :type => :integer)
     94  app.defProperty('parallel', 'number of parallel client threads to run', '-P',
     95                  :type => :integer)
     96  app.defProperty('ttl', 'time-to-live, for multicast (default 1)', '-T',
     97                  :type => :integer,
     98                  :default => 1)
     99  app.defProperty('linux_congestion', 'set TCP congestion control algorithm (Linux only)', '-Z',
     100                  :type => :boolean)
     101
     102  app.defMeasurement("application"){ |m|
     103    m.defMetric('pid', :integer)
     104    m.defMetric('version', :string)
     105    m.defMetric('cmdline', :string)
     106    m.defMetric('starttime_s', :integer)
     107    m.defMetric('starttime_us', :integer)
     108  }
     109
     110  app.defMeasurement("settings"){ |m|
     111    m.defMetric('pid', :integer)
     112    m.defMetric('server_mode', :integer)
     113    m.defMetric('bind_address', :string)
     114    m.defMetric('multicast', :integer)
     115    m.defMetric('multicast_ttl', :integer)
     116    m.defMetric('transport_protocol', :integer)
     117    m.defMetric('window_size', :integer)
     118    m.defMetric('buffer_size', :integer)
     119  }
     120
     121  app.defMeasurement("connection"){ |m|
     122    m.defMetric('pid', :integer)
     123    m.defMetric('connection_id', :integer)
     124    m.defMetric('local_address', :string)
     125    m.defMetric('local_port', :integer)
     126    m.defMetric('remote_address', :string)
     127    m.defMetric('remote_port', :integer)
     128  }
     129
     130  app.defMeasurement("transfer"){ |m|
     131    m.defMetric('pid', :integer)
     132    m.defMetric('connection_id', :integer)
     133    m.defMetric('begin_interval', :double)
     134    m.defMetric('end_interval', :double)
     135    m.defMetric('size', :uint64)
     136  }
     137
     138  app.defMeasurement("losses"){ |m|
     139    m.defMetric('pid', :integer)
     140    m.defMetric('connection_id', :integer)
     141    m.defMetric('begin_interval', :double)
     142    m.defMetric('end_interval', :double)
     143    m.defMetric('total_datagrams', :integer)
     144    m.defMetric('lost_datagrams', :integer)
     145  }
     146
     147  app.defMeasurement("jitter"){ |m|
     148    m.defMetric('pid', :integer)
     149    m.defMetric('connection_id', :integer)
     150    m.defMetric('begin_interval', :double)
     151    m.defMetric('end_interval', :double)
     152    m.defMetric('jitter', :double)
     153  }
     154
     155  app.defMeasurement("packets"){ |m|
     156    m.defMetric('pid', :integer)
     157    m.defMetric('connection_id', :integer)
     158    m.defMetric('packet_id', :integer)
     159    m.defMetric('packet_size', :integer)
     160    m.defMetric('packet_time_s', :integer)
     161    m.defMetric('packet_time_us', :integer)
     162    m.defMetric('packet_sent_time_s', :integer)
     163    m.defMetric('packet_sent_time_us', :integer)
     164  }
     165
     166end
     167
     168defGroup('Servers', property.theReceiver) do |node|
     169  node.addApplication("iperf") do |app|
     170        #app.setProperty('interval', property.setinterval)
     171        app.setProperty('server',true)
     172        app.setProperty('port',6001)
     173        app.measure('transfer', :samples => 1)
     174    end
     175end
     176
     177
     178defGroup('Sender',property.theSender) do |node|
     179    node.addApplication("iperf") do |app|
     180        #app.setProperty('interval',property.setinterval)
     181        app.setProperty('client',property.serverip)
     182        app.setProperty('tradeoff',true)
     183        app.setProperty('parallel', 5)
     184        app.setProperty('time',30)
     185        app.setProperty('port',6001)
     186        #app.setProperty('bandwidth',property.setbandwidth)
     187        app.measure('transfer', :samples => 1)
     188    end
     189   
     190end
     191defGroup('Monitor1', property.theSwitch) do |node|
     192  node.addApplication("trace") do |app|
     193    app.setProperty("interface", 'eth1')
     194    app.setProperty("filter", 'tcp')
     195     app.setProperty("config", "/tmp/monitor/conf.xml")
     196    app.measure("tcp", :samples => 1)
     197  end
     198end
     199defGroup('Monitor', property.theSwitch) do |node|
     200  node.addApplication("trace") do |app|
     201    app.setProperty("interface", 'eth3')
     202    app.setProperty("filter", 'tcp')
     203     app.setProperty("config", "/tmp/monitor/conf.xml")
     204    app.measure("tcp", :samples => 1)
     205  end
     206end
     207
     208
     209
     210onEvent(:ALL_UP_AND_INSTALLED) do |event|
     211    info "starting"
     212  group('Servers').startApplications
     213     after 2 do
     214       group('Monitor1').startApplications
     215       group('Monitor').startApplications
     216       group('Sender').startApplications
     217     end
     218    after 100 do
     219      group ('Sender').stopApplications
     220    group ('Monitor1').stopApplications
     221      group('Servers').stopApplications
     222     info "All applications stopped."
     223     Experiment.done
     224     end
     225end
     226##define the graphs that we want to display##
     227#defGraph 'Cumulated number of Bytes' do |g|
     228#  g.ms('network').select(:oml_ts_server, :tx_bytes, :oml_sender_id)
     229#  g.caption "Total Bytes"
     230#  g.type 'line_chart3'
     231#  g.mapping :x_axis => :oml_ts_server, :y_axis => :tx_bytes, :group_by => :oml_sender_id
     232#  g.xaxis :legend => 'time', :ticks => {:format => 's'}
     233#  g.yaxis :legend => '', :ticks => {:format => 'Byte'}
     234#end
     235
     236defGraph 'TCP Throughput Bytes-per-Second' do |g|
     237  g.ms('tcp').select(:oml_ts_server, :tcp_packet_size, :oml_sender_id)
     238  g.caption "TCP throughput"
     239  g.type 'line_chart3'
     240  g.mapping :x_axis => :oml_ts_server, :y_axis => :tcp_packet_size, :group_by => :oml_sender_id
     241  g.xaxis :legend => 'time', :ticks => {:format => 's'}
     242  g.yaxis :legend => '', :ticks => {:format => 'Bytes/s'}
     243end 
     244
    6245
    7246}}}