ARTICLE DETAIL

资讯详情

深耕郑州网站建设与运营推广的一线实战洞察。

链路聚合详细讲解及实战案例

链路聚合详细讲解及实战案例 链路聚合定义将多条物理链路捆绑为一条逻辑链路也就是将多条物理链路在逻辑上聚合成一条逻辑链路从而达到叠加带宽的效果称为聚合链路。在华为设备中称为Eth-Trunk链路其中每一条物理链路称为成员链路。链路聚合条件1.速率、双工模式、接口类型例不能是千兆口万兆口混合、PVID、允许列表要一致。2.聚合成员链路两端必须在相同的两台设备上。3.不能叠加冲突业务也就是说不能配置静态路由、STP、VRRP、ACL等单独接口功能。4.同一Eth-Trunk最多8个成员端口一个物理口只能属于一个聚合且不能加入多个Eth-Trunk。5.聚合链路两端链路聚合的模式必须一样手工聚合/自动聚合。链路聚合两种模式手工负载分担模式手工模式特点•不使用 LACP 协议没有报文协商•所有 Up 的成员链路全部作为活动链路同时转发流量没有备用链路•链路故障流量自动分摊到剩下正常链路优缺点优点配置简单、所有链路都跑流量缺点无法检测线路错接、单向链路故障没有协商机制。静态LACP协议模式基于LACP协议802.3ad特点•启用 LACP 协议设备之间互相发送 LACP 报文协商•可以设置最大活动链路数量链路总数最大活动链路 → 多余链路自动成为备份链路活动链路故障备份链路自动升级转发流量优缺点优点协议协商能检测链路异常支持备份链路可靠性更高。缺点配置相对复杂。手工模式、静态LACP模式都支持负载分担。注意华为没有动态LACP模式思科有动态LACP模式。链路聚合手工模式实例LSW1的配置[sw1]interface Eth-Trunk 1 //进入Eth-Trunk 1 链路聚合虚拟接口[sw1-Eth-Trunk1]mode ?lacp-static Static working modemanual Manual working mode[sw1-Eth-Trunk1]mode manual ?load-balance Load balance working mode[sw1-Eth-Trunk1]mode manual load-balance //手工负载分担模式[sw1-Eth-Trunk1]trunkport e 0/0/1 to 0/0/3 //将端口 E0/0/1、E0/0/2、E0/0/3 批量加入 Eth-Trunk1 聚合组LSW2的配置[sw2]interface Eth-Trunk 1[sw2-Eth-Trunk1]mode ?lacp-static Static working modemanual Manual working mode[sw2-Eth-Trunk1]mode manual ?load-balance Load balance working mode[sw2-Eth-Trunk1]mode manual load-balance[sw2-Eth-Trunk1]trunkport e 0/0/1 to 0/0/3查LSW 1接口状态查LSW 2接口状态自动链路聚合LACP的配置LSW3的配置[Huawei]sysname sw3[sw3]int Eth-Trunk 1[sw3-Eth-Trunk1]mod[sw3-Eth-Trunk1]mode ?lacp-static Static working modemanual Manual working mode[sw3-Eth-Trunk1]mode lacp-static //设置聚合组为静态 LACP 模式设备之间收发 LACP 报文自动协商链路。[sw3-Eth-Trunk1]trunkport e 0/0/1 to 0/0/3 //把接口 E0/0/1、E0/0/2、E0/0/3 批量加入 Eth‑Trunk1。Info: This operation may take a few seconds. Please wait for a moment...done.[sw3-Ethernet0/0/1]lacp priority 100 //进入接口 1配置端口 LACP 优先级 100。数值越小优先级越高用来选活动链路。[sw3-Ethernet0/0/1]int e 0/0/2[sw3-Ethernet0/0/2]lacp priority 100 //接口 2 的 LACP 端口优先级设为 100[sw3-Eth-Trunk1]max active-linknumber 2 //聚合组最多同时 2 条链路转发流量剩下的做备份链路[sw3-Eth-Trunk1]least active-linknumber 1 //如果活动链路少于 1 条整个 Eth‑Trunk 直接 Down防止断网。LSW4的配置[Huawei]sysname sw4[sw4]undo in enInfo: Information center is disabled.[sw4-Eth-Trunk1]mode ?lacp-static Static working modemanual Manual working mode[sw4-Eth-Trunk1]mode lacp-static[sw4-Eth-Trunk1]trunkport e 0/0/1 to 0/0/3查LSW 3接口状态查LSW 4接口状态
返回列表