Changes between Version 30 and Version 31 of HowTo/ConfigureOVSWithLayer3Routing


Ignore:
Timestamp:
08/28/14 09:25:21 (5 years ago)
Author:
zwang@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowTo/ConfigureOVSWithLayer3Routing

    v30 v31  
    3939}}}
    4040
    41 4.Verify the configurations by:
     414. Verify the configurations by:
    4242{{{
    4343sudo ovs-ofctl show OVSbr1
     
    5353See the output [wiki:HowTo/ConfigureOVSWithLayer3Routing/outputs#ovs-vsctlshow here].
    5454
    55 Now login into `host1` amd try to `ping` `host2`.
     555. Now login into `host1` amd try to `ping` `host2`.
    5656{{{
    5757ping 10.10.11.2
     
    5959The `ping` should not work.
    6060
    61 5. Assign the IP addresses to the OVS bridges, and add routing entries.
     616. Assign the IP addresses to the OVS bridges, and add routing entries.
    6262{{{
    6363sudo ifconfig OVSbr1 10.10.10.1/24 up
     
    7979}}}
    8080
    81 Check the flow table of each bridges.
     817. Check the flow table of each bridges.
    8282{{{
    8383sudo ovs-ofctl dump-flows OVSbr1
     
    9090}}}
    9191
    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.
     928. 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.
    9393
    9494Let's do an example of how a packet would traverse our network from 10.10.10.2 to 10.10.11.2.
     
    9696`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.
    9797
    98 7. If you want to insert these flows with OVS itself, you can do something like the following:
     989. If you want to insert these flows with OVS itself, you can do something like the following:
    9999{{{
    100100sudo ovs-ofctl add-flow OVSbr1 in_port=port_number_of_eth1,actions=LOCAL
     
    109109According to the output [wiki:HowTo/ConfigureOVSWithLayer3Routing/outputs#ovs-ofctlshowOVSbr1 here], the port number of `eth1` is 1.
    110110
    111 Now, if you check the flow table, for each of them you should see:
     11110. Now, if you check the flow table, for each of them you should see:
    112112{{{
    113113NXST_FLOW reply (xid=0x4):
     
    117117}}}
    118118
    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.
     11911. 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.
    120120Remember to set your controller to all OVS bridges you want to control:
    121121{{{
     
    124124}}}
    125125
    126 9. Apart from these, remember to verify IP forwarding is enabled:
     12612. Apart from these, remember to verify IP forwarding is enabled:
    127127{{{
    128128cat /proc/sys/net/ipv4/ip_forward
     
    130130}}}
    131131
    132 10. Now you should be able to ping each other between `host1` and `host2`.
     13213. Now you should be able to ping each other between `host1` and `host2`.
    133133{{{
    134134ping 10.10.11.2