1、聚合方式
(1)、lacp
静态链路聚合、
动态链路聚合(开启lacp模式,常用)
(2)、手工负载分担
静态端口聚合(两台交换机都按照下面的命令配置)
<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]sysname SW1
[SW1]interface Bridge-Aggregation 1
[SW1-Bridge-Aggregation1]port link-type trunk
[SW1-Bridge-Aggregation1]port trunk permit vlan all \\默认模式为静态所以不需要修改模式了
[SW1-Bridge-Aggregation1]link-aggregation mode static \\如果原本为动态则使用该命令进行修改
#将 g1/0/1和g1/0/2加入链路聚合组1
[SW1]interface GigabitEthernet 1/0/1
[SW1-GigabitEthernet1/0/1]port link-type trunk
[SW1-GigabitEthernet1/0/1]port trunk permit vlan all
[SW1-GigabitEthernet1/0/1]port link-aggregation group 1
[SW1-GigabitEthernet1/0/1]qu
[SW1]interface GigabitEthernet 1/0/2
[SW1-GigabitEthernet1/0/2]port link-type trunk
[SW1-GigabitEthernet1/0/2]port trunk permit vlan all
[SW1-GigabitEthernet1/0/2]port link-aggregation group 1
Can't assign the port to the aggregation group because its attribute configurations are different than the aggregate interface.
[SW1-GigabitEthernet1/0/2]qu
[SW1]dis link-aggregation verbose
查看链路聚合状态
动态端口聚合(两台交换机都按照下面的命令配置)
<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]sysname SW1
[SW1]interface Bridge-Aggregation 1
[SW1-Bridge-Aggregation1]port link-type trunk
[SW1-Bridge-Aggregation1]port trunk permit vlan all
[SW1-Bridge-Aggregation1]link-aggregation mode dynamic \\将聚合模式设置为动态
[SW1-Bridge-Aggregation1]qu
[SW1]interface g1/0/1
[SW1-GigabitEthernet1/0/1]port link-type trunk
[SW1-GigabitEthernet1/0/1]port trunk permit vlan all
[SW1-GigabitEthernet1/0/1]port link-aggregation group 1
[SW1-GigabitEthernet1/0/1]qu
[SW1]interface g1/0/2
[SW1-GigabitEthernet1/0/2]port link-type trunk
[SW1-GigabitEthernet1/0/2]port trunk permit vlan all
[SW1-GigabitEthernet1/0/2]port link-aggregation group 1
[SW1-GigabitEthernet1/0/2]qu
[SW1]dis link-aggregation verbose
查看链路聚合状态
负载均衡
<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]sysname SW1
[SW1]interface Bridge-Aggregation 1
[SW1-Bridge-Aggregation1]port link-type trunk
[SW1-Bridge-Aggregation1]port trunk permit vlan all
[SW1-Bridge-Aggregation1]link-aggregation mode dynamic \\将聚合模式设置为动态
[SW1-Bridge-Aggregation1]qu
[SW1]interface g1/0/1
[SW1-GigabitEthernet1/0/1]port link-type trunk
[SW1-GigabitEthernet1/0/1]port trunk permit vlan all
[SW1-GigabitEthernet1/0/1]port link-aggregation group 1
[SW1-GigabitEthernet1/0/1]qu
[SW1]interface g1/0/2
[SW1-GigabitEthernet1/0/2]port link-type trunk
[SW1-GigabitEthernet1/0/2]port trunk permit vlan all
[SW1-GigabitEthernet1/0/2]port link-aggregation group 1
[SW1-GigabitEthernet1/0/2]qu
[SW1]link-aggregation global load-sharing mode destination-mac
[SW1]dis link-aggregation verbose
三层聚合命令
在交换机上配置三层链路聚合
<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]sysname SW1
[SW1]interface Route-Aggregation 1
[SW1-Route-Aggregation1]ip add 192.168.1.1 24
[SW1-Route-Aggregation1]qu
[SW1]int GigabitEthernet 1/0/1
[SW1-GigabitEthernet1/0/1]port link-mode route //这里要将端口转换成三层端口
[SW1-GigabitEthernet1/0/1]port link-aggregation group 1
[SW1-GigabitEthernet1/0/1]qu
[SW1]int GigabitEthernet 1/0/2
[SW1-GigabitEthernet1/0/2]port link-mode route //这里要将端口转换成三层端口
the interface GigabitEthernet1/0/2 changed to down.
[SW1-GigabitEthernet1/0/2]qu
[SW1]int GigabitEthernet 1/0/2
[SW1-GigabitEthernet1/0/2]port link-aggregation group 1
[SW1]dis link-aggregation ver
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Port Status: S -- Selected, U -- Unselected, I -- Individual
Port: A -- Auto port, M -- Management port, R -- Reference port
Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
Aggregate Interface: Route-Aggregation1
Aggregation Mode: Static
Loadsharing Type: Shar
Management VLANs: None
Port Status Priority Oper-Key
GE1/0/1(R) S 32768 1
GE1/0/2 S 32768 1
路由器上配置链路聚合
<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]sysname R1
[R1]interface Route-Aggregation 1
[R1-Route-Aggregation1]ip address 192.168.1.1 24
[R1-Route-Aggregation1]qu
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]port link-aggregation group 1
[R1-GigabitEthernet0/0/0]qu
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]port link-aggregation group 1
[R1]display link-aggregation verbose
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Port Status: S -- Selected, U -- Unselected, I -- Individual
Port: A -- Auto
Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
Role: P -- Primary, S -- Secondary
Aggregate Interface: Route-Aggregation1
Aggregation Mode: Static
Loadsharing Type: Shar
Port Status Priority Oper-Key Role
GE0/0/0 S 32768 1 None
GE0/0/1 S 32768 1 None
[R1]