Changes between Version 3 and Version 4 of GEC17Agenda/AdvancedOpenFlow/Procedure/Execute
- Timestamp:
- 07/19/13 22:42:42 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GEC17Agenda/AdvancedOpenFlow/Procedure/Execute
v3 v4 22 22 == 2.1 Run an example Load Balancing OpenFlow Controller == 23 23 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]] 24 - 2.1.1Log 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]]24 - '''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]] 25 25 Start the example Load Balancer by executing the following: 26 26 {{{ 27 27 /opt/trema-trema-f995284/trema run /root/load-balancer.rb 28 28 }}} 29 - 2.1.2After you started your Load Balancer, you should be able to see the following (Switch id may vary):29 - '''2.1.2''' After you started your Load Balancer, you should be able to see the following (Switch id may vary): 30 30 {{{ 31 31 OpenFlow Load Balancer Conltroller Started! … … 35 35 36 36 == 2.2 Use GIMI Portal to run the experiment and monitor the load balancer == 37 - 2.2.1Log 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].38 - 2.2.2Log on to node "Switch" and do "ifconfig" to see the IP addresses on each interfaces.37 - '''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]. 38 - '''2.2.2''' Log on to node "Switch" and do "ifconfig" to see the IP addresses on each interfaces. 39 39 - '''Note''': You may not be able to see all interfaces up immediately when node "Switch" is ready; wait for some more time (about 1 min) then try "ifconfig" again. 40 - Identify the two interfaces that you want to monitor: the interfaces with IP addresses 192.168.2.1(left) and 192.168.3.1(right) respectively. On the !LabWiki page, in your ruby script, find the following lines:40 - '''2.2.3''' Identify the two interfaces that you want to monitor: the interfaces with IP addresses 192.168.2.1(left) and 192.168.3.1(right) respectively. On the !LabWiki page, in your ruby script, find the following lines: 41 41 {{{ 42 42 ###### Change the following to the correct interfaces ###### … … 45 45 ###### Change the above to the correct interfaces ###### 46 46 }}} 47 - 2.2.3Change 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.4Drag 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.5When your experiment is finished, turn off your controller and disconnect the switch from your controller:47 - '''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: 50 50 - On node "Switch", press "Ctrl" and "c" key to kill your Load Balancer process on node "Switch" 51 51 - On node "Switch", use the following command to disconnect the OpenFlow Switch from the controller: … … 56 56 57 57 == 2.3 Run the experiment in paths with different bandwidth == 58 - 2.3.1Log 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 - '''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"): 59 59 {{{ 60 60 ovs-vsctl set Interface eth1 ingress_policing_rate=10000 … … 63 63 - Other ways to e.g., change link delay and lossrate using "tc qdisc netem" can be found in Section 4. 64 64 65 - 2.3.2On node "Switch", start your Load Balancer using the following command:65 - '''2.3.2''' On node "Switch", start your Load Balancer using the following command: 66 66 {{{ 67 67 /opt/trema-trema-f995284/trema run /root/load-balancer.rb 68 68 }}} 69 - 2.3.3Start 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):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 70 {{{ 71 71 ovs-vsctl set-controller br0 tcp:127.0.0.1 ptcp:6634:127.0.0.1 72 72 }}} 73 - 2.3.4Go 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 - 2.3.5When your experiment is finished, turn off your controller and disconnect switch from your controller: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 - '''2.3.5''' When your experiment is finished, turn off your controller and disconnect switch from your controller: 75 75 - On node "Switch", press "Ctrl" and "c" key to kill your Load Balancer process on node "Switch" 76 76 - On node "Switch", use the following command to disconnect the OpenFlow Switch from the controller: … … 101 101 102 102 == 2.5 Automate your experiment using !LabWiki == 103 - 2.5.1Add code in your !LabWiki script to automate starting and stoping your OpenFlow Controller:104 - 2.5.1.1Go back to your !LabWiki page, un-comment the script from line 184 to line 189 to start your OpenFlow Controller automatically on !LabWiki103 - '''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 105 105 - Note: You might need to change line 185 to use the correct load balancer controller 106 - 2.5.1.2In your script, uncomment lines 205 to line 209 to stop your OpenFlow Controller automatically on !LabWiki107 - 2.7.2On 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).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 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 109