ensp 链路聚合–lacp模式(二层链路聚合)

LACP模式

是一种国际标准的协商方式,根据自身配置自动形成聚合链路并启动聚合链路收发数据。聚合链路形成以后,LACP负责维护链路状态,在聚合条件发生变化时,自动调整或解散聚合链路。

LACP模式名词解释

系统优先级

接口优先级

成员接口备份

LACP基于标准协议802.3ad

 1 二层链路聚合

eth-trunk可以捆绑相同类型的端口,在一个二层交换机上,一般把接入层sw和分布层sw之间的链路做成二层链路聚合。保持端口参数一致

 交换机操作

[sw1]vlan batch 10 20
[sw2]vlan batch 10 20

配置聚合模式

[sw1]interface Eth-Trunk 10
[sw1-Eth-Trunk10]mode lacp-static
[sw2]interface Eth-Trunk 10
[sw2-Eth-Trunk10]mode lacp-static

将接口加入聚合组10

[sw1-Eth-Trunk10]trunkport GigabitEthernet 0/0/1 to 0/0/3
[sw2-Eth-Trunk10]trunkport GigabitEthernet 0/0/1 to 0/0/3

查看结果

[sw1-Eth-Trunk10]display eth-trunk 10
Eth-Trunk10's state information is:
Local:
LAG ID: 10                  WorkingMode: STATIC  //静态的LACP模式                            
Preempt Delay: Disabled     Hash arithmetic: According to SIP-XOR-DIP         
System Priority: 32768      System ID: 4c1f-ccc7-4165                         
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
GigabitEthernet0/0/1   Selected 1GE      32768   2      2609    10111100  1     
GigabitEthernet0/0/2   Selected 1GE      32768   3      2609    10111100  1     
GigabitEthernet0/0/3   Selected 1GE      32768   4      2609    10111100  1     

Partner:
---------------------------------------------------------------------
ActorPortName          SysPri   SystemID        PortPri PortNo PortKey PortState
GigabitEthernet0/0/1   32768    4c1f-cc53-798c  32768   2      2609    10111100
GigabitEthernet0/0/2   32768    4c1f-cc53-798c  32768   3      2609    10111100
GigabitEthernet0/0/3   32768    4c1f-cc53-798c  32768   4      2609    10111100

#max active-linknumber 2 //定义上限活动接口阈值为2

修改了最大活动链路的条目为2,现在有3条链路,所以要1条链路为非活动端口,默认端口号选G0/0/3处于非活动端口

#lacp priority 100 //修改系统LACP优先级,选择主动发起端

[sw1]lacp priority 100
[sw1]display eth-trunk 10 //交换机s1成为了主动端
Eth-Trunk10's state information is:
Local:
LAG ID: 10                  WorkingMode: STATIC                               
Preempt Delay: Disabled     Hash arithmetic: According to SIP-XOR-DIP         
System Priority: 100        System ID: 4c1f-ccc7-4165                         
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
GigabitEthernet0/0/1   Selected 1GE      32768   2      2609    10111100  1     
GigabitEthernet0/0/2   Selected 1GE      32768   3      2609    10111100  1     
GigabitEthernet0/0/3   Selected 1GE      32768   4      2609    10111100  1     

Partner:
---------------------------------------------------------------------
ActorPortName          SysPri   SystemID        PortPri PortNo PortKey PortState
GigabitEthernet0/0/1   32768    4c1f-cc53-798c  32768   2      2609    10111100
GigabitEthernet0/0/2   32768    4c1f-cc53-798c  32768   3      2609    10111100
GigabitEthernet0/0/3   32768    4c1f-cc53-798c  32768   4      2609    10111100

修改接口LACP优先级,选择那些是活动接口,哪些是非活动接口

#int g 0/0/2

#lacp priority 100

#int g 0/0/3

#lacp priority 100 //接口优先级变为100

#inter eth-trunk 10

#lacp preempt enable //开启抢占功能

#load-balance src-dst-mac //配置负载分担方式

Published by

风君子

独自遨游何稽首 揭天掀地慰生平

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注