链路聚合介绍及其配置命令

链路聚合

 

手动配置模式

一般是在不支持LACP协议的情况下使用,只要有一段不支持就得使用手动模式

还有一个缺点,如果一端出现故障会无法正常通信且不会有明显的故障显示,端口依旧为up

LACPDU

链路聚合控制协议数据单元(Link Aggregation Control Protocol Data Unit,LACPDU)

LACP优先级

比较全局的优先级

 主动端可以选择活动接口

接口优先级

当优先级一致时,比较接口编号,越小越优

最大活动接口数比较的是接口优先级

活动链路选举

活动接口由主动端选举,被动端活动接口根据主动端来

 

链路聚合配置命令

手工模式链路聚合配置

LACP模式链路聚合配置

链路聚合配置命令

[SW1]interface Eth-Trunk 1 //创建 Eth-Trunk 1 端口

[SW1-Eth-Trunk1]trunkport GigabitEthernet 0/0/22 to 0/0/24 //需要聚合的端口

[SW1-Eth-Trunk1]port link-type trunk //将聚合接口类型改为trunk接口

[SW1-Eth-Trunk1]port trunk allow-pass vlan 100 200    //放行vlan 100 200

[SW1-Eth-Trunk1]mode lacp-static //配置 lacp 模式,如果是手动模式,不打这一条即可

下面的可选,不打也不影响聚合

负载分担模式

[SW1-Eth-Trunk1]mode manual load-balance //负载分担模式配置为手动模式

[SW1-Eth-Trunk1]load-balance src-mac //配置负载分担方式为基于原MAC的方式

[SW1-Eth-Trunk1]max active-linknumber 2 //配置最大活动链路数

[SW1-Eth-Trunk1]lacp preempt enable //开启 lacp 端口抢占,(端口 down 掉,默认不抢占)

[SW1-Eth-Trunk1]lacp preempt delay 10 //配置抢占等待时间

[SW1-Eth-Trunk1]q

配置LACP优先级,只在lcap模式中使用,优先级高的作为主动端

[SW1]lacp priority 10 //设置设备 LACP 系统优先级,值越小,优先级越高

设置端口的LACP优先级

[SW1]interface GigabitEthernet 0/0/22

[SW1-GigabitEthernet0/0/22]lacp priority 50000 //设置接口 LACP 优先级,默认 32768,值越小,优先级越高[SW1-GigabitEthernet0/0/22]quit

猜你喜欢

转载自blog.csdn.net/qq_53454383/article/details/130328726