This section contains a summary of the Gaia CLI commands that configure Link Aggregation.
Included Topics |
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}]}]
{<bondID> | show bonding group
}groups
Parameters
Parameter |
Description |
---|---|
bondID |
ID of bond, an integer between 1 and 1024 |
IFName |
Name of interface to add to the bond |
|
Name of primary interface in the bond |
|
Frequency that the system polls the Media Independent Interface (MII) to get status |
|
Waiting time to confirm the interface status before taking the specified action (0-5000 ms, default = 200 ms) |
|
|
|
Link Aggregation Control Protocol packet transmission rate:
|
|
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
To add a new bond interface:
<bondIDadd bonding group
>
Example:
add bonding group 777
To delete a bond interface:
delete bonding group <
bondID>
Define how slave interfaces are activated in a bond interface:
round-robin
(default) - Bond uses all slave interfaces sequentially by their ID (High Availability + Load Sharing)active-backup
- Bond uses one slave interface at a time (High Availability)xor
- Bond uses slave interfaces based on a hash function (High Availability + Load Sharing) You can set the LACP packet transmission rate for xor mode or 8023AD mode.
After you set one of these Load Sharing modes, enter this option:
{lacp-rate
| slow
}fast
where
is every thirty seconds, and slow
is every one second.fast
8023AD
- Link Aggregation Control Protocol load shares traffic by dynamic interface activation, with full interface monitoring between the gateway and the switch. In this mode only, you can set the algorithm for interface selection, according to the specified TCP/IP layer: :xmit-hsh-policy
{layer2
| layer3+4
}To define the bond operating mode:
BondIDset bonding group <
mode> mode <
option> [
]
Example:
set bonding group 777 mode xor xmit-hash-policy layer3+4
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.
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
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:
<bondIDset bonding group
<ms> mii-interval
>
Example:
set bonding group 777 mii-interval 500
To disable monitoring:
bondIDset bonding group <
> mii-interval 0
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
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
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 |