| 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 | {{{ |
| 85 | sudo ifconfig ethX 0 |
| 86 | sudo ifconfig ethY 0 |
| 87 | sudo 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 |
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 | {{{ |
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 | {{{ |
| 107 | sudo 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: |