Changes between Version 30 and Version 31 of HowTo/ConfigureOVSWithLayer3Routing
- Timestamp:
- 08/28/14 09:25:21 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
HowTo/ConfigureOVSWithLayer3Routing
v30 v31 39 39 }}} 40 40 41 4. Verify the configurations by:41 4. Verify the configurations by: 42 42 {{{ 43 43 sudo ovs-ofctl show OVSbr1 … … 53 53 See the output [wiki:HowTo/ConfigureOVSWithLayer3Routing/outputs#ovs-vsctlshow here]. 54 54 55 Now login into `host1` amd try to `ping` `host2`.55 5. Now login into `host1` amd try to `ping` `host2`. 56 56 {{{ 57 57 ping 10.10.11.2 … … 59 59 The `ping` should not work. 60 60 61 5. Assign the IP addresses to the OVS bridges, and add routing entries.61 6. Assign the IP addresses to the OVS bridges, and add routing entries. 62 62 {{{ 63 63 sudo ifconfig OVSbr1 10.10.10.1/24 up … … 79 79 }}} 80 80 81 Check the flow table of each bridges.81 7. Check the flow table of each bridges. 82 82 {{{ 83 83 sudo ovs-ofctl dump-flows OVSbr1 … … 90 90 }}} 91 91 92 6. When an OVS bridge is installed in the Linux OS, it is wired such that any application packets or packets routed via Linux will be sent to the `LOCAL` port of the OVS bridge, assuming a route to that bridge exists. And, in the reverse direction, any packets sent out an OVS bridge's `LOCAL` port will be received by the local networking stack.92 8. When an OVS bridge is installed in the Linux OS, it is wired such that any application packets or packets routed via Linux will be sent to the `LOCAL` port of the OVS bridge, assuming a route to that bridge exists. And, in the reverse direction, any packets sent out an OVS bridge's `LOCAL` port will be received by the local networking stack. 93 93 94 94 Let's do an example of how a packet would traverse our network from 10.10.10.2 to 10.10.11.2. … … 96 96 `10.10.10.2` sends the packet with destination `10.10.11.2`. The packet arrives at `eth1`. There is an OpenFlow flow in place on `OVSbr1` between `eth1` and it's `LOCAL` port, so the packet will match this flow and be sent out the `LOCAL` port of `OVSbr1` (i.e. port `65534`). The packet is then received by the local machine's network stack. It has a destination IP of `10.10.11.2`, so the routing table we have established will send the packet to the `OVSbr2` network interface. `OVSbr2` will receive this packet from the local network stack via it's `LOCAL` port (i.e. port `65534`). There is an OpenFlow flow in place on `OVS2` between `OVS2`'s `LOCAL` port and `eth2`, so this packet will match that flow and be sent out through `eth2`. From there, it will arrive at `10.10.11.2`. The same process will occur in reverse. This assumes though that you insert the flows between the physical interfaces (`eth1` and `eth2`) and the OVS `LOCAL` ports. That's the key to handing packet to and receiving packets from the local OS. 97 97 98 7. If you want to insert these flows with OVS itself, you can do something like the following:98 9. If you want to insert these flows with OVS itself, you can do something like the following: 99 99 {{{ 100 100 sudo ovs-ofctl add-flow OVSbr1 in_port=port_number_of_eth1,actions=LOCAL … … 109 109 According to the output [wiki:HowTo/ConfigureOVSWithLayer3Routing/outputs#ovs-ofctlshowOVSbr1 here], the port number of `eth1` is 1. 110 110 111 Now, if you check the flow table, for each of them you should see:111 10. Now, if you check the flow table, for each of them you should see: 112 112 {{{ 113 113 NXST_FLOW reply (xid=0x4): … … 117 117 }}} 118 118 119 8. If you want to insert these flows via your controller, you will need to either specify port 65534 explicitly or use whatever convention your controller uses to specify the `LOCAL` port of a bridge.119 11. If you want to insert these flows via your controller, you will need to either specify port 65534 explicitly or use whatever convention your controller uses to specify the `LOCAL` port of a bridge. 120 120 Remember to set your controller to all OVS bridges you want to control: 121 121 {{{ … … 124 124 }}} 125 125 126 9. Apart from these, remember to verify IP forwarding is enabled:126 12. Apart from these, remember to verify IP forwarding is enabled: 127 127 {{{ 128 128 cat /proc/sys/net/ipv4/ip_forward … … 130 130 }}} 131 131 132 1 0. Now you should be able to ping each other between `host1` and `host2`.132 13. Now you should be able to ping each other between `host1` and `host2`. 133 133 {{{ 134 134 ping 10.10.11.2