LAG

Link Aggregation (LAG) allows to aggregate multiple network interfaces into a single logical “bonded” interface. It can provide an active backup service assisted with LACP (802.3ad) or a load balancing to increase the bandwidth.

Multiple modes are available for load balancing: round-robin, XOR on MAC address.

Multiple policies are available to select which part of the packet header will be used to compute the hash: L2, L3, L4, mix of L2 and L3, mix of L3 and L4, using either the outer or the most inner packet in case of encapsulation.

By default, the MII link monitoring is enabled and set to 100 ms. Disabling the MII link monitoring (setting its value to 0) is not recommended, if no monitoring alternative is chosen. The link detection and failure can cause poor performance.

running running config# vrf main interface lag lag1
ubuntu1804hwe running lag lag1#! show config
  lag lag1
      ipv4
          enabled true
          ..
      enabled true
      ipv6
          enabled true
          ..
      mii-link-monitoring 100
      arp-interval 0
      ..

An alternative to MII link monitoring is the ARP monitoring. Between 1 and 16 IP targets need to be configured which correspond to the addresses for which the regular generated traffic is issued. ARP monitoring is disabled by default (arp-interval= 0 in the above example). To configure ARP monitoring, we must first disable MII link monitoring.

To configure a LAG, enter the context interface type lag from the VRF in which you plan to define the LAG interface.

running running config# vrf main interface lag lag1
ubuntu1804hwe running lag lag1#! mode round-robin
ubuntu1804hwe running lag lag1#! mii-link-monitoring 0
ubuntu1804hwe running lag lag1#! arp-interval 10000
ubuntu1804hwe running lag lag1#! arp-ip-target 1.1.1.1
ubuntu1804hwe running lag lag1#! arp-ip-target 1.1.1.2
ubuntu1804hwe running lag lag1#! show config
lag lag1
    ipv4
        enabled true
        ..
    enabled true
    ipv6
        enabled true
        ..
    mode round-robin
    mii-link-monitoring 0
    arp-interval 10000
    arp-ip-target 1.1.1.1
    arp-ip-target 1.1.1.2
    ..
ubuntu1804hwe running lag lag1#! commit
Configuration committed.

Here is an example of lag named lag0 in VRF main, using lacp mode with a hash on L2+L3 header and a slow rate using two interfaces eth0 and eth1.

running vrf main# interface lag lag0
running vrf main# mode lacp xmit-hash-policy layer2+3 lacp-rate slow
running lag lag0# link-interface eth0
running lag lag0# link-interface eth1
running lag lag0# commit

The lag interface is configured provided eth0 and eth1 are present in VRF main.

Let’s fetch the state after committing this configuration:

running vrf main# interface lag lag0
running lag lag0# show state
lag lag0
    mii-link-monitoring 100
    mode lacp
    xmit-hash-policy layer2+3
    mtu 1500
    lacp-rate slow
    oper-status DOWN
    link-interface eth0
    link-interface eth1
    enabled true
    ethernet
        mac-address f2:a2:6c:f2:9e:e4
        ..
    counters
        in-octets 0
        in-discards 0
        in-errors 0
        out-octets 0
        in-unicast-pkts 0
        out-errors 0
        out-discards 0
        out-unicast-pkts 0
        ..
    ..

The same configuration can be made using this NETCONF XML configuration:

vsr> show xml absolute config vrf main interface lag lag0
<config xmlns="urn:6wind:vrouter">
  <vrf>
    <name>main</name>
    <interface xmlns="urn:6wind:vrouter/interface">
      <lag xmlns="urn:6wind:vrouter/lag">
        <name>lag0</name>
        <enabled>true</enabled>
        <link-interface>
          <slave>eth0</slave>
        </link-interface>
        <link-interface>
          <slave>eth1</slave>
        </link-interface>
        <ipv4>
          <enabled>true</enabled>
        </ipv4>
        <ipv6>
          <enabled>true</enabled>
        </ipv6>
        <mii-link-monitoring>100</mii-link-monitoring>
        <mode>lacp</mode>
        <xmit-hash-policy>layer2+3</xmit-hash-policy>
        <lacp-rate>slow</lacp-rate>
      </lag>
    </interface>
  </vrf>
</config>

See also

The command reference for details.