Changes between Version 54 and Version 55 of GENIExperimenter/Tutorials/OpenFlowOVS/DesignSetup


Ignore:
Timestamp:
07/10/15 06:32:55 (9 years ago)
Author:
nriga@bbn.com
Comment:

--

Legend:

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

    v54 v55  
    6262
    6363Although OVS is installed and initialized on the host that is meant to act as a software switch, it has not been configured yet.
    64 There are two main things that need to be configured: ''(1) configure your software switch with the interfaces as ports'' and '' (2) point the switch to an !OpenFlow controller''.
     64There are two main things that need to be configured: [[BR]]
     65  ''(1)  configure your software switch with the interfaces as ports'' and [[BR]]  '' (2) point the switch to an !OpenFlow controller''.
    6566
    66 In order to configure the OVS switch, we first login to the host that will be used as an !OpenFlow switch.
    67 
    68 Depending on which tool and OS you are using there is a slightly different process for logging in. If you don't know how to SSH to your reserved hosts learn [wiki:HowTo/LoginToNodes how to login.]
     67At different steps of the tutorial you will need to login to various hosts. Depending on which tool and OS you are using there is a slightly different process for logging in. If you don't know how to SSH to your reserved hosts learn [wiki:HowTo/LoginToNodes how to login.]
    6968
    7069=== 2a. Configure  the Software Switch (OVS Window) ===
    7170
    72 First we need to create an Ethernet bridge that will act as our software switch:
     71 i. Login to the OVS host
     72 ii. Create an Ethernet bridge that will act as our software switch:
    7373{{{
    7474sudo ovs-vsctl add-br br0
     75}}}
     76 iii. Prepare the interfaces to be added as ports to the OVS switch
     77   * Your OVS bridge will be a Layer 2 switch and your ports do not need IP addresses. Before we remove them let's keep some information
     78     * Run  {{{ ifconfig }}}
     79     * Write down the interface names that correspond to the connections to your hosts. The correspondence is
     80       * Interface with IP ''10.10.1.11'' to host1  - ethX
     81       * Interface with IP ''10.10.1.12'' to host2 - ethY
     82       *  Interface with IP ''10.10.1.13'' to host3 - ethZ
     83    * Remove the IP from your data interfaces. Be careful '''not to bring down eth0'''. This is the control interface, if you bring that interface down you ''' won't be able to login''' to your host. For all interfaces other than `eth0` and ` l0` (your interface names may vary) run :
     84    {{{
     85sudo ifconfig ethX 0 
     86sudo ifconfig ethY 0
     87sudo ifconfig ethZ 0
     88  }}}
     89 iv. Add all the data interfaces to your switch (bridge). Be careful ''' not to add interface eth0'''. This is the control interface. The other three interfaces are your data interfaces. (Use the same interfaces as you used in the previous step.)
     90 {{{
     91 sudo  ovs-vsctl add-port br0 ethX
     92 sudo  ovs-vsctl add-port br0 ethY
     93 sudo  ovs-vsctl add-port br0 ethZ
    7594}}}
    76  
    77 Now we need to add the interfaces to this bridge that will act as the ports of the software switch.
    78 
    79 {{{
    80 #!html
    81 <table border="0">
    82       <tr >
    83        <td width = "500">
    84          <ol>
    85            <li>List all the interfaces of the node
    86             <ul> <li> <code>ifconfig</code> </ul><br/>
    87             Write down the interface names that correspond to the connections to your hosts. This information will be needed for one of the exercises. The correspondence is:
    88             <ul>
    89                 <li> Interface with IP ''10.10.1.11'' to host1  - ethX</li>
    90                 <li> Interface with IP ''10.10.1.12'' to host2 - ethY</li>
    91                 <li> Interface with IP ''10.10.1.13'' to host3 - ethZ</li>
    92            </ul></li>
    93            </li> <br/>
    94            <li> Be careful <b> not to bring down eth0</b>. This is the control interface, if you bring that interface down you <b> won't be able to login</b> to your host. For all interfaces other than <code>eth0</code> and <code> l0</code>, remove the IP from the interfaces (your interface names may vary): <br/>
    95                               <ul><li> <code> sudo ifconfig ethX 0 </code> </li></ul>
    96                               <ul><li> <code> sudo ifconfig ethY 0 </code> </li></ul>
    97                               <ul><li> <code> sudo ifconfig ethZ 0 </code> </li></ul>
    98              <li> Add all the data interfaces to your switch (bridge):Be careful <b> not to add interface eth0</b>. This is the control interface. The other three interfaces are your data interfaces. (Use the same interfaces as you used in the previous step.)
    99                 <ul><li> <code> sudo  ovs-vsctl add-port br0 ethX </code> </li></ul>
    100                 <ul><li> <code> sudo  ovs-vsctl add-port br0 ethY </code> </li></ul>
    101                 <ul><li> <code> sudo  ovs-vsctl add-port br0 ethZ </code> </li></ul>
    102              </li>
    103           </ol>
    104        </td>
    105         <td>
    106         <img border="0" src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/OpenflowOVS/Graphics/ovs-interfaces.jpg?format=raw" alt="Login information for a VM"  height="250" title="Login information for a VM" /> </a>
    107        </td>
    108     </tr>
    109  </table>
    110 }}}
    111  
    112 Congratulations! You have configured your software switch. To verify the three ports configured run:
    113 {{{
     95 v. Trust but verify. Congratulations! You have configured your software switch. To verify the three ports configured run:
     96 {{{
    11497sudo ovs-vsctl list-ports br0
    11598}}}
     
    117100=== 2b. Point your switch to a controller ===
    118101
    119 In the controller window, find the control interface IP of your controller, use ''ifconfig'' and note down the IP address of `eth0`.
    120 
    121 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.
    122 
    123 In order to point our software !OpenFlow switch to the controller, in the ''ovs'' window, run:
     102 i. Login to your controller
     103 ii.  Find the control interface IP of your controller, use ''ifconfig'' and note down the IP address of `eth0`.
     104   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.
     105 iii. In order to point our software !OpenFlow switch to the controller, in the ''ovs'' terminal window, run:
     106 {{{
     107sudo ovs-vsctl set-controller br0 tcp:<controller_ip>:6633
     108 }}}
     109 i. Set your switch to `fail-safe-mode`. For more info read the [#standalonevssecuremode standalone vs secure mode section].  Run:
    124110{{{
    125 sudo ovs-vsctl set-controller br0 tcp:<controller_ip>:6633
     111sudo ovs-vsctl set-fail-mode br0 secure
     112}}}
     113 vi. Trust but verify. You can verify your OVS settings by issuing the following:
     114 {{{
     115sudo ovs-vsctl show
    126116}}}
    127117
     
    132122  * `secure`: in this case only the controller is responsible for forwarding packets, and if the controller is down all packets are dropped.
    133123
    134 In OVS when the parameter is not set it falls back to the `standalone` mode. For the purpose of this tutorial we will set the `fail-safe-mode` to `secure`, since we want to be the ones controlling the forwarding. Run:
    135 {{{
    136 sudo ovs-vsctl set-fail-mode br0 secure
    137 }}}
    138 You can verify your OVS settings by issuing the following:
    139 
    140 {{{
    141 sudo ovs-vsctl show
    142 }}}
     124In OVS when the parameter is not set it falls back to the `standalone` mode. For the purpose of this tutorial we will set the `fail-safe-mode` to `secure`, since we want to be the ones controlling the forwarding.
     125 
    143126----
    144127= [wiki:GENIExperimenter/Tutorials/OpenFlowOVS Prev:  Introduction] =