Print Download PDF Send Feedback

Previous

Next

Gaia CLI Reference

This section contains a summary of the Gaia CLI commands that configure Link Aggregation.

Included Topics

Link Aggregation (Bonding)

Creating or Deleting a Bond Interface

Defining the Bond Operating Mode

Defining Interfaces

Defining the Primary Slave Interface

Defining the Monitoring Interval

Defining the Up Delay and Down Delay Times

Defining Load Sharing Parameters

Making Sure that Link Aggregation is Working

Link Aggregation (Bonding)

This section is a quick reference for Link Aggregation commands. The next sections include procedures for different tasks, including explanations of the configuration options.

Use these commands to configure link aggregation.

Syntax:

{add | delete} bonding group <bondID> interface <IFName>

set bonding [group <bondID>] [primary <IFName>] [mii-interval <ms>] [up-delay <ms> | down-delay <ms>] [mode {round-robin | active-backup | xor [xmit-hash-policy {layer2 | layer3+4}]| 8023AD [lacp-rate {slow | fast}]}]

show bonding group {<bondID> | groups}

Parameters

Parameter

Description

bondID

ID of bond, an integer between 1 and 1024

IFName

Name of interface to add to the bond

primary

Name of primary interface in the bond

mii-interval

Frequency that the system polls the Media Independent Interface (MII) to get status

up-delay
down-delay

Waiting time to confirm the interface status before taking the specified action (0-5000 ms, default = 200 ms)

mode

Bond operating mode

lacp-rate

Link Aggregation Control Protocol packet transmission rate:

  • slow - LACPDU packet sent every 30 seconds
  • fast - LACPDU packet sent every second

xmit-hash-policy

Algorithm for interface selected by TCP/IP layer

Example

set bonding group 666 20 eth2

show bonding groups

Output

Bonding Interface: 20

Bond Configuration

xmit_hash_policy Not configured

down-delay 200

primary Not configured

mode round-robin

up-delay 200

mii-interval 100

lacp_rate Not configured

Bond Interfaces

eth2

eth3

Creating or Deleting a Bond Interface

To add a new bond interface:

add bonding group <bondID>

Example:

add bonding group 777

To delete a bond interface:

  1. Remove all interfaces from the bond.
  2. Run: delete bonding group <bondID>

Defining the Bond Operating Mode

Define how slave interfaces are activated in a bond interface:

To define the bond operating mode:

set bonding group <BondID> mode <mode> [option]

Example:

set bonding group 777 mode xor xmit-hash-policy layer3+4

Defining Interfaces

A bond interface typically contains between two and eight slave interfaces. This section shows how to add and remove a slave interface. The slave interface must not have IP addresses assigned to it.

To add a slave interface to a bond:

add bonding group <bondID> interface <IF_Name>

Example:

add bonding group 777 interface eth4

Note - Do not change the bond state manually. This is done automatically by the bonding driver.

To delete a slave interface from a bond:

delete bonding group <bondID> interface <IF_Name>

Example:

delete bonding group 777 interface eth4

Note - You must delete all non-primary slave interfaces before you remove the primary slave interface.

Defining the Primary Slave Interface

With the Active-Backup operating mode, the system automatically fails over to the primary slave interface, if available. If the primary interface is not available, the system fails over to a different slave interface. By default, the first slave interface that you define is the primary interface. You must define the slave interfaces and set the operating mode as Active-Backup before doing this procedure.

Note - You must delete all non-primary slave interfaces before you remove the primary slave interface.

To define the primary slave interface:

set bonding group <bondID> mode active-backup primary <IF_Name>

Example

add bonding group 777 interface eth4

set bonding group 777 mode active-backup primary eth4

Defining the Monitoring Interval

This configures how much time to wait between checking each slave interface for link-failure. The valid range is 1-5000 ms. The default is 100 ms.

To configure the monitoring interval:

set bonding group <bondID> mii-interval <ms>

Example:

set bonding group 777 mii-interval 500

To disable monitoring:

set bonding group <bondID> mii-interval 0

Defining the Up Delay and Down Delay Times

This parameter defines the waiting time, in milliseconds, to confirm the slave interface status before taking the specified action. Valid values are 0 to 5000 ms. The default is 200 ms.

To configure the UP and Down delay times:

set bonding group <bondID> down-delay <ms>

set bonding group <bondID> up-delay <ms>

Example:

set bonding group 777 down-delay 500

Defining Load Sharing Parameters

When using Load Sharing modes (XOR or 802.3ad), you can configure these parameters:

To set the LACP rate:

set bonding group <bondID> lacp-rate {slow | fast}

Example: set bonding group 777 mode 8023AD lacp-rate slow

To set the Transmit Hash Policy:

set bonding group <bondID> xmit-hash-policy <layer>

Example: set bonding group 777 mode xor xmit-hash-policy layer2

Making Sure that Link Aggregation is Working

To make sure that a Link Aggregation is working for a bond interface, run this command in expert mode:

cat /proc/net/bonding/<bondID>

Example with output:

cat /proc/net/bonding/bond666

Ethernet Channel Bonding Driver: v3.2.4 (January 28, 2008)

 

Bonding Mode: fault-tolerance (active-backup)

Primary Slave: None

Currently Active Slave: eth2

MII Status: up

MII Polling Interval (ms): 100

Up Delay (ms): 100

Down Delay (ms): 200

 

Slave Interface: eth2

MII Status: up

Link Failure Count: 2

Permanent HW addr: 00:50:56:94:11:de