Tip

This is the documentation for the 20.08 version. Looking for the documentation of the latest version? Have a look here.

Bonding Interfaces

TNSR supports bonding multiple interfaces together for link aggregation and/or redundancy. Several bonding methods are supported, including Link Aggregation Control Protocol (LACP, 802.3ad). These types of interfaces may also be called LAG or LAGG on other platforms and switches.

Bond Configuration

A bond instance has two main components on TNSR: The bond itself, and the interfaces which are a member of the bond. Beyond that, the device to which the bonded interfaces connect, typically a switch, must also support the same bonding protocol and it must also have ports with an appropriately matching configuration.

Warning

Bonds may only be created between hardware interfaces. Virtual interfaces such as Tap interfaces, loopback interfaces, subinterfaces, and other bond interfaces cannot be added to a bond.

Creating a bond

The interface bond <instance> command in config mode enters config-bond mode. An instance number, such as 0, must be manually specified to create a new bond interface.

config-bond mode contains the following commands:

load-balance (l2|l23|l34):

Configures the load balancing hash for the bonded interface. This setting determines how traffic will be balanced between ports. Traffic matching a single source and destination pair for the configured hash value will flow over a single link. Using higher level hashing will balance loads more evenly in the majority of cases, depending on the environment, but requires additional resources to handle.

This load-balance configuration is only available in lacp and xor modes.

This should be set to match the switch configuration for the ports.

l2:

Layer 2 (MAC address) hashing only. Any traffic to/from a specific pair of MAC addresses will flow over a single link. This method is the most common, and may be the only method supported by the other end of the bonded link.

Note

If the bonded interface only transmits traffic to a single peer, such as an upstream gateway, then all traffic will flow over a single link. The bond still has redundancy, but does not take advantage of load balancing.

l23:

Layer 2 (MAC address) and Layer 3 (IP address) hashing. For non-IP traffic, acts the same as l2.

l34:

Layer 3 (IP address) and Layer 4 (Port, when available) hashing. If no port information is present (or for fragments), acts the same as l23, and for non-IP traffic, acts the same as l2.

mode (round-robin|active-backup|xor|broadcast|lacp):
round-robin:

Load balances packets across all bonded interfaces by sending a packet out each interface sequentially. This does not require any cooperation from the peer, but can potentially lead to packets arriving at the peer out of order. This can only influence outgoing traffic, the behavior of return traffic is up to the peer.

active-backup:

Provides only redundancy. Uses a single interface of the bond, and will switch to another if the first interface fails. The switch can only see the MAC address of the active port.

xor:

Provides hashed load balancing of packet transmission. The transmit behavior is controlled by the load-balance option discussed previously. This mode is a step up from round-robin, but the behavior of return traffic is still up to the peer.

broadcast:

Provides only link redundancy by transmitting all packets on all links.

lacp:

Provides dynamic load balancing and redundancy using Link Aggregation Control Protocol (LACP, 802.3ad). In this mode, TNSR will negotiate an LACP link with an appropriately-configured switch, and monitors the links. This method is the most flexible and reliable, but requires active cooperation from a switch or suitable peer. The load balancing behavior can be controlled with the load-balance command discussed previously.

mac-address <mac-address>:

Optionally specifies a manually-configured MAC address to be used by all members of the bond, except in active-backup mode in which case it is only used by the active link.

Bond Interface Settings

Additionally, from within config-interface on an Ethernet interface, the following commands are available:

bond <instance> [long-timeout] [passive]:
instance:

The instance ID of the bond to which this interface will belong.

long-timeout:

Uses a 90-second timeout instead of the default timeout of 3 seconds when monitoring bonding peers, such as with LACP.

passive:

This interface will be a member of the bond but will not initiate LACP negotiations.

Bond Example

This example sets up a basic LACP bond between two interfaces. The first step is to create the bond instance:

tnsr(config)# interface bond 0
tnsr(config-bond)# load-balance l2
tnsr(config-bond)# mode lacp
tnsr(config-bond)# mac-address 00:08:a2:09:95:99
tnsr(config-bond)# exit

Next, decided which TNSR interfaces will be members of the bond, and configure them to be a part of the bond instance. In this case, the example uses GigabitEthernet0/14/2 and GigabitEthernet0/14/3:

tnsr(config)# int GigabitEthernet0/14/2
tnsr(config-interface)# bond 0
tnsr(config-interface)# enable
tnsr(config-interface)# exit
tnsr(config)# int GigabitEthernet0/14/3
tnsr(config-interface)# bond 0
tnsr(config-interface)# enable
tnsr(config-interface)# exit
tnsr(config)# exit

With that complete, TNSR will now have a new interface, BondEthernet0:

Interface: BondEthernet0
    Admin status: down
    Link up, unknown, unknown duplex
    Link MTU: 9216 bytes
    MAC address: 00:08:a2:09:95:99
    IPv4 Route Table: ipv4-VRF:0
    IPv6 Route Table: ipv6-VRF:0
    Slave interfaces:
        GigabitEthernet0/14/2
        GigabitEthernet0/14/3
    counters:
      received: 0 bytes, 0 packets, 0 errors
      transmitted: 0 bytes, 0 packets, 0 errors
      0 drops, 0 punts, 0 rx miss, 0 rx no buffer

Looking at the interfaces that are members of the bond, the BondEthernet0 membership is also reflected there:

Interface: GigabitEthernet0/14/2
    Admin status: up
    Link up, unknown, full duplex
    Link MTU: 9206 bytes
    MAC address: 00:08:a2:09:95:99
    IPv4 Route Table: ipv4-VRF:0
    IPv6 Route Table: ipv6-VRF:0
    Bond interface: BondEthernet0
    counters:
      received: 52575 bytes, 163 packets, 0 errors
      transmitted: 992 bytes, 8 packets, 19 errors
      31 drops, 0 punts, 0 rx miss, 0 rx no buffer

Interface: GigabitEthernet0/14/3
    Admin status: up
    Link up, unknown, full duplex
    Link MTU: 9206 bytes
    MAC address: 00:08:a2:09:95:99
    IPv4 Route Table: ipv4-VRF:0
    IPv6 Route Table: ipv6-VRF:0
    Bond interface: BondEthernet0
    counters:
      received: 4006 bytes, 37 packets, 0 errors
      transmitted: 620 bytes, 5 packets, 13 errors
      20 drops, 0 punts, 0 rx miss, 0 rx no buffer

A configuration can now be applied to BondEthernet0:

tnsr(config)# interface BondEthernet0
tnsr(config-interface)# ip address 10.2.3.1/24
tnsr(config-interface)# enable
tnsr(config-interface)# exit
tnsr(config)# exit

Finally, look at the completed interface configuration:

tnsr# show interface BondEthernet0

Interface: BondEthernet0
    Admin status: up
    Link up, unknown, unknown duplex
    Link MTU: 9216 bytes
    MAC address: 00:08:a2:09:95:99
    IPv4 Route Table: ipv4-VRF:0
    IPv4 addresses:
        10.2.3.1/24
    IPv6 Route Table: ipv6-VRF:0
    Slave interfaces:
        GigabitEthernet0/14/2
        GigabitEthernet0/14/3
    counters:
      received: 0 bytes, 0 packets, 0 errors
      transmitted: 806 bytes, 9 packets, 0 errors
      2366 drops, 0 punts, 0 rx miss, 9 rx no buffer

For information on the LACP state, use show interface lacp:

tnsr# show interface lacp
Interface name: GigabitEthernet0/14/2
    Bond name: BondEthernet0
    RX-state: CURRENT
    TX-state: TRANSMIT
    MUX-state: COLLECTING_DISTRIBUTING
    PTX-state: PERIODIC_TX

Interface name: GigabitEthernet0/14/3
    Bond name: BondEthernet0
    RX-state: CURRENT
    TX-state: TRANSMIT
    MUX-state: COLLECTING_DISTRIBUTING
    PTX-state: PERIODIC_TX

Bond Status

To view the bond configuration, use show interface bond. This will show the configured bond parameters and other information that does not appear on the interface output:

tnsr# show interface bond
Interface name: BondEthernet0
    Mode: lacp
    Load balance: l2
    Active slaves: 2
    Slaves: 2
    Slave interfaces:
        GigabitEthernet0/14/2
        GigabitEthernet0/14/3

To view the bonding status of all interfaces, use show interface bonding:

tnsr# show interface bonding

Interface: BondEthernet0
    Admin status: up
    Slave interfaces:
        GigabitEthernet0/14/2
        GigabitEthernet0/14/3

Interface: GigabitEthernet0/14/0
    Description: Uplink
    Admin status: up

Interface: GigabitEthernet0/14/1
    Admin status: down

Interface: GigabitEthernet0/14/2
    Admin status: up
    Bond interface: BondEthernet0

Interface: GigabitEthernet0/14/3
    Admin status: up
    Bond interface: BondEthernet0

Interface: GigabitEthernet3/0/0
    Description: Local Network
    Admin status: up

To view the LACP status, use show interface lacp [interface name]:

tnsr# show interface lacp
Interface name: GigabitEthernet0/14/2
    Bond name: BondEthernet0
    RX-state: CURRENT
    TX-state: TRANSMIT
    MUX-state: COLLECTING_DISTRIBUTING
    PTX-state: PERIODIC_TX

Interface name: GigabitEthernet0/14/3
    Bond name: BondEthernet0
    RX-state: CURRENT
    TX-state: TRANSMIT
    MUX-state: COLLECTING_DISTRIBUTING
    PTX-state: PERIODIC_TX