Changes between Version 2 and Version 3 of GENIEducation/SampleAssignments/OpenFlowLoadBalancerAssignment/ForInstructors


Ignore:
Timestamp:
05/31/13 10:54:55 (11 years ago)
Author:
shuang@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIEducation/SampleAssignments/OpenFlowLoadBalancerAssignment/ForInstructors

    v2 v3  
    124124 - '''Simplified Load Balancer: ''' [[BR]]
    125125 The above question requires the user to implement a web server on both left node and right node to report the querying results about token bucket buffer statistics. At the same time, the openflow controller that the experimenter implemented should pull the web page, parse the content to get those statistics, which seems to be too complicated. [[BR]]
    126  An alternative way to accomplish this is, by querying Flow statistics directly from the OpenFlow switch. [[BR]]
    127  Upon the arrival of a new TCP flow, the OpenFlow controller should send out a `FlowStatsRequest` message to the OpenFlow switch. The OpenFlow switch will reply with statistics information about all flows in its flow table. This flow statistics message will be fetched by the `stats_reply` function in Trema. Based on the statistics, experimenters can apply their own policy on which path to choose in different situations. For more information about !FlowStatsRequest and !FlowStatsReply, please refer to http://rubydoc.info/github/trema/trema/master/Trema/FlowStatsRequest and http://rubydoc.info/github/trema/trema/master/Trema/FlowStatsReply. [[BR]]
     126
     127 An alternative way to accomplish this is by querying Flow statistics directly from the OpenFlow switch. [[BR]]
     128 
     129 '''Process: ''' Upon the arrival of a new TCP flow, the OpenFlow controller should send out a `FlowStatsRequest` message to the OpenFlow switch. The OpenFlow switch will reply with statistics information about all flows in its flow table.
     130 This flow statistics message will be fetched by the `stats_reply` function in the openflow controller implemented by the user on node `switch`. Based on the statistics, experimenters can apply their own policy on which path to choose in different situations.
     131 The !FlowStatsReply message is in the following format:
     132{{{
     133FlowStatsReply.new(
     134  :length => 96,
     135  :table_id => 0,
     136  :match => Match.new
     137  :duration_sec => 10,
     138  :duration_nsec => 106000000,
     139  :priority => 0,
     140  :idle_timeout => 0,
     141  :hard_timeout => 0,
     142  :cookie => 0xabcd,
     143  :packet_count => 1,
     144  :byte_count => 1,
     145  :actions => [ ActionOutput.new ]
     146)
     147}}}
     148 For more information about !FlowStatsRequest and !FlowStatsReply, please refer to http://rubydoc.info/github/trema/trema/master/Trema/FlowStatsRequest and http://rubydoc.info/github/trema/trema/master/Trema/FlowStatsReply. [[BR]]
    128149 The difference between this Load Balancer and the Load Balancer introduced in the previous section is, this Load Balancer only reports the cumulated statistics of each flow over-time while the previous Load Balancer fetches the real-time network traffic information from both paths.
    129150 
     
    132153 
    133154 '''Question: Try modify the downloaded load balancer so that it decides path based on the average per-flow throughput observed on each path'''
     155 '''Note: ''' since Trema does not yet support multi-thread mode, this simple implementation runs in one thread. As a result, users will experience some delay in fetching the flow statistics (i.e., `stats_reply` will not be called right after a !FlowStatsRequest message has been sent in `packet_in` handler).
     156 '''Solution: The source code for load-balancer-simple-tp.rb can be found at [http://www.gpolab.bbn.com/experiment-support/OpenFlowExampleExperiment/forInstructors/load-balancer-simple-tp.rb load-balancer-simple-tp.rb] [[BR]]'''
    134157
    135  * Answers can be found [http://www.gpolab.bbn.com/experiment-support/OpenFlowExampleExperiment/forInstructors/ Here]
     158 * All Answers can be found [http://www.gpolab.bbn.com/experiment-support/OpenFlowExampleExperiment/forInstructors/ Here]