一、实验拓扑¶

二、实验需求¶
1、采用手工链路聚合 2、采用动态模式链路聚合 3、要求S1作为主动端设备 4、配置聚合接口的接口数上限阈值和下限阈值为2 5、开启抢占功能,保证链路稳定
三、实验配置¶
1、配置手工链路聚合 (1)创建聚合口
[S1]interface Eth-Trunk 1
[S2]interface Eth-Trunk 1
(2)将物理接口加入聚合口
方式一
[S1]interface Ethernet 0/0/1
[S1-Ethernet0/0/1]eth-trunk 1
[S1]interface Ethernet 0/0/2
[S1-Ethernet0/0/1]eth-trunk 1
[S1]interface Ethernet 0/0/3
[S1-Ethernet0/0/1]eth-trunk 1
[S2]interface Ethernet 0/0/1
[S2-Ethernet0/0/1]eth-trunk 1
[S2]interface Ethernet 0/0/2
[S2-Ethernet0/0/1]eth-trunk 1
[S2]interface Ethernet 0/0/3
[S2-Ethernet0/0/1]eth-trunk 1
方式二
[S1]interface Eth-Trunk 1
[S1-Eth-Trunk1]trunkport Ethernet 0/0/1
[S1-Eth-Trunk1]trunkport Ethernet 0/0/2
[S1-Eth-Trunk1]trunkport Ethernet 0/0/3
[S2]interface Eth-Trunk 1
[S2-Eth-Trunk1]trunkport Ethernet 0/0/1
[S2-Eth-Trunk1]trunkport Ethernet 0/0/2
[S2-Eth-Trunk1]trunkport Ethernet 0/0/3
(3)查看聚合口接口状态
[S1]display eth-trunk 1
Eth-Trunk1's state information is:
WorkingMode: NORMAL Hash arithmetic: According to SIP- XOR-DIP
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 8
Operate status: up Number Of Up Port In Trunk: 3
PortName Status Weight
Ethernet0/0/1 Up 1
Ethernet0/0/2 Up 1
Ethernet0/0/3 Up 1
2、配置LACP模式的链路聚合 (1)创建聚合口
[S1]interface Eth-Trunk 1
[S2]interface Eth-Trunk 1
(2)修改聚合模式
[S1]interface Eth-Trunk 1
[S1-Eth-Trunk1]mode lacp-static
[S2]interface Eth-Trunk 1
[S2-Eth-Trunk1]mode lacp-static
[S1]interface Ethernet 0/0/1
[S1-Ethernet0/0/1]eth-trunk 1
[S1]interface Ethernet 0/0/2
[S1-Ethernet0/0/1]eth-trunk 1
[S1]interface Ethernet 0/0/3
[S1-Ethernet0/0/1]eth-trunk 1
[S2]interface Ethernet 0/0/1
[S2-Ethernet0/0/1]eth-trunk 1
[S2]interface Ethernet 0/0/2
[S2]interface Ethernet 0/0/3
[S2-Ethernet0/0/1]eth-trunk 1
(3)查看聚合口接口状态
[S2]dis eth-trunk 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1 WorkingMode: STATIC
Preempt Delay: Disabled Hash arithmetic: According to SIP-XOR-DIP
System Priority: 32768 System ID: 4c1f-cc32-26c1
Least Active-linknumber: 1 Max Active-linknumber: 8
Operate status: up Number Of Up Port In Trunk: 3
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
Ethernet0/0/1 Selected 100M 32768 2 289 10111100 1
Ethernet0/0/2 Selected 100M 32768 3 289 10111100 1
Ethernet0/0/3 Selected 100M 32768 4 289 10111100 1
Partner:
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
Ethernet0/0/1 32768 4c1f-cca2-5a53 32768 2 289 10111100
Ethernet0/0/2 32768 4c1f-cca2-5a53 32768 3 289 10111100
Ethernet0/0/3 32768 4c1f-cca2-5a53 32768 4 289 10111100
3、配置S1的LACP优先级,使其成为主动端设备
[S1]lacp priority 100
4、配置接口优先级,优先选择Ethernet0/0/1和Ethernet0/0/2
[S1-Ethernet0/0/3]lacp priority 50000
5、配置聚合接口的接口数上限阈值和下限阈值
[S1-Eth-Trunk1]max active-linknumber 2
[S1-Eth-Trunk1]least active-linknumber 2
6、聚合接口开启抢占功能
[S1-Eth-Trunk1]lacp preempt enable
7、查看聚合接口状态
[S1]display interface Eth-Trunk 1
Eth-Trunk1 current state : UP
Line protocol current state : UP
Description:
Switch Port, PVID : 1, Hash arithmetic : According to SIP-XOR-DIP,Maximal BW:
300M, Current BW: 200M, The Maximum Frame Length is 9216
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4c1f-cca2-5a53
Current system time: 2021-10-06 14:41:43-08:00
Input bandwidth utilization : 0%
Output bandwidth utilization : 0%
PortName Status Weight
Ethernet0/0/1 UP 1
Ethernet0/0/2 UP 1
Ethernet0/0/3 DOWN 1
The Number of Ports in Trunk : 3
The Number of UP Ports in Trunk : 2