Changes between Version 12 and Version 13 of GENIExperimenter/Tutorials/OpenFlowOVS/Execute


Ignore:
Timestamp:
09/18/13 13:27:00 (7 years ago)
Author:
lnevers@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIExperimenter/Tutorials/OpenFlowOVS/Execute

    v12 v13  
    6363
    6464=== 2c. Point your switch to a controller ===
    65 An OpenFlow switch will not forward any packet, unless instructed by a controller. Basically the forwarding table is empty, until an external controller inserts forwarding rules. The OpenFlow controller communicates with the switch over the control network and it can be anywhere in the Internet as long as it is reachable by the OVS host. For the purpose of this tutorial and in order to minimize the resources we have reserved we are going to run OpenFlow controller at the same host as the OVS switch. This is '''merely''' for convenience reasons, the controller could have been anywhere on the Internet.
    66 
    67 In order to point our software OpenFlow switch to the controller run:
     65An !OpenFlow switch will not forward any packet, unless instructed by a controller. Basically the forwarding table is empty, until an external controller inserts forwarding rules. The !OpenFlow controller communicates with the switch over the control network and it can be anywhere in the! Internet as long as it is reachable by the OVS host. For the purpose of this tutorial and in order to minimize the resources we have reserved we are going to run OpenFlow controller at the same host as the OVS switch. This is '''merely''' for convenience reasons, the controller could have been anywhere on the Internet.
     66
     67In order to point our software !OpenFlow switch to the controller run:
    6868{{{
    6969sudo ovs-vsctl set-controller br0 tcp:127.0.0.1:6633
     
    7171
    7272==== `standalone` vs `secure` mode ====
    73 The OpenFlow controller is responsible for setting up all flows on the switch, which means that when the controller is not running there should be no packet switching at all. Depending on the setup of your network, such a behavior might not be desired. It might be best that when the controller is down, the switch should default back in being a learning layer 2 switch. In other circumstances however this might be undesirable. In OVS this is a tunable parameter, called `fail-safe-mode` which can be set to the following parameters:
     73The !OpenFlow controller is responsible for setting up all flows on the switch, which means that when the controller is not running there should be no packet switching at all. Depending on the setup of your network, such a behavior might not be desired. It might be best that when the controller is down, the switch should default back in being a learning layer 2 switch. In other circumstances however this might be undesirable. In OVS this is a tunable parameter, called `fail-safe-mode` which can be set to the following parameters:
    7474  * `standalone` [default] : in which case OVS will take responsibility for forwarding the packets if the controller fails
    7575  * `secure` : in which case only the controller is responsible for forwarding packets, and if the controller is down all packets are going to be dropped.
     
    112112==== Soft vs Hard Timeouts ====
    113113All rules on the switch have two different timeouts:
     114
    114115  * '''Soft Timeout''': This determines for how long the flow will remain at the forwarding table of the switch, if there no packets received that match the specific flow. As long as packets from that flow are received the flow remains on the flow table.
    115116  * '''Hard Timeout''': This determines the total time that a flow will remain at the forwarding table, independent of whether packets that match the flow are received; i.e. the flow will be removed after the hard timeout expires.
     
    118119
    119120=== Useful Tips for writing your controller ===
    120 In order to make this first experience of writing controller easier, we wrote some helpful functions that will abstract some of the  particularities of PoX away.
     121In order to make this first experience of writing controller easier, we wrote some helpful functions that will abstract some of the particularities of PoX away.
    121122These functions are locates at `/local/pox/ext/utils.py`, so while you write your controller consult this file for details.
    122123
     
    140141
    141142=== 3c. Run a traffic duplication controller ===
    142 In the above example we ran a very simple controller. The power of OpenFlow comes from the fact that you can decide to forward the packet anyway you want based on the supported OpenFlow actions. A very simple but powerful modification you can do, is to duplicate all the traffic of the switch out a specific port. This is very useful for application and network analysis. You can imagine that at the port where you duplicate traffic you connect a device that does analysis. Our hosts are VMs so we are going
    143 to verify the duplication by doing a `tcpdump`  on the port on the ovs switch.
     143In the above example we ran a very simple controller. The power of OpenFlow comes from the fact that you can decide to forward the packet anyway you want based on the supported OpenFlow actions. A very simple but powerful modification you can do, is to duplicate all the traffic of the switch out a specific port. This is very useful for application and network analysis. You can imagine that at the port where you duplicate traffic you connect a device that does analysis. Our hosts are VMs so we are going to verify the duplication by doing a `tcpdump`  on the port on the OVS switch.
    144144
    145145  1. Open two new terminals to the OVS switch.
     
    155155  }}}
    156156
    157   2. There you would see two files :
     157  2. There you would see two files:
     158
    158159     i. myDuplicateTraffic.py : this is the file that has instructions about how to complete the missing information, go ahead and try to implement your first controller.
    159160     ii. !DuplicateTraffic.py : this has the actual solution you can just run this if you don't want to bother with writing a controller.