Changes between Version 4 and Version 5 of GEC17Agenda/AdvancedOpenFlow/Procedure/Execute


Ignore:
Timestamp:
07/19/13 22:54:37 (6 years ago)
Author:
nriga@bbn.com
Comment:

--

Legend:

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

    v4 v5  
    1717}}}
    1818
    19 
    20 = 2. Implement a Load Balancing OpenFlow Controller =
    21 
    22 == 2.1 Run an example Load Balancing OpenFlow Controller ==
     19== 2. Configure and Initialize Services ==
     20=== 2.1. Start a naive OpenFlow controller ===
    2321  An example OpenFlow Controller that assigns incoming TCP connections to alternating paths '''based on total number of flows''' is already downloaded for you. You can find it (load-balancer.rb) in the home directory on node "Switch". [[BR]]
    2422  - '''2.1.1''' Log on to node "Switch", wait until all interfaces are up and running. To check that all interfaces are configured issue "ifconfig", make sure eth1, eth2, eth3 are up and assigned with valid IP addresses. [[BR]]
     
    3432  This means the OpenFlow Switch is connected to your controller and you can start testing your OpenFlow Load Balancer now.
    3533 
    36 == 2.2 Use GIMI Portal to run the experiment and monitor the load balancer ==
     34=== 2.2. Configure !LabWiki to orchestrate and monitor your experiment ===
    3735    - '''2.2.1''' Log on to !LabWiki on http://emmy9.casa.umass.edu:3005 , on the `Prepare` Column, type "OpenFlow", it will pop up with a list of .rb choices. Choose any one, and replace the whole content with the ruby script [http://www.gpolab.bbn.com/experiment-support/OpenFlowExampleExperiment/ExoGENI/loadbalancer_monitor.rb HERE].
    3836   - '''2.2.2''' Log on to node "Switch" and do "ifconfig" to see the IP addresses on each interfaces.
     
    4644}}}
    4745   - '''2.2.4''' Change eth1 and eth3 to the corresponding two interfaces you found with IP addresses 192.168.2.1 (the interface that connects to the left path) and 192.168.3.1 (the interface that connects to the right path) and press the "save" icon on your !LabWiki page.
    48    - '''2.2.5''' Drag the `file Icon` at the left-top corner on your !LabWiki page from `Prepare` column and drop it to `Execute` column. Fill in the name of your !LabWiki experiment (this can be anything, it is just to help you track the experiments you run), the name of your slice (this has to be your slice name), and type "true" in the graph box to enable graphs. Then press the "Start Experiment" button.
    49    - '''2.2.6''' When your experiment is finished, turn off your controller and disconnect the switch from your controller:
     46
     47== 3. Run your experiment ==
     48=== 3.1 Start your experiment with existing configuration ===
     49   - '''3.1.1''' Drag the `file Icon` at the left-top corner on your !LabWiki page from `Prepare` column and drop it to `Execute` column. Fill in the name of your !LabWiki experiment (this can be anything, it is just to help you track the experiments you run), the name of your slice (this has to be your slice name), and type "true" in the graph box to enable graphs. Then press the "Start Experiment" button.
     50   - '''3.1.2''' When your experiment is finished, turn off your controller and disconnect the switch from your controller:
    5051      - On node "Switch", press "Ctrl" and "c" key to kill your Load Balancer process on node "Switch"
    5152      - On node "Switch", use the following command to disconnect the OpenFlow Switch from the controller:
     
    5556   - '''Note''': Do not start another experiment (i.e., drag and drop the file icon in !LabWiki and press "Start Experiment") before your current experiment is finished.
    5657   
    57 == 2.3 Run the experiment in paths with different bandwidth ==
    58  - '''2.3.1''' Log on to node "left" and change the link capacity for the interface with IP address "192.168.2.2" (use "ifconfig" to find the correct interface, here we assume eth1 is the interface connecting to node "Switch"):
     58=== 3.2 Run the experiment in paths with different bandwidth ===
     59 - '''3.2.1''' Log on to node "left" and change the link capacity for the interface with IP address "192.168.2.2" (use "ifconfig" to find the correct interface, here we assume eth1 is the interface connecting to node "Switch"):
    5960{{{
    6061ovs-vsctl set Interface eth1 ingress_policing_rate=10000
     
    6364 - Other ways to e.g., change link delay and lossrate using "tc qdisc netem" can be found in Section 4.
    6465
    65  - '''2.3.2''' On node "Switch", start your Load Balancer using the following command:
     66 - '''3.2.2''' On node "Switch", start your Load Balancer using the following command:
    6667 {{{
    6768 /opt/trema-trema-f995284/trema run /root/load-balancer.rb
    6869 }}}
    69  - '''2.3.3''' Start a new terminal, log onto node "Switch", use the following command to connect the OpenFlow Switch to the controller (the console window that runs your controller should display "Switch is Ready!" when the switch is connected):
     70 - '''3.2.3''' Start a new terminal, log onto node "Switch", use the following command to connect the OpenFlow Switch to the controller (the console window that runs your controller should display "Switch is Ready!" when the switch is connected):
    7071 {{{
    7172 ovs-vsctl set-controller br0 tcp:127.0.0.1 ptcp:6634:127.0.0.1
    7273 }}}
    73  - '''2.3.4''' Go back to your !LabWiki web page, drag and drop the `file icon` and repeat the experiment, as described in section 2.2.4, using a different experiment name (the slice name should stay the same).
     74 - '''3.2.4''' Go back to your !LabWiki web page, drag and drop the `file icon` and repeat the experiment, as described in section 2.2.4, using a different experiment name (the slice name should stay the same).
    7475 - '''2.3.5''' When your experiment is finished, turn off your controller and disconnect switch from your controller:
    7576      - On node "Switch", press "Ctrl" and "c" key to kill your Load Balancer process on node "Switch"
     
    8485 - 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.1 for hints/explanations about this OpenFlow Controller.
    8586
    86 == 2.4 Modify the OpenFlow Controller to balance throughput among all the TCP flows ==
     87=== 3.3 Modify the OpenFlow Controller to balance throughput among all the TCP flows ===
    8788 - You need to calculate the average per-flow throughput observed from both left and right paths. The modifications need to happen in the function "stats_reply" in load-balancer.rb
    8889 - In function "decide_path", 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? TCP tries its best to consume the whole bandwidth so more throughput means network is not congested)
     
    100101  - On node "Switch", press "Ctrl" and "c" key to kill your Load Balancer process on node "Switch"
    101102
    102 == 2.5 Automate your experiment using !LabWiki ==
    103  - '''2.5.1''' Add code in your !LabWiki script to automate starting and stoping your OpenFlow Controller:
    104   - '''2.5.1.1''' Go back to your !LabWiki page, un-comment the script from line 184 to line 189 to start your OpenFlow Controller automatically on !LabWiki
     103== 3.4 Automate your experiment using !LabWiki ==
     104 - '''3.4.1''' Add code in your !LabWiki script to automate starting and stoping your OpenFlow Controller:
     105  - '''3.4.1.1''' Go back to your !LabWiki page, un-comment the script from line 184 to line 189 to start your OpenFlow Controller automatically on !LabWiki
    105106   - Note: You might need to change line 185 to use the correct load balancer controller
    106   - '''2.5.1.2''' In your script, uncomment lines 205 to line 209 to stop your OpenFlow Controller automatically on !LabWiki
    107  - '''2.5.2''' On your !LabWiki web page, drag and drop the `file icon` and repeat the experiment, as described in section 2.3, using a different experiment name (the slice name should stay the same).
    108  - If you have more time or are interested in trying out things, go ahead and try section 2.6. The tutorial is over now and feel free to ask questions :-)
    109 
    110 == 2.6 Try more experiments using different kinds of OpenFlow Load Balancers ==
     107  - '''3.4.1.2''' In your script, uncomment lines 205 to line 209 to stop your OpenFlow Controller automatically on !LabWiki
     108 - '''3.4.2''' On your !LabWiki web page, drag and drop the `file icon` and repeat the experiment, as described in section 2.3, using a different experiment name (the slice name should stay the same).
     109 - If you have more time or are interested in trying out things, go ahead and try section 3.5. The tutorial is over now and feel free to ask questions :-)
     110
     111== 3.5(Optional) Try different kinds of OpenFlow Load Balancers ==
    111112 - You can find more load balancers under /tmp/load-balancer/ on node "Switch"
    112113 - To try out any one of them, follow the steps:
     
    126127  - Load balancers that begin with "load-balancer-throughput" picks path based on the total throughput sent out to each path: the one with '''more throughput''' is picked
    127128
    128 = 3. Hints / Explanation =
    129 == 3.1 About the OpenFlow controller [http://www.gpolab.bbn.com/experiment-support/OpenFlowExampleExperiment/ExoGENI/load-balancer.rb load-balancer.rb] ==
     129= Appendix: Hints and Explanations =
     130== A. About the OpenFlow controller [http://www.gpolab.bbn.com/experiment-support/OpenFlowExampleExperiment/ExoGENI/load-balancer.rb load-balancer.rb] ==
    130131  - Trema web site: http://trema.github.io/trema/
    131132  - Treme ruby API document: http://rubydoc.info/github/trema/trema/master/frames
     
    163164}}}
    164165
    165 == 3.2 About The Rspec file [http://www.gpolab.bbn.com/experiment-support/OpenFlowExampleExperiment/openflow-loadbalancer-kvm.rspec OpenFlowLBExo.rspec] ==
     166== B. About The Rspec file [http://www.gpolab.bbn.com/experiment-support/OpenFlowExampleExperiment/openflow-loadbalancer-kvm.rspec OpenFlowLBExo.rspec] ==
    166167  - The Rspec file describes a topology we showed earlier--each node is assigned with certain number of interfaces with pre-defined IP addresses
    167168  - Some of the nodes are loaded with softwares and post-scripts. We will take node "Switch" as an example since it is the most complicated one.
     
    207208   }}}
    208209
    209 == 3.3 About the GIMI script you run on !LabWiki ==
     210== C. About the GIMI script you run on !LabWiki ==
    210211 - Line 1 to Line 128: the definition of oml trace and oml nmetrics library. It basically defines the command line options for oml2-trace and oml2-nmetrics, as well as the output (the monitoring data that is going to be stored into the oml server)
    211212  - users are not supposed to modify them
     
    241242  - The second graph uses the monitoring results from oml2-trace to display the throughput observed from each of the interfaces.
    242243
    243 = 4. Tips: Debugging an OpenFlow Controller =
     244= D. Tips: Debugging an OpenFlow Controller =
    244245You will find it helpful to know what is going on inside your OpenFlow controller and its associated switch when implementing these exercises. [[BR]]
    245246This section contains a few tips that may help you out if you are using the Open vSwitch implementation provided with this tutorial.