聚合链路无非是多整个网络的多路负载,提高稳定性和高可用性,是网络设计的必然架构
1.增加带宽
2.提高可靠性
3.负载分担
链路聚合默认最多8条链路
链路聚合两种模式
1. 手动负载分担模式
所有成员端口都处于转发模式,分担负担
2.LACP 模式
lacp 模式支持链路备份
也成为了M:N模式,M 是活动链路数量,N是非活动链路数量
数据流控制
负载分担: 基于流的负载分担,基于mac 地址和ip地址的负载方式
三层交换机配置端口聚合模式需要关闭交换模式
undo portswitch
注意事项:
1. 二层聚合口成员必须是2层,三层必须为3层
2. 最多可以加入8个成员端口
3.加入聚合口的成员端口 必须是hybrid 接口类型
4. 不能嵌套使用聚合
5.只能三处不包含任何成员接口的聚合口
6.成员口的聚合口数量和类型必须相同
7.一个成员接口只能属于一个聚合口
8.两端都要配置成聚合口
9.成员口的端口速率必须相同
10. 由聚合口学习mac 地址,成员端口不在学习mac 地址
display trunkmembership eth 1
如果是LACP 模式: 需要在接口处设置优先级,然后再eth 模式下设置 活动数量最大数量
1.手工模式:
sysname sw3
undo info-center enable
interface MEth0/0/1
#
e-trunk 1
#
interface Eth-Trunk1
#
interface GigabitEthernet0/0/1
eth-trunk 1
#
interface GigabitEthernet0/0/2
eth-trunk 1
sysname sw4
undo info-center enable
interface Vlanif1
#
interface MEth0/0/1
#
e-trunk 1
#
interface Eth-Trunk1
#
interface GigabitEthernet0/0/1
eth-trunk 1
#
interface GigabitEthernet0/0/2
eth-trunk 1
##查看 trunk 信息
[sw3]dis trunkmembership eth-trunk 1
Trunk ID: 1
Used status: VALID
TYPE: ethernet
Working Mode : Normal
Number Of Ports in Trunk = 2
Number Of Up Ports in Trunk = 2
Operate status: up
Interface GigabitEthernet0/0/1, valid, operate up, weight=1
Interface GigabitEthernet0/0/2, valid, operate up, weight=1
[sw3]
LACP 模式
##SW1
[sw1]di cu
sysname sw1
undo info-center enable
lacp priority 100
e-trunk 1
interface Eth-Trunk1
mode lacp-static
max active-linknumber 2
interface GigabitEthernet0/0/1
eth-trunk 1
lacp priority 100
interface GigabitEthernet0/0/2
eth-trunk 1
lacp priority 100
interface GigabitEthernet0/0/3
eth-trunk 1
##SW2
#sw2
undo info-center enable
lacp priority 100
e-trunk 1
interface Eth-Trunk1
mode lacp-static
max active-linknumber 2
interface GigabitEthernet0/0/1
eth-trunk 1
lacp priority 100
interface GigabitEthernet0/0/2
eth-trunk 1
lacp priority 100
interface GigabitEthernet0/0/3
eth-trunk 1
interface GigabitEthernet0/0/4
###有个端口是down 的状态做备份 形成M:N模式
##确认 一下又饿
[sw2]display trunkmembership e 1
Trunk ID: 1
Used status: VALID
TYPE: ethernet
Working Mode : Static
Number Of Ports in Trunk = 3
Number Of Up Ports in Trunk = 2
Operate status: up
Interface GigabitEthernet0/0/1, valid, operate up, weight=1
Interface GigabitEthernet0/0/2, valid, operate up, weight=1
Interface GigabitEthernet0/0/3, valid, operate down, weight=1
[sw2]
###关闭一个端口,另一个down的端口开启
[sw1]inter g 0/0/1
[sw1-GigabitEthernet0/0/1]shut
[sw1-GigabitEthernet0/0/1]dis trunkmembership e 1
Trunk ID: 1
Used status: VALID
TYPE: ethernet
Working Mode : Static
Number Of Ports in Trunk = 3
Number Of Up Ports in Trunk = 2
Operate status: up
Interface GigabitEthernet0/0/1, valid, operate down, weight=1
Interface GigabitEthernet0/0/2, valid, operate up, weight=1
Interface GigabitEthernet0/0/3, valid, operate up, weight=1
[sw1-GigabitEthernet0/0/1]
#备注:端口切换时,丢10左右的包
sysname sw1
portal local-server load portalpage.zip
drop illegal-mac alarm
undo info-center enable
interface Eth-Trunk1
undo portswitch
ip address 10.5.6.2 255.255.255.0
interface GigabitEthernet0/0/0
eth-trunk 1
interface GigabitEthernet0/0/1
eth-trunk 1
sysname sw2
undo info-center enable
interface Eth-Trunk1
undo portswitch
ip address 10.5.6.1 255.255.255.0
interface GigabitEthernet0/0/0
eth-trunk 1
interface GigabitEthernet0/0/1
eth-trunk 1
interface GigabitEthernet0/0/2
##测试
display trunkmembership eth-trunk 1
Trunk ID: 1
Used status: VALID
TYPE: ethernet
Working Mode : Normal
Number Of Ports in Trunk = 2
Number Of Up Ports in Trunk = 2
Operate status: up
Interface GigabitEthernet0/0/1, valid, operate up, weight=1
Interface GigabitEthernet0/0/0, valid, operate up, weight=1
ping 10.5.6.1
PING 10.5.6.1: 56 data bytes, press CTRL_C to break
Reply from 10.5.6.1: bytes=56 Sequence=1 ttl=255 time=50 ms
Reply from 10.5.6.1: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 10.5.6.1: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 10.5.6.1: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 10.5.6.1: bytes=56 Sequence=5 ttl=255 time=10 ms
###三层设备也可以设置LACP 和手动模式,具体和二层设备一样