83 | | '''Hints on the OpenFlow controller Script load-balancer.rb:''' |
84 | | - |
85 | | - Remember that the default OpenFlow policy for your switch or Open vSwitch instance will likely be to send any packets that do not match a flow spec to the controller, so you will have to handle or discard these packets. |
| 84 | == 2.6 Change network delay and lossrate parameter of left path using tc and repeat the experiment == |
| 85 | - use the following command to change network condition on node "Switch": here we assume eth2 is the interface connecting node "Left". User may use "ifconfig" to figure out the correct interface. |
| 86 | {{{ |
| 87 | tc qdisc add dev eth2 root handle 1:0 netem delay 20ms loss 10% |
| 88 | }}} |
| 89 | - Did you see any difference from the graphs plotted on !LabWiki, compared with the graphs plotted in the first experiment? why? |
| 90 | - Check out the OpenFlow Load Balancing Controller's Log on node "Switch" at /tmp/lb.tmp and tell how many flows are directed to the left path and how many are on the right path, why? |
| 91 | - To answer the above question, you need to understand the Load Balancing controller. Check out the "load-balancer.rb" file in your home directory on node "Switch". Check Section 3 for hints/explanations about this OpenFlow Controller. |
87 | | '''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. |
| 93 | == 2.7 Modify the OpenFlow Controller to maximize per-flow throughput == |
| 94 | - You need to calculate the average per-flow throughput observed from both left and right path in function "stats_reply" in your load-balancer.rb |
| 95 | - In function "packet_in", change the path decision based on the calculated average per-flow throughput: forward the flow onto the path with more average per-flow throughput. (Why? Hint: TCP tries its best to suck up the whole bandwidth) |
| 96 | - If you do not know where to start, check the hints in Section 3. If you really do not know where to start after reading at the hints, download the answer from [http://www.gpolab.bbn.com/experiment-support/OpenFlowExampleExperiment/ExoGENI/load-balancer-solution.rb Here]. |
| 97 | - Redo the above experiment (the one with some lossrate on the left path), check the graphs plotted on !LabWiki as well as the controller's log on node "Switch" at /tmp/lb.tmp and see the difference. |
| 98 | - If you have more time or are interested in trying out things, go ahead. The tutorial is over now and feel free to ask questions :-) |
| 99 | |
| 100 | = 3. Hints = |
| 101 | == 3.1 About the OpenFlow controller load-balancer.rb == |
| 102 | - '''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. |