Link aggregation means aggregating several
ports together to form an aggregation group, so as to implement
outgoing/incoming load sharing among the member ports in the group and to enhance
the connection reliability.
Depending on different aggregation modes, link
aggregation falls into three types: manual, static LACP, and dynamic LACP
aggregations. Depending on whether or not load sharing is implemented, aggregation
groups can be load-sharing or non-load-sharing aggregation groups.
For the member ports in an aggregation
group, their basic configuration must be the same. The basic configuration
includes STP, QoS, VLAN, port attributes and other associated settings.
l
STP configuration, including STP status (enabled
or disabled), link attribute (point-to-point or not), STP priority, path cost,
standard packet format, maximum packet transmission speed, loop prevention
status, root protection status, edge port or not.
l
QoS configuration, including traffic limit,
priority remarking, default 802.1p priority, bandwidth assurance, congestion
avoidance, traffic redirection, traffic statistics, and so on.
l
VLAN configuration, including permitted VLANs,
and default VLAN ID.
l
Port attribute configuration, including port
rate, duplex mode, and link type (Trunk, Hybrid or Access). The ports for a
manual or static aggregation group must have the same link type, and the ports
for a dynamic aggregation group must have the same rate, duplex mode and link
type.
The purpose of link aggregation control
protocol (LACP) is to implement dynamic link aggregation and deaggregation.
This protocol is based on IEEE802.3ad and uses LACPDUs (link aggregation
control protocol data unit) to interact with its peer.
After LACP is enabled on a port, LACP
notifies the following information of the port to its peer by sending LACPDUs:
priority and MAC address of this system, priority, number and operation key of
the port. Upon receiving the information, the peer compares the information
with the information of other ports on the peer device to determine the ports
that can be aggregated. In this way, the two parties can reach an agreement in
adding/removing the port to/from a dynamic aggregation group.
An operation key of an aggregation port is
a configuration combination generated by system depending on the configurations
of the port (rate, duplex mode, other basic configuration, and management key)
when the port is aggregated.
1)
The selected ports in a manual/static
aggregation group have the same operation key.
2)
The management key of an LACP-enabled static
aggregation port is equal to its aggregation group ID.
3)
The management key of an LACP-enabled dynamic
aggregation port is zero by default.
4)
The member ports in a dynamic aggregation group must
have the same operation key.
1.1.4 Manual Aggregation Group
I. Introduction to manual
aggregation group
A manual aggregation group is manually created.
All its member ports are manually added and can be manually removed (it
inhibits the system from automatically adding/removing ports to/from it). Each
manual aggregation group must contain at least one port. When a manual
aggregation group contains only one port, you cannot remove the port unless you
remove the whole aggregation group.
LACP is disabled on the member ports of
manual aggregation groups, and enabling LACP on such a port will not take
effect.
II. Port status in manual aggregation
group
A port in a manual aggregation group can be
in one of the two states: selected or unselected. In a manual aggregation
group, the selected ports can forward user service packets, but the unselected ports
cannot.
The selected port with the smallest port
number serves as the master port of the group, and other selected ports serve as
member ports of the group.
There is a limit on the number of selected
ports in an aggregation group. Therefore, if the number of the member ports
serving as selected ports in an aggregation group exceeds the maximum number
supported by the device, the system will choose the ports with lower port
numbers as the selected ports, and set others as unselected ports.
In a manual aggregation group, the system
sets the ports to selected or unselected state by the following rules:
l
The system sets the "most preferred"
ports (that is, the ports take most precedence over other ports) to selected
state, and others to unselected state. Port precedence descends in the
following order: full duplex/high speed, full duplex/low speed, half
duplex/high speed, half duplex/low speed.
l
The system sets the ports unable to aggregate
with the master port (due to some hardware limit, for example, cross-board
aggregation unavailability) to unselected state.
l
The system sets the ports with port attribute
configuration (rate, duplex mode, and link type) different from that of the master
port to unselected state.
III. Requirements on ports for
manual aggregation
Generally, there is no limit on the rate
and duplex mode of the ports (also including initially DOWN port) you want to
add to a manual aggregation group. After aggregation, the smallest-numbered
selected port is the master port of the aggregation group and the other
selected ports are the member ports of the aggregation group.
For an aggregation group:
l
When the rate or duplex mode of a port in the
aggregation group changes, packet loss may occur on this port;
l
When the rate of a port decreases, if the port
belongs to a manual or static LACP aggregation group, the port will be switched
to the unselected state; if the port belongs to a dynamic LACP aggregation
group, deaggregation will occur on the port.
1.1.5 Static LACP Aggregation Group
I. Introduction to static LACP
aggregation
A static LACP aggregation group is also manually
created. All its member ports are manually added and can be manually removed (it
inhibits the system from automatically adding/removing ports to/from it). Each static
aggregation group must contain at least one port. When a static aggregation
group contains only one port, you cannot remove the port unless you remove the
whole aggregation group.
LACP is enabled on the member ports of static
aggregation groups. When you remove a static aggregation group, the system will
remain the member ports of the group in LACP-enabled state and re-aggregate the
ports to form one or more dynamic LACP aggregation groups. You must not disable
LACP on static aggregation ports.
II. Port status of static
aggregation group
A port in a
static aggregation group can be in one of the two states: selected or
unselected. In a static aggregation group, both the selected and the unselected
ports can transceive LACP protocol packets; the selected ports can transceive
user service packets, but the unselected ports cannot.
In an aggregation
group, the selected port with the smallest port number serves as the master
port of the group, and other selected ports serve as member ports of the group.
In a static aggregation group, the system
sets the ports to selected or unselected state by the following rules:
l
The system sets the "most preferred"
ports (that is, the ports take most precedence over other ports) to selected
state, and others to unselected state. Port precedence descends in the
following order: full duplex/high speed, full duplex/low speed, half
duplex/high speed, half duplex/low speed.
l
The system sets the state of the following ports
to unselected: port connected to a peer device different from the one the
master port is connected to; port connected to the same peer device as the
master port but to a peer port that is not in the same aggregation group as the
peer port of the master port.
l
The system sets the ports unable to aggregate
with the master port (due to some hardware limit, for example, cross-board
aggregation unavailability) to unselected state.
l
The system sets the ports with basic port
configuration different from that of the master port to unselected state.
There is a limit on the number of selected
ports in an aggregation group. Therefore, if the number of the member ports that
serves as selected ports in an aggregation group exceeds the maximum number
supported by the device, the system will choose the ports with lower port
numbers as the selected ports, and set others as unselected ports.
I. Introduction to dynamic LACP
aggregation group
A dynamic LACP aggregation group is automatically
created and removed by the system. Users cannot add/remove ports to/from it. A
port can participate in dynamic link aggregation only when it is LACP-enabled. Ports
can be aggregated into a dynamic aggregation group only when they are connected
to the same peer device and have the same basic configuration (such as rate and
duplex mode).
Besides multiple-port aggregation groups, the
system is also able to create single-port aggregation groups, each of which
contains only one port. LACP is enabled on the member ports of dynamic
aggregation groups.
II. Port status of dynamic
aggregation group
A port in a dynamic aggregation group can
be in one of the two states: selected or unselected. In a dynamic aggregation
group, both the selected and the unselected ports can transceive LACP protocol
packets; the selected ports can transceive user service packets, but the
unselected ports cannot.
In an aggregation
group, the selected port with the smallest port number serves as the master
port of the group, and other selected ports serve as member ports of the group.
There is a limit on the number of selected
ports in an aggregation group. Therefore, if the number of the member ports that
can be set as selected ports in an aggregation group exceeds the maximum number
supported by the device, the system will negotiate with its peer end, to
determine the states of the member ports according to the port IDs of the preferred
device (that is, the device with smaller system ID). The following is the
negotiation procedure:
1)
Compare device IDs (system priority + system MAC
address) between the two parties. First compare the two system priorities, then
the two system MAC addresses if the system priorities are equal. The device
with smaller device ID will be considered as the preferred one.
2)
Compare port IDs (port priority + port number)
on the preferred device. The comparison between two port IDs is as follows:
First compare the two port priorities, then the two port numbers if the two
port priorities are equal; the port with the smallest port ID is the selected
port and the left ports are unselected ports.
III. Configuring system priority
LACP determines the selected and unselected
states of the dynamic aggregation group members according to the priority of the
port ID on the end with the preferred device ID.
The device ID consists of two-byte system
priority and six-byte system MAC address, that is, device ID = system priority
+ system MAC address.
When two device IDs are compared, the
system priorities are compared first, and the system MAC addresses are compared
when the system priorities are the same. The device with smaller device ID will
be considered as the preferred one.
Changing the system priority of a device may change the preferred
device between the two parties, and may further change the states (selected or
unselected) of the member ports of dynamic aggregation groups.
IV. Configuring port priority
LACP determines the selected and unselected
states of the dynamic aggregation group members according to the port IDs on
the device with the preferred device ID. When the number of members in an
aggregation group exceeds the number of selected ports supported by the device
in each group, LACP determines the selected and unselected states of the ports according
to the port IDs. The ports with superior port IDs will be set to selected state
and the ports with inferior port IDs will be set to unselected state.
The port ID consists of two-byte port
priority and two-byte port number, that is, port ID = port priority + port
number. When two port IDs are compared, the port priorities are compared first,
and the port numbers are compared if the port priorities are the same. The port
with smaller port ID is considered as the preferred one.
1.1.7 Aggregation Group Categories
Depending on whether or not load sharing is
implemented, aggregation groups can be load-sharing or non-load-sharing
aggregation groups. When load sharing is implemented,
l
For IP packets, the system will implement
load-sharing based on source IP address and destination IP address;
l
For non-IP packets, the system will implement
load-sharing based on source MAC address and destination MAC address.
In general, the system only provides
limited load-sharing aggregation resources (currently N/2 load-sharing
aggregation groups can be created at most, N is the number of ports), so the
system needs to reasonably allocate the resources among different aggregation
groups.
The system always allocates hardware
aggregation resources to the aggregation groups with higher priorities. When
load-sharing aggregation resources are used up by existing aggregation groups,
newly-created aggregation groups will be non-load-sharing ones.
Load-sharing aggregation resources are
allocated to aggregation groups in the following order:
l
An aggregation group containing special ports (such
as 10GE port) which require hardware aggregation resources has higher priority
than any aggregation group containing no special port.
l
A manual or static aggregation group has higher
priority than a dynamic aggregation group (unless the latter contains special
ports while the former does not).
l
For aggregation groups, the one that might gain higher
speed if resources were allocated to it has higher priority than others. If the
groups can gain the same speed, the one with smallest master port number has
higher priority than other groups.
When an aggregation group of higher priority
appears, the aggregation groups of lower priorities release their hardware
resources. For single-port aggregation groups, they can transceive packets
normally without occupying aggregation resources
Caution:
A load-sharing
aggregation group contains at least two selected ports, but a non-load-sharing
aggregation group can only have one selected port at most, while others are unselected
ports.
Caution:
l
The commands of link aggregation cannot be
configured with the commands of port loopback detection feature at the same
time.
l
The ports where the mac-address max-mac-count
command is configured cannot be added to an aggregation group. Contrarily, the mac-address
max-mac-count command cannot be configured on a port that has already been
added to an aggregation group.
l
MAC-authentication-enabled ports and
802.1x-enabled ports cannot be added to an aggregation group.
l
Mirroring destination ports and mirroring
reflector ports cannot be added to an aggregation group.
l
Ports configured with blackhole MAC addresses,
static MAC addresses or the static ARP protocol cannot be added to the
aggregation group.
l
Ports where the IP-MAC address binding is
configured cannot be added to an aggregation group.
l
Port-security-enabled ports cannot be added to an
aggregation group.
You can create a
manual aggregation group, or remove an existing manual aggregation group (after
that, all the member ports in the group are removed from the ports).
For a manual aggregation group, a port can
only be manually added/removed to/from the manual aggregation group.
Table 1-1 Configure a manual aggregation
group
|
Operation
|
Command
|
Description
|
|
Enter
system view
|
system-view
|
—
|
|
Create a manual aggregation group
|
link-aggregation group agg-id mode manual
|
Required
|
|
Configure a description for the aggregation
group
|
link-aggregation group agg-id description agg-name
|
Optional
By default, an aggregation group has no
description.
|
|
Enter Ethernet port view
|
interface interface-type interface-number
|
—
|
|
Add the Ethernet port to the aggregation
group
|
port
link-aggregation group agg-id
|
Required
|
Note that:
1)
When creating an aggregation group:
l
If the aggregation group you are creating
already exists but contains no port, its type will change to the type you set.
l
If the aggregation group you are creating
already exists and contains ports, the possible type changes may be: changing
from dynamic or static to manual, and changing from dynamic to static; and no
other kinds of type change can occur.
l
When you change a dynamic/static group to a
manual group, the system will automatically disable LACP on the member ports.
When you change a dynamic group to a static group, the system will remain the
member ports LACP-enabled.
2)
When a manual or static aggregation group
contains only one port, you cannot remove the port unless you remove the whole
aggregation group.
You can create a static LACP aggregation
group, or remove an existing static aggregation group (after that, the system
will re-aggregate the original member ports in the group to form one or more
dynamic aggregation groups.).
For a static aggregation group, a port can
only be manually added/removed to/from the static aggregation group.
When you add an
LACP-enabled port to a manual aggregation group, the system will automatically
disable LACP on the port. Similarly, when you add an LACP-disabled port to a
static aggregation group, the system will automatically enable LACP on the
port.
Table 1-2 Configure a static LACP
aggregation group
|
Operation
|
Command
|
Description
|
|
Enter system view
|
system-view
|
—
|
|
Create a static aggregation group
|
link-aggregation group agg-id mode static
|
Required
|
|
Configure a description for the
aggregation group
|
link-aggregation group agg-id description agg-name
|
Optional
By default, an aggregation group has no
description.
|
|
Enter Ethernet port view
|
interface interface-type interface-number
|
—
|
|
Add the
port to the aggregation group
|
port
link-aggregation group agg-id
|
Required
|
For a static LACP
aggregation group or a manual aggregation group, you are recommended not to
cross cables between the two devices at the two ends of the aggregation group.
For example, suppose port 1 of the local device is connected to port 2 of the
peer device. To avoid cross-connecting cables, do not connect port 2 of the
local device to port 1 of the peer device. Otherwise, packets may be lost.
A dynamic LACP aggregation group is
automatically created by the system based on LACP-enabled ports. The adding and
removing of ports to/from a dynamic aggregation group are automatically
accomplished by LACP.
You need to enable LACP on the ports which
you want to participate in dynamic aggregation of the system, because, only
when LACP is enabled on those ports at both ends, can the two parties reach
agreement in adding/removing ports to/from dynamic aggregation groups.
You cannot enable
LACP on a port which is already in a manual aggregation group.
Table 1-3 Configure a dynamic LACP
aggregation group
|
Operation
|
Command
|
Description
|
|
Enter
system view
|
system-view
|
—
|
|
Configure
a description for an aggregation group
|
link-aggregation group agg-id description agg-name
|
Optional
By
default, an aggregation group has no description.
|
|
Configure
the system priority
|
lacp system-priority system-priority
|
Optional
By
default, the system priority is 32,768.
|
|
Enter Ethernet port view
|
interface interface-type interface-number
|
—
|
|
Enable
LACP on the port
|
lacp
enable
|
Required
By
default, LACP is disabled on a port.
|
|
Configure the port priority
|
lacp port-priority port-priority
|
Optional
By default, the port priority is 32,768.
|
1.3 Displaying and Maintaining Link Aggregation Configuration
After the above configuration, execute the display
command in any view to display the running status after the link aggregation configuration
and verify your configuration. Execute the reset command in user view to
clear LACP statistics on ports.
Table 1-4 Display
and maintain link aggregation configuration
|
Operation
|
Command
|
Description
|
|
Display summary information of all
aggregation groups
|
display link-aggregation summary
|
You can execute the display
command in any view.
|
|
Display detailed information of a
specific aggregation group or all aggregation groups
|
display link-aggregation verbose [ agg-id ]
|
|
Display link aggregation details of a
specified port or port range
|
display link-aggregation interface interface-type interface-number [ to
interface-type interface-number ]
|
|
Display local device ID
|
display lacp system-id
|
|
Clear LACP statistics about a specified
port or port range
|
reset lacp statistics [ interface interface-type interface-number [ to
interface-type interface-number ] ]
|
Execute the reset command in user
view.
|
I. Network requirements
l
Switch A connects to Switch B with three ports
Ethernet1/0/1 to Ethernet1/0/3. It is required that incoming/outgoing load between
the two switches can be shared among the three ports.
l
Adopt three different aggregation modes to
implement link aggregation on the three ports between switch A and B.
II. Network diagram

Figure 1-1 Network diagram for link
aggregation configuration
III. Configuration procedure
The following only lists the configuration on
Switch A; you must perform the similar configuration on Switch B to implement
link aggregation.
1)
Adopting manual aggregation mode
# Create manual aggregation group 1.
<H3C> system-view
[H3C] link-aggregation group 1 mode
manual
# Add Ethernet1/0/1 through Ethernet1/0/3
to aggregation group 1.
[H3C] interface Ethernet1/0/1
[H3C-Ethernet1/0/1] port link-aggregation
group 1
[H3C-Ethernet1/0/1] interface
Ethernet1/0/2
[H3C-Ethernet1/0/2] port
link-aggregation group 1
[H3C-Ethernet1/0/2] interface
Ethernet1/0/3
[H3C-Ethernet1/0/3] port
link-aggregation group 1
2)
Adopting static LACP aggregation mode
# Create static aggregation group 1.
<H3C> system-view
[H3C] link-aggregation group 1 mode
static
# Add Ethernet1/0/1 through Ethernet1/0/3
to aggregation group 1.
[H3C] interface Ethernet1/0/1
[H3C-Ethernet1/0/1] port
link-aggregation group 1
[H3C-Ethernet1/0/1] interface
Ethernet1/0/2
[H3C-Ethernet1/0/2] port
link-aggregation group 1
[H3C-Ethernet1/0/2] interface
Ethernet1/0/3
[H3C-Ethernet1/0/3] port
link-aggregation group 1
3)
Adopting dynamic LACP aggregation mode
# Enable LACP on Ethernet1/0/1 through
Ethernet1/0/3.
<H3C> system-view
[H3C] interface Ethernet1/0/1
[H3C-Ethernet1/0/1] lacp enable
[H3C-Ethernet1/0/1] interface
Ethernet1/0/2
[H3C-Ethernet1/0/2] lacp enable
[H3C-Ethernet1/0/2] interface
Ethernet1/0/3
[H3C-Ethernet1/0/3] lacp enable
Note that, the three LACP-enabled ports can
be aggregated into a dynamic aggregation group to implement load sharing only
when they have the same basic configuration (such as rate and duplex mode and
so on).