抱歉,您的浏览器无法访问本站
本页面需要浏览器支持(启用)JavaScript
了解详情 >


以太网链路聚合

链路聚合

以太捆绑端口聚合,是将多台以太链路捆绑成一条逻辑链路,从而实现带宽的增加和链路的冗余,提高网络可靠性.

链路聚合优点

链路聚合能够提高链路带宽:理论上通过聚合几条链路,一个聚合组的带宽可以扩展为被绑定链路带宽总和,有效的增加了逻辑链路带宽.

网络可靠性:配置链路聚合后,如果某一条链路失效,那么聚合的其他链路依旧可以转发数据.

支持负载均衡:一个聚合组可以把流量分散到不同的被聚合的物理链路上,通过多个链路将数据发送到同一个目的地,将网络拥塞的可能降低.

链路聚合分为动态协商聚合和手工聚合.

手工聚合

手工聚合只要接口被加入到聚合组中,那么接口的状态就会 UP, 只关心自己到对端的状态,不关心对端设备的状态,如果对端设备出现故障,本端设备依旧认为对端的端口 UP, 但是不知道对端已经不具备转发能力.

动态聚合

动态聚合: LACP 模式,聚合组中存在活动链路和非活动链路,在 LACP 模式下,会选举主动端和被动端,被动端根据主动端选举出来的活跃接口来确定自己对应的活跃接口.

主动端和被动端选举:

1. 根据设备的优先级选举,优先级数值越小越优先,默认 32768.

2. 如果优先级相同,则比较设备的 MAC 地址,MAC 地址越小越优

活跃链路选举:

1. 当设备通过命令设置了活跃链路数量,会根据接口的优先级进行活跃链路选举,优先级越小越优,32768.

2. 如果优先级相同,则比较端口号,数值越小越优.

Shell

聚合链路

手工聚合

SW1
[SW1]int Eth-Trunk 
[SW1]int Eth-Trunk ?
<0-63> Eth-Trunk interface number

[SW1]int Eth-Trunk 12
[SW1-Eth-Trunk12]trunkport g 0/0/1 to 0/0/4
[SW1]display interface Eth-Trunk 12
Eth-Trunk12 current state : UP
Line protocol current state : UP
Description:
Switch Port, PVID : 1, Hash arithmetic : According to SIP-XOR-DIP,Maximal BW:
4G, Current BW: 4G, The Maximum Frame Length is 9216
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4c1f-cc7c-1cd9
Current system time: 2024-01-08 11:57:24-08:00
Input bandwidth utilization : 0%
Output bandwidth utilization : 0%
-----------------------------------------------------
PortName Status Weight
-----------------------------------------------------
GigabitEthernet0/0/1 UP 1
GigabitEthernet0/0/2 UP 1
GigabitEthernet0/0/3 UP 1
GigabitEthernet0/0/4 UP 1
-----------------------------------------------------
The Number of Ports in Trunk : 4
The Number of UP Ports in Trunk : 4
SW2
[SW2]int Eth-Trunk 12
[SW2-Eth-Trunk12]trunkport g 0/0/1 to 0/0/4

动态聚合

SW3
[SW3]int Eth-Trunk 34
[SW3-Eth-Trunk34]mode lacp-static
[SW3-Eth-Trunk34]trunkport g 0/0/1 to 0/0/4
[SW3-Eth-Trunk34]max active-linknumber 2
SW4
[SW4]int Eth-Trunk 34
[SW4-Eth-Trunk34]mode lacp-static
[SW4-Eth-Trunk34]trunkport g 0/0/1 to 0/0/4
[SW4-Eth-Trunk34]max active-linknumber 2
[SW4-Eth-Trunk34]dis th
#
interface Eth-Trunk34
mode lacp-static
max active-linknumber 2
#
[SW4-Eth-Trunk34]display interface Eth-Trunk 34
Eth-Trunk34 current state : UP
Line protocol current state : UP
Description:
Switch Port, PVID : 1, Hash arithmetic : According to SIP-XOR-DIP,Maximal BW:
4G, Current BW: 2G, The Maximum Frame Length is 9216
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4c1f-cc43-7170
Current system time: 2024-01-08 12:28:39-08:00
Input bandwidth utilization : 0%
Output bandwidth utilization : 0%
-----------------------------------------------------
PortName Status Weight
-----------------------------------------------------
GigabitEthernet0/0/1 UP 1
GigabitEthernet0/0/2 UP 1
GigabitEthernet0/0/3 DOWN 1
GigabitEthernet0/0/4 DOWN 1
-----------------------------------------------------
The Number of Ports in Trunk : 4
The Number of UP Ports in Trunk : 2

[SW4-Eth-Trunk34]

接口优先级
[SW3]lacp priority ?
INTEGER<0-65535> Priority value, the default value is 32768
[SW3]lacp priority 20


[SW3]int g0/0/3
[SW3-GigabitEthernet0/0/3]lacp priority 32769
[SW3-GigabitEthernet0/0/3]dis int Eth-Trunk 34
Eth-Trunk34 current state : UP
Line protocol current state : UP
Description:
Switch Port, PVID : 1, Hash arithmetic : According to SIP-XOR-DIP,Maximal BW:
4G, Current BW: 2G, The Maximum Frame Length is 9216
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4c1f-cc28-2c9f
Current system time: 2024-01-08 13:54:30-08:00
Input bandwidth utilization : 0%
Output bandwidth utilization : 0%
-----------------------------------------------------
PortName Status Weight
-----------------------------------------------------
GigabitEthernet0/0/1 UP 1
GigabitEthernet0/0/2 UP 1
GigabitEthernet0/0/3 DOWN 1
GigabitEthernet0/0/4 DOWN 1
-----------------------------------------------------
The Number of Ports in Trunk : 4
The Number of UP Ports in Trunk : 2

[SW3-GigabitEthernet0/0/3]int g0/0/2
[SW3-GigabitEthernet0/0/2]shutdown
[SW3-GigabitEthernet0/0/2]
[SW3-GigabitEthernet0/0/2]dis int Eth-Trunk 34
Eth-Trunk34 current state : UP
Line protocol current state : UP
Description:
Switch Port, PVID : 1, Hash arithmetic : According to SIP-XOR-DIP,Maximal BW:
4G, Current BW: 2G, The Maximum Frame Length is 9216
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4c1f-cc28-2c9f
Current system time: 2024-01-08 13:54:57-08:00
Input bandwidth utilization : 0%
Output bandwidth utilization : 0%
-----------------------------------------------------
PortName Status Weight
-----------------------------------------------------
GigabitEthernet0/0/1 UP 1
GigabitEthernet0/0/2 DOWN 1
GigabitEthernet0/0/3 DOWN 1
GigabitEthernet0/0/4 UP 1
-----------------------------------------------------
The Number of Ports in Trunk : 4
The Number of UP Ports in Trunk : 2

[SW3-GigabitEthernet0/0/2]

[SW3]display Eth-Trunk 34
Eth-Trunk34's state information is:
Local:
LAG ID: 34 WorkingMode: STATIC
Preempt Delay: Disabled Hash arithmetic: According to SIP-XOR-DIP
System Priority: 20 System ID: 4c1f-cc28-2c9f
Least Active-linknumber: 1 Max Active-linknumber: 2
Operate status: up Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
GigabitEthernet0/0/1 Selected 1GE 32768 2 8753 10111100 1
GigabitEthernet0/0/2 Unselect 1GE 32768 3 8753 10100010 1
GigabitEthernet0/0/3 Selected 1GE 32769 4 8753 10111100 1
GigabitEthernet0/0/4 Unselect 1GE 32768 5 8753 10100000 1

Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
GigabitEthernet0/0/1 32768 4c1f-cc43-7170 32768 2 8753 10111100
GigabitEthernet0/0/2 0 0000-0000-0000 0 0 0 10100011
GigabitEthernet0/0/3 32768 4c1f-cc43-7170 32768 4 8753 10111100
GigabitEthernet0/0/4 32768 4c1f-cc43-7170 32768 5 8753 10110000
推荐阅读
实现VLAN间通信 实现VLAN间通信 数据转发过程 数据转发过程 VLAN原理与配置 VLAN原理与配置 IP路由基础 IP路由基础 STP STP OSPF基础 OSPF基础

留言区

Are You A Robot?