198 | | |
199 | | The following are the flow configurations applied to the first (trunked) setup. |
200 | | {{{ |
201 | | switch 00:00:00:00:00:10:10:10 |
202 | | |
203 | | #strip tag from any incoming traffic on port 1 |
204 | | flow-entry port1 |
| 198 | This method is probably the most involved and difficult to get right, although in theory would be the best since you would get the programmatic flexibility of the OVS switch and the speed of a hardware-implemented device. |
| 199 | |
| 200 | Assuming that you already have NetFPGA drivers installed, no special configurations are needed for the NetFPGA, save the !OpenFlow-switch bitfile. The typical flow rules also do not apply to the NetFPGA e.g. default flow modules on NOX that work with OVS will break under the NetFPGA. Therefore extra flows must be added to compensate. |
| 201 | |
| 202 | The easiest manner to control the NetFPGA is via the BSN controller. The following two flow entries needed to be added to the controller in order for the client-nodes to be able to ping each other across the NetFPGA. |
| 203 | {{{ |
| 204 | flow-entry vlan111-ip |
208 | | actions strip-vlan,output=4 |
209 | | |
210 | | #re-apply VLAN 222 tag to ARP packets bound for port 4, from 1 |
211 | | flow-entry port1-2 |
212 | | active False |
213 | | ingress-port 1 |
214 | | ether-type 2054 |
215 | | actions set-vlan-id=222,output=4 |
216 | | |
217 | | #re-apply tag to IP packets bound for 192.168.1.4 |
218 | | flow-entry port1-3 |
219 | | active False |
220 | | ether-type 2048 |
221 | | src-ip 192.168.1.1 |
222 | | actions set-vlan-id=222,output=4 |
223 | | |
224 | | #re-apply VLAN 111 tag to ARP packets bound for port 1, from 4 |
225 | | flow-entry port2-2 |
226 | | active False |
227 | | ingress-port 4 |
228 | | ether-type 2054 |
229 | | actions set-vlan-id=111,output=1 |
230 | | |
231 | | #re-apply tag to IP packets bound for 192.168.1.1 |
232 | | flow-entry port2-3 |
233 | | active False |
234 | | ether-type 2048 |
235 | | src-ip 192.168.1.4 |
236 | | actions set-vlan-id=111,output=1 |
237 | | |
238 | | #strip tag from any incoming traffic on port 4 |
239 | | flow-entry port4 |
| 208 | actions set-vlan-id=222,output=all |
| 209 | flow-entry vlan222-ip |
243 | | actions strip-vlan,output=1 |
244 | | ! |
245 | | }}} |
| 213 | actions set-vlan-id=111,output=all |
| 214 | }}} |
| 215 | This set of flows basically implements VLAN stitching based on source MAC address. Unlike in the Linux bridge, one cannot see the VLAN-stripped packets on the virtual interface (tap0 on the NFPGA, br0 on bridge); they will already have the proper tag, since the processing is probably occurring in the FPGA and not in the kernel. |
| 216 | |
| 217 | = III Morals of the story = |
| 218 | For quick setup of a network toppology using nodes sharing a medium, point-to-point links should be defined at as low a layer as possible. The next best thing (that is even better because of its flexibility) to actually going in and connecting up the topology using cables is to carve up the shared switch into VLANs. This lets you restrict the broadcast domain however you want, without hard-wiring everything. |
| 219 | |
| 220 | As for !OpenFlow switching, OVS nodes controlled by a BSN controller is the flexible, least-hassle choice for this task. |