二层链路聚合配置
拓扑图
实验步骤
1.创建逻辑链路接口
[S1]interface Eth-Trunk 1 //创建逻辑链路接口
[S1-Eth-Trunk1]mode manual load-balance //设置接口为手工模式(默认开启)
[S1-Eth-Trunk1]dis th
#
interface Eth-Trunk1 //看不见第二条命令,因为第二条命令是华为设备默认的
#
return
[S1-Eth-Trunk1]
2.将需要聚合的成员接口加入逻辑接口Eth-trunk 1中
[S1-Eth-Trunk1]trunkport Ethernet 0/0/1 to 0/0/2
Info: This operation may take a few seconds. Please wait for a moment...done.
3.使用display eth-trunk 1命令去查看配置
[S1-Eth-Trunk1]dis 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: 2
--------------------------------------------------------------------------------
PortName Status Weight
Ethernet0/0/1 Up 1
Ethernet0/0/2 Up 1
可以看见接口状态已经是up(Operate status: up)
4.使用display interface Eth-Trunk 1命令仔细查看聚合接口信息
[S1-Eth-Trunk1]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:
200M, Current BW: 200M, The Maximum Frame Length is 9216
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4c1f-cc80-6035
Current system time: 2022-10-09 12:44:59-08:00
Input bandwidth utilization : 0%
Output bandwidth utilization : 0%
-----------------------------------------------------
PortName Status Weight
-----------------------------------------------------
Ethernet0/0/1 UP 1
Ethernet0/0/2 UP 1
-----------------------------------------------------
The Number of Ports in Trunk : 2
The Number of UP Ports in Trunk : 2
主要查看内容,可以看到最大带宽和当前带宽都是200M。这是因为两条成员链路都是100M
注意:在LACP中备份链路也包括在计算当中
Maximal BW:最大带宽
Current BW:当前带宽
5.尝试shutdown其中一条接口,再查看Eth-trunk 1。可以看到Maximal BW: 200M, Current BW: 100M。
这样代表这这条链路理论上可以转发200M是数据,实际上只可以转发100M。需要另一条shutdown的链路重新up才可以实现最大的带宽
[S1-Ethernet0/0/1]shutdown
[S1-Ethernet0/0/1]q
[S1]int Eth-Trunk 1
[S1-Eth-Trunk1]dis int 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:
200M, Current BW: 100M, The Maximum Frame Length is 9216
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4c1f-cc80-6035
Current system time: 2022-10-09 12:51:20-08:00
Input bandwidth utilization : 0%
Output bandwidth utilization : 0%
-----------------------------------------------------
PortName Status Weight
-----------------------------------------------------
Ethernet0/0/1 DOWN 1
Ethernet0/0/2 UP 1
-----------------------------------------------------
The Number of Ports in Trunk : 2
The Number of UP Ports in Trunk : 1
6.重新打开e0/0/1,再查看eth-trunk1
[S1-Eth-Trunk1]int e0/0/1
[S1-Ethernet0/0/1]undo shutdown
[S1-Ethernet0/0/1]q
[S1]int Eth-Trunk 1
[S1-Eth-Trunk1]dis int 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:
200M, Current BW: 200M, The Maximum Frame Length is 9216
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4c1f-cc80-6035
Current system time: 2022-10-09 12:56:03-08:00
Input bandwidth utilization : 0%
Output bandwidth utilization : 0%
-----------------------------------------------------
PortName Status Weight
-----------------------------------------------------
Ethernet0/0/1 UP 1
Ethernet0/0/2 UP 1
-----------------------------------------------------
The Number of Ports in Trunk : 2
The Number of UP Ports in Trunk : 2