Changes between Version 12 and Version 13 of GEC17Agenda/AdvancedOpenFlow/Procedure/Appendices


Ignore:
Timestamp:
09/11/14 19:51:38 (10 years ago)
Author:
divyashri.bhat@gmail.com
Comment:

--

Legend:

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

    v12 v13  
    66
    77{{{
    8 defProperty('theSender', "outside-loadbaltest", "ID of sender node")
    9 defProperty('theReceiver', "inside-loadbaltest", "ID of receiver node")
    10 defProperty('theSwitch',"switch-loadbaltest", "ID of switch node")
    11 defProperty('left', "eth1", "Left Interface name")
    12 defProperty('right', "eth3", "Right Interface name")
    13 defProperty('setinterval','1.0',"Time between iperf")
    14 defProperty('serverip', "10.10.10.2","Server interface IP")
    15 defProperty('clientip', "10.10.10.1","Client interface IP")
    16 defProperty('setbandwidth', "100m", "Throughput of Sender")
    17 defApplication('trace') do |app|
    18   app.description = 'Packet capture'
    19   app.binary_path = "/usr/bin/trace-oml2"
    20   app.defProperty('filter', 'Filter expression BPFEXP', '-f', {:type => :string, :mnemonic => 'f'})
    21   app.defProperty('interface', 'Interface to trace', '-i',{:type => :string, :mnemonic => 'i', :default => '"eth0"'})
     8defProperty('slice', 'testloadbal3', "slice name")
     9defProperty('intervalcol',"1", "Interval to Tail")
     10defProperty('theSender', "outside", "ID of sender node")
     11defProperty('theReceiver', "inside", "ID of receiver node")
     12defProperty('theSwitch',"switch", "ID of switch node")
     13defProperty('pathfile', "/tmp/flowstats.out", "Path to file")
    2214
    23 app.defMeasurement("tcp") do |m|
    24     m.defMetric('pktid',        :uint64, ' internal packet ID to link MPs')
    25     m.defMetric('tcp_source',   :uint32, ' Source Port')
    26     m.defMetric('tcp_dest',     :uint32, ' Destination Port')
    27     m.defMetric('tcp_seq',      :uint32, ' TCP sequence Number')
    28     m.defMetric('tcp_ack_seq',  :uint32, ' Acknowledgment Number')
    29     m.defMetric('tcp_window',   :uint32, ' Window Size')
    30     m.defMetric('tcp_checksum', :uint32, ' Checksum')
    31     m.defMetric('tcp_urgptr',   :uint32, ' Urgent Pointer')
    32     m.defMetric('tcp_packet_size', :uint32, ' Size of the Packet')
    33     m.defMetric('tcp_ts',       :double, ' timestamp of the measurement')
    34   end
     15theSender = property.theSender.to_s.split(',').map { |x| "#{x}-#{property.slice}" }
     16theReceiver = property.theReceiver.to_s.split(',').map { |x| "#{x}-#{property.slice}" }
     17theSwitch = property.theSwitch.value.to_s.split(',').map { |x| "#{x}-#{property.slice}" }
     18iperfNodes = theSender + theReceiver
    3519
    36 end
    37 defApplication('iperf') do |app|
    38   app.description = "Iperf is a traffic generator and bandwidth measurement
    39 tool. It provides generators producing various forms of packet streams and port
    40 for sending these packets via various transports, such as TCP and UDP."
    41   app.binary_path = "/usr/bin/iperf_oml2"
    42 
    43   #app.defProperty('interval', 'pause n seconds between periodic bandwidth reports', '-i',
    44    # :type => :double, :unit => "seconds", :default => '1.')
    45   app.defProperty('len', 'set length read/write buffer to n (default 8 KB)', '-l',
    46                   :type => :integer, :unit => "KiBytes")
    47   app.defProperty('print_mss', 'print TCP maximum segment size (MTU - TCP/IP header)', '-m',
    48                   :type => :boolean)
    49   app.defProperty('output', 'output the report or error message to this specified file', '-o',
    50                   :type => :string)
    51   app.defProperty('port', 'set server port to listen on/connect to to n (default 5001)', '-p',
    52                   :type => :integer)
    53   app.defProperty('udp', 'use UDP rather than TCP', '-u',
    54                   :type => :boolean,
    55                   :order => 2)
    56   app.defProperty('window', 'TCP window size (socket buffer size)', '-w',
    57                   :type => :integer, :unit => "Bytes")
    58   app.defProperty('bind', 'bind to <host>, an interface or multicast address', '-B',
    59                   :type => :string)
    60   app.defProperty('compatibility', 'for use with older versions does not sent extra msgs', '-C',
    61                   :type => :boolean)
    62   app.defProperty('mss', 'set TCP maximum segment size (MTU - 40 bytes)', '-M',
    63                   :type => :integer, :unit => "Bytes")
    64   app.defProperty('nodelay', 'set TCP no delay, disabling Nagle\'s Algorithm', '-N',
    65                   :type => :boolean)
    66   app.defProperty('IPv6Version', 'set the domain to IPv6', '-V',
    67                   :type => :boolean)
    68   app.defProperty('reportexclude', 'exclude C(connection) D(data) M(multicast) S(settings) V(server) reports', '-x',
    69                   :type => :string, :unit => "[CDMSV]")
    70   app.defProperty('reportstyle', 'C or c for CSV report, O or o for OML', '-y',
    71                   :type => :string, :unit => "[CcOo]", :default => "o") # Use OML reporting by default
    72 
    73   app.defProperty('server', 'run in server mode', '-s',
    74                   :type => :boolean)
    75 
    76   app.defProperty('bandwidth', 'set target bandwidth to n bits/sec (default 1 Mbit/sec)', '-b',
    77                   :type => :string, :unit => "Mbps")
    78   app.defProperty('client', 'run in client mode, connecting to <host>', '-c',
    79                   :type => :string,
    80                   :order => 1)
    81   app.defProperty('dualtest', 'do a bidirectional test simultaneously', '-d',
    82                   :type => :boolean)
    83   app.defProperty('num', 'number of bytes to transmit (instead of -t)', '-n',
    84                   :type => :integer, :unit => "Bytes")
    85   app.defProperty('tradeoff', 'do a bidirectional test individually', '-r',
    86                   :type => :boolean)
    87   app.defProperty('time', 'time in seconds to transmit for (default 10 secs)', '-t',
    88                   :type => :integer, :unit => "seconds")
    89   app.defProperty('fileinput', 'input the data to be transmitted from a file', '-F',
    90                   :type => :string)
    91   app.defProperty('stdin', 'input the data to be transmitted from stdin', '-I',
    92                   :type => :boolean)
    93   app.defProperty('listenport', 'port to recieve bidirectional tests back on', '-L',
    94                   :type => :integer)
    95   app.defProperty('parallel', 'number of parallel client threads to run', '-P',
    96                   :type => :integer)
    97   app.defProperty('ttl', 'time-to-live, for multicast (default 1)', '-T',
    98                   :type => :integer,
    99                   :default => 1)
    100   app.defProperty('linux_congestion', 'set TCP congestion control algorithm (Linux only)', '-Z',
    101                   :type => :boolean)
    102 
    103   app.defMeasurement("application"){ |m|
    104     m.defMetric('pid', :integer)
    105     m.defMetric('version', :string)
    106     m.defMetric('cmdline', :string)
    107     m.defMetric('starttime_s', :integer)
    108     m.defMetric('starttime_us', :integer)
    109   }
    110 
    111   app.defMeasurement("settings"){ |m|
    112     m.defMetric('pid', :integer)
    113     m.defMetric('server_mode', :integer)
    114     m.defMetric('bind_address', :string)
    115     m.defMetric('multicast', :integer)
    116     m.defMetric('multicast_ttl', :integer)
    117     m.defMetric('transport_protocol', :integer)
    118     m.defMetric('window_size', :integer)
    119     m.defMetric('buffer_size', :integer)
    120   }
    121 
    122   app.defMeasurement("connection"){ |m|
    123     m.defMetric('pid', :integer)
    124     m.defMetric('connection_id', :integer)
    125     m.defMetric('local_address', :string)
    126     m.defMetric('local_port', :integer)
    127     m.defMetric('remote_address', :string)
    128     m.defMetric('remote_port', :integer)
    129   }
    130 
    131   app.defMeasurement("transfer"){ |m|
    132     m.defMetric('pid', :integer)
    133     m.defMetric('connection_id', :integer)
    134     m.defMetric('begin_interval', :double)
    135     m.defMetric('end_interval', :double)
    136     m.defMetric('size', :uint64)
    137   }
    138 
    139   app.defMeasurement("losses"){ |m|
    140     m.defMetric('pid', :integer)
    141     m.defMetric('connection_id', :integer)
    142     m.defMetric('begin_interval', :double)
    143     m.defMetric('end_interval', :double)
    144     m.defMetric('total_datagrams', :integer)
    145     m.defMetric('lost_datagrams', :integer)
    146   }
    147 
    148   app.defMeasurement("jitter"){ |m|
    149     m.defMetric('pid', :integer)
    150     m.defMetric('connection_id', :integer)
    151     m.defMetric('begin_interval', :double)
    152     m.defMetric('end_interval', :double)
    153     m.defMetric('jitter', :double)
    154   }
    155 
    156   app.defMeasurement("packets"){ |m|
    157     m.defMetric('pid', :integer)
    158     m.defMetric('connection_id', :integer)
    159     m.defMetric('packet_id', :integer)
    160     m.defMetric('packet_size', :integer)
    161     m.defMetric('packet_time_s', :integer)
    162     m.defMetric('packet_time_us', :integer)
    163     m.defMetric('packet_sent_time_s', :integer)
    164     m.defMetric('packet_sent_time_us', :integer)
    165   }
    166 
     20defApplication('clean_iperf') do |app|
     21  app.description = 'Some commands to ensure that we start with a clean slate'
     22  app.binary_path = '/usr/bin/killall -s9 iperf; '
     23  app.quiet = true
    16724end
    16825
    169 defGroup('Servers', property.theReceiver) do |node|
    170   node.addApplication("iperf") do |app|
    171         #app.setProperty('interval', property.setinterval)
    172         app.setProperty('server',true)
    173         app.setProperty('port',6001)
    174         app.measure('transfer', :samples => 1)
    175     end
     26defApplication('iperfserv') do |app|
     27  app.description = "manually run Iperf server"
     28  app.binary_path = "/usr/bin/iperf -s"
     29end
     30defApplication('iperfclient') do |app|
     31  app.description = "manually run Iperf client"
     32  app.binary_path = "/usr/bin/iperf -c 10.10.10.2 -t 800 -P 5"
    17633end
    17734
    178 
    179 defGroup('Sender',property.theSender) do |node|
    180     node.addApplication("iperf") do |app|
    181         #app.setProperty('interval',property.setinterval)
    182         app.setProperty('client',property.serverip)
    183         app.setProperty('tradeoff',true)
    184         app.setProperty('parallel', 5)
    185         app.setProperty('time',30)
    186         app.setProperty('port',6001)
    187         #app.setProperty('bandwidth',property.setbandwidth)
    188         app.measure('transfer', :samples => 1)
    189     end
    190    
    191 end
    192 
    193 defGroup('Sender1',property.theSender) do |node|
    194     node.addApplication("iperf") do |app|
    195         #app.setProperty('interval',property.setinterval)
    196         app.setProperty('client',property.serverip)
    197         app.setProperty('tradeoff',true)
    198         app.setProperty('parallel', 2)
    199         app.setProperty('time',30)
    200         app.setProperty('port',6001)
    201         #app.setProperty('bandwidth',property.setbandwidth)
    202         app.measure('transfer', :samples => 1)
    203     end
    204    
    205 end
    206 defGroup('Monitor1', property.theSwitch) do |node|
    207   node.addApplication("trace") do |app|
    208     app.setProperty("interface", property.left)
    209     app.setProperty("filter", 'tcp')
    210     app.measure("tcp", :samples => 1)
    211   end
    212 end
    213 defGroup('Monitor', property.theSwitch) do |node|
    214   node.addApplication("trace") do |app|
    215     app.setProperty("interface", property.right)
    216     app.setProperty("filter", 'tcp')
    217     app.measure("tcp", :samples => 1)
     35defApplication('ofstats') do |app|
     36  app.description = 'Simple Definition for the of-collect application'
     37  # Define the path to the binary executable for this application
     38  app.binary_path = '/usr/local/bin/ofcollect.rb'
     39  app.defProperty('target', 'Address to output file', '-f', {:type => :string})
     40  app.defProperty("interval","Interval",'-i', {:type => :string})
     41  app.defMeasurement('wrapper_ofthroughput') do |m|
     42    m.defMetric('pathtype', :string)
     43    m.defMetric('throughput',:int64)
     44    m.defMetric('avgperflow',:int64)
    21845  end
    21946end
    22047
     48defGroup('iperf_nodes', *iperfNodes) do |g|
     49  g.addApplication("clean_iperf") do |app|
     50  end
     51end
    22152
     53defGroup('Source1', *theSwitch) do |node|
     54  node.addApplication("ofstats") do |app|
     55    app.setProperty('target', property.pathfile)
     56    app.setProperty('interval', property.intervalcol)
     57    app.measure('wrapper_ofthroughput', :samples => 1)
     58  end
     59end
     60
     61  defGroup('Sender1', *theSender) do |node|
     62    node.addApplication("iperfclient") do |app|
     63    end
     64  end
     65  defGroup('Sender2', *theSender) do |node|
     66    node.addApplication("iperfclient") do |app|
     67    end
     68  end
     69  defGroup('Sender3', *theSender) do |node|
     70    node.addApplication("iperfclient") do |app|
     71    end
     72  end
     73  defGroup('Receiver', *theReceiver) do |node|
     74    node.addApplication("iperfserv") do |app|
     75    end
     76  end
     77 
    22278
    22379onEvent(:ALL_UP_AND_INSTALLED) do |event|
    224     info "starting"
    225   group('Servers').startApplications
    226      after 2 do
    227        group('Monitor1').startApplications
    228        group('Monitor').startApplications
    229        group('Sender').startApplications
    230      end
    231   after 4 do
     80  info "Starting the collect"
     81  group('iperf_nodes').startApplications
     82  after 2 do
     83    group('Receiver').startApplications
     84  end
     85  after 15 do
    23286    group('Sender1').startApplications
     87    group('Source1').startApplications
    23388  end
    234     after 100 do
    235       group ('Sender').stopApplications
    236       group ('Sender1').stopApplications
    237     group ('Monitor1').stopApplications
    238       group('Servers').stopApplications
    239      info "All applications stopped."
    240      Experiment.done
    241      end
     89  after 40 do
     90    group('Sender2').startApplications
     91  end
     92  after 80 do
     93    group('Sender3').startApplications
     94  end
     95  after 200 do
     96    info "Stopping the collect"
     97    allGroups.stopApplications
     98    Experiment.done
     99  end
    242100end
    243 ##define the graphs that we want to display##
    244 #defGraph 'Cumulated number of Bytes' do |g|
    245 #  g.ms('network').select(:oml_ts_server, :tx_bytes, :oml_sender_id)
    246 #  g.caption "Total Bytes"
    247 #  g.type 'line_chart3'
    248 #  g.mapping :x_axis => :oml_ts_server, :y_axis => :tx_bytes, :group_by => :oml_sender_id
    249 #  g.xaxis :legend => 'time', :ticks => {:format => 's'}
    250 #  g.yaxis :legend => '', :ticks => {:format => 'Byte'}
    251 #end
    252101
    253 defGraph 'TCP Throughput Bytes-per-Second' do |g|
    254   g.ms('tcp').select(:oml_ts_server, :tcp_packet_size, :oml_sender_id)
    255   g.caption "TCP throughput"
     102defGraph 'Throughput' do |g|
     103  g.ms('wrapper_ofthroughput').select(:oml_ts_client, :throughput, :pathtype)
     104  g.caption "Throughput of Flows"
    256105  g.type 'line_chart3'
    257   g.mapping :x_axis => :oml_ts_server, :y_axis => :tcp_packet_size, :group_by => :oml_sender_id
    258   g.xaxis :legend => 'time', :ticks => {:format => 's'}
    259   g.yaxis :legend => '', :ticks => {:format => 'Bytes/s'}
    260 end 
     106  g.mapping :x_axis => :oml_ts_client, :y_axis => :throughput, :group_by => :pathtype
     107  g.xaxis :legend => 'Time[s]'
     108  g.yaxis :legend => 'Throughput [bps]', :ticks => {:format => 's'}
     109end
     110defGraph 'ThroughputperFlow' do |g|
     111  g.ms('wrapper_ofthroughput').select(:oml_ts_client, :avgperflow, :pathtype)
     112  g.caption "Average Throughput of Flows"
     113  g.type 'line_chart3'
     114  g.mapping :x_axis => :oml_ts_client, :y_axis => :avgperflow, :group_by => :pathtype
     115  g.xaxis :legend => 'Time [s]'
     116  g.yaxis :legend => 'Average per Flow [bps]', :ticks => {:format => 's'}
     117end
    261118
    262119}}}