Description

This article describes how to configure the bond and bridge interfaces on Ubuntu 14.04 LTS for a Contrail Cloud installation.

Symptoms

For link redundancy in a production Contrail installation, bond interfaces are highly recommended. Additionally, bridge interfaces are required for underlay connectivity in Contrail Cloud in order for QEMU/KVM virtual machines to communicate with networks/hosts external to the SDN.  The steps below demonstrate how to configure a bridge over two bonded NIC interfaces for use with Contrail Cloud and QEMU/KVM, and how to configure the associated aggregated-ethernet (ae) interfaces on Junos EX/QFX switches using 802.3ad (LACP).

Solution

 

  1. Switch configuration:

    # set chassis aggregated-devices ethernet device-count <number>
    <-- (This will be a number between 1 and 111.)
    # set interfaces ae0 aggregated-ether-options link-speed 1g
    # set interfaces ae0 aggregated-ether-options lacp active
    # set interfaces ae0 aggregated-ether-options lacp periodic fast
    # set interfaces ae0 unit 0 family ethernet-switching vlan members <vlan id>

    # set interfaces ge-0/0/1 ether-options 802.3ad ae0 <-- (Using 'ae0' for this example. Use the next available ae interface number.)
    # set interfaces ge-0/0/2 ether-options 802.3ad ae0

  • Enable NIC bonding on server:

                apt-get install ifenslave
    modprobe bonding

    Edit the /etc/modules file:
    -- add module entry 'bonding'  at the bottom (this will ensure that the bonding module is loaded at boot time)

    *Reboot*

    Verify that the bonding module loaded:     lsmod | grep bonding

  • Edit /etc/network/interfaces to reconfigure the interfaces as a bond (sample configuration shows two interfaces in the bond using 802.3ad):

    auto bond0
    iface bond0 inet manual
    bond-mode 802.3ad
    bond-miimon 100
    bond-lacp-rate 1
    bond-slaves em1 em2

    auto em1
    iface em1 inet manual
    bond-master bond0

    auto em2
    iface em2 inet manual
    bond-master bond0


    (Note: 'em1' and 'em2' are BIOS-specific naming conventions for NICs. Substitute the specific name of the server manufacturers' NICs as required.)

  • Add bridge configuration to /etc/network interfaces:

    auto br0
    iface br0 inet static
    address 10.85.23.3
    netmask 255.255.255.0
    network 10.85.23.0
    broadcast 10.85.23.255
    gateway 10.85.23.1
    bridge_ports bond0
    bridge_stp off
    bridge_fd 9
    bridge_hello 2
    bridge_maxage 12

  • Reboot.

  • Issue command 'brctl show' to verify that the bridge interface is up:

    bridge name     bridge id               STP     enabled interfaces
    br0             8000.9457a55bed15       no      bond0

    The output shown reflects that the bridge is configured over the bond interface.