Usage

We will configure a fast path and a virtual bridge between two physical ports as follows:

../../../_images/aafig-a2f3abac71798a657c8daefcb67b191a37812e82.svg

Note

The output is from a Fedora Core 20 machine.

  1. Configure and start the fast path.

  2. Start the Linux synchronization.

  3. Start the Open vSwitch control plane:

    # /etc/init.d/openvswitch-switch stop
    # /etc/init.d/openvswitch-switch start
    
  4. Set the interfaces up and in promiscuous mode:

    # ip link set eth0 up
    # ip link set eth0 promisc on
    # ip link set eth1 up
    # ip link set eth1 promisc on
    # ip link set br0 up
    

    Note

    Setting promiscuous mode on the interfaces is needed only if adding the port in a bridge does not trigger a netlink promiscuous notification. It has to be done before adding the port to the bridge.

  5. Configure a bridge between two ports:

    # ovs-vsctl add-br br0
    # ovs-vsctl add-port br0 eth0
    # ovs-vsctl add-port br0 eth1
    

    Note

    Depending on your kernel version, a dmesg warning may appear when adding a bridge:

    openvswitch: netlink: Key attribute has unexpected length (type=62, length=4, expected=0)
    

    This is an expected behavior and does not prevent Open vSwitch from working correctly. It is due to an attempt of ovs-vswitchd to detect the kernel’s supported features.

  6. [Optional] Add an OpenFlow controller:

    # ovs-vsctl set-controller br0 tcp:192.168.0.27:6633
    

The two physical ports eth0 and eth1 can now communicate via a fast path and the virtual bridge br0.

See also