Layer 2 aggregation load sharing configuration example
Network requirements
On the network shown in Figure 14, perform the following tasks:
Configure two Layer 2 static aggregation groups 1 and 2 on Device A and Device B, respectively.
Enable VLAN 10 at one end of the aggregate link to communicate with VLAN 10 at the other end.
Enable VLAN 20 at one end of the aggregate link to communicate with VLAN 20 at the other end.
Configure link aggregation groups 1 and 2 to load share traffic across aggregation group member ports.
Configure link aggregation group 1 to load share packets based on source MAC addresses.
Configure link aggregation group 2 to load share packets based on destination MAC addresses.
Figure 14: Network diagram
Configuration procedure
Configure Device A:
# Create VLAN 10, and assign the port Ten-GigabitEthernet 1/0/5 to VLAN 10.
<DeviceA> system-view [DeviceA] vlan 10 [DeviceA-vlan10] port ten-gigabitethernet 1/0/5 [DeviceA-vlan10] quit
# Create VLAN 20, and assign the port Ten-GigabitEthernet 1/0/6 to VLAN 20.
[DeviceA] vlan 20 [DeviceA-vlan20] port ten-gigabitethernet 1/0/6 [DeviceA-vlan20] quit
# Create Layer 2 aggregate interface Bridge-Aggregation 1.
[DeviceA] interface bridge-aggregation 1
# Configure Layer 2 aggregation group 1 to load share packets based on source MAC addresses.
[DeviceA-Bridge-Aggregation1] link-aggregation load-sharing mode source-mac [DeviceA-Bridge-Aggregation1] quit
# Assign ports Ten-GigabitEthernet 1/0/1 and Ten-GigabitEthernet 1/0/2 to link aggregation group 1.
[DeviceA] interface ten-gigabitethernet 1/0/1 [DeviceA-Ten-GigabitEthernet1/0/1] port link-aggregation group 1 [DeviceA-Ten-GigabitEthernet1/0/1] quit [DeviceA] interface ten-gigabitethernet 1/0/2 [DeviceA-Ten-GigabitEthernet1/0/2] port link-aggregation group 1 [DeviceA-Ten-GigabitEthernet1/0/2] quit
# Configure Layer 2 aggregate interface Bridge-Aggregation 1 as a trunk port and assign it to VLAN 10.
[DeviceA] interface bridge-aggregation 1 [DeviceA-Bridge-Aggregation1] port link-type trunk [DeviceA-Bridge-Aggregation1] port trunk permit vlan 10 [DeviceA-Bridge-Aggregation1] quit
# Create Layer 2 aggregate interface Bridge-Aggregation 2.
[DeviceA] interface bridge-aggregation 2
# Configure Layer 2 aggregation group 2 to load share packets based on destination MAC addresses.
[DeviceA-Bridge-Aggregation2] link-aggregation load-sharing mode destination-mac [DeviceA-Bridge-Aggregation2] quit
# Assign ports Ten-GigabitEthernet 1/0/3 and Ten-GigabitEthernet 1/0/4 to link aggregation group 2.
[DeviceA] interface ten-gigabitethernet 1/0/3 [DeviceA-Ten-GigabitEthernet1/0/3] port link-aggregation group 2 [DeviceA-Ten-GigabitEthernet1/0/3] quit [DeviceA] interface ten-gigabitethernet 1/0/4 [DeviceA-Ten-GigabitEthernet1/0/4] port link-aggregation group 2 [DeviceA-Ten-GigabitEthernet1/0/4] quit
# Configure Layer 2 aggregate interface Bridge-Aggregation 2 as a trunk port and assign it to VLAN 20.
[DeviceA] interface bridge-aggregation 2 [DeviceA-Bridge-Aggregation2] port link-type trunk [DeviceA-Bridge-Aggregation2] port trunk permit vlan 20 [DeviceA-Bridge-Aggregation2] quit
Configure Device B in the same way Device A is configured. (Details not shown.)
Verifying the configuration
# Display detailed information about all aggregation groups on Device A.
[DeviceA] display link-aggregation verbose Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing Port Status: S -- Selected, U -- Unselected I -- Individual, * -- Management port Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation, D -- Synchronization, E -- Collecting, F -- Distributing, G -- Defaulted, H -- Expired Aggregate Interface: Bridge-Aggregation1 Aggregation Mode: Static Loadsharing Type: Shar Management VLAN : None Port Status Priority Oper-Key -------------------------------------------------------------------------------- XGE1/0/1 S 32768 1 XGE1/0/2 S 32768 1 Aggregate Interface: Bridge-Aggregation2 Aggregation Mode: Static Loadsharing Type: Shar Port Status Priority Oper-Key -------------------------------------------------------------------------------- XGE1/0/3 S 32768 2 XGE1/0/4 S 32768 2
The output shows that:
Link aggregation groups 1 and 2 are both load-shared Layer 2 static aggregation groups.
Each aggregation group contains two Selected ports.
# Display all the group-specific load sharing modes on Device A.
[DeviceA] display link-aggregation load-sharing mode interface Bridge-Aggregation1 Load-Sharing Mode: source-mac address Bridge-Aggregation2 Load-Sharing Mode: destination-mac address
The output shows that:
Link aggregation group 1 load shares packets based on source MAC addresses.
Link aggregation group 2 load shares packets based on destination MAC addresses.