链路聚合M-LAG配置




M-LAG简介

    M-LAG(Multichassis Link Aggregation Group)即跨设备链路聚合组。如下图所示,M-LAG是将ServerA(可以是设备或主机)与另外两台设备DeviceA和DeviceB进行跨设备链路聚合,如同ServerA和一台设备建立了链路聚合关系,从而把链路可靠性从单板级提高到了设备级。
    

m-lag

    传统的聚合链路是单设备和单设备间的对接,若链路出现故障或者对端设备故障,设备或服务器将无法与对端设备继续进行通信。M-LAG的出现解决了上述问题,它是将M-LAG系统不同设备上的端口聚合到一个逻辑接口中,即使其中某台设备故障或其中一条聚合链路出现故障,也不会导致聚合链路完全失效,从而保证了数据流量的可靠传输。M-LAG在提升链路可靠性的同时还具备如下优势:
  • M-LAG系统的两台设备在逻辑上被虚拟成一台设备,它本身提供了一种没有环路的二层拓扑,逻辑组网更清晰,链路利用更充分。

  • M-LAG两台设备可以独立升级,实现效率高,业务秒级中断的目标。

因此,M-LAG主要使用在工业制造场景中,满足对组网可靠性要求高、对升级过程业务中断时间要求高的业务诉求。
M-LAG与传统园区场景中的堆叠、NAC、业务随行、DHCP服务器、DHCP Snooping等无法同时部署

配置步骤

1. 需求分析

    核心层的Master和Backup、汇聚汇聚Master和Backup交换机组建了多级M-LAG,核心的Master和Backup之间Eth-Trunk链路配置Peer-Link,交互M-LAG同步报文。在M-LAG设备之间配置V-STP破除环路。同时,核心的Master和Backup设备和上层设备配置OSPF实现三层互通。
M-LAG配置要点:
以汇聚层Master和Backup组建M-LAG为例,核心层设备配置类似。

2. 使能 3 层互通且设置 STP 生成树

# <Master>
# 1. 设置 STP 生成树协议
stp instance 0 root primary    # 设置根桥
stp v-stp enable               # 使用v-stp
stp mode rstp	               # 设定模式为rstp快速生成树协议
# 2. 配置主接口的IP地址,且保证能够三层互通,专门用于M-LAG主备设备间心跳报文的传输
int MEth 0/0/0
ip address 10.10.252.28 255.255.255.0
commit
quit

# <Backup>
# 1. 设置 STP 生成树协议
stp instance 0 root primary    # 设置根桥
stp v-stp enable               # 使用v-stp
stp mode rstp	               # 设定模式为rstp快速生成树协议
# 2. 配置主接口的IP地址,且保证能够三层互通,专门用于M-LAG主备设备间心跳报文的传输
int MEth 0/0/0
ip address 10.10.252.29 255.255.255.0
commit
quit

3. 在Master和Backup上配置M-LAG的DFS Group

# <Master>
dfs-group 1
 priority 150
 source ip 10.10.252.28
commit
quit

# <Backup>
dfs-group 1
 priority 130
 source ip 10.10.252.29
commit
quit
# <Master>
undo interface Eth-Trunk 110  # 删除聚合口,同时也就删除了该口的所有配置
commit
int 25GE 1/0/1
clear configuration this      # 清空该口配置
y
commit
int 25GE 1/0/2
clear configuration this
y
commit

interface Eth-Trunk110
trunkport 25GE 1/0/1
trunkport 25GE 1/0/2
 mode lacp-static
 peer-link 1                 # 重点, 重点


# <Backup>
undo interface Eth-Trunk 110  # 删除聚合口,同时也就删除了该口的所有配置
commit
int 25GE 1/0/1
clear configuration this      # 清空该口配置
y
commit
int 25GE 1/0/2
clear configuration this
y
commit

interface Eth-Trunk110
trunkport 25GE 1/0/1
trunkport 25GE 1/0/2
 mode lacp-static
 peer-link 1                # 重点, 重点

5. 在Master和Backup上配置M-LAG的成员口

服务器组网拓步如下图所示:

# <Master>
undo interface Eth-Trunk 111   # 删除聚合口,同时也就删除了该口的所有配置
undo interface Eth-Trunk 112   # 删除聚合口,同时也就删除了该口的所有配置
commit
int 25GE 1/0/6
clear configuration this      # 清空该口配置
y
commit
int 25GE 1/0/16
clear configuration this
y
commit

vlan batch 111
interface Eth-Trunk111
trunkport 25GE 1/0/6
 port link-type trunk
 port trunk pvid vlan 111
 undo port trunk allow-pass vlan 1
 port trunk allow-pass vlan 111 4001
 mode lacp-static
 dfs-group 1 m-lag 1    # 重点, 重点
commit 
quit

interface Eth-Trunk112
trunkport 25GE 1/0/16
 port link-type trunk
 port trunk pvid vlan 111
 port trunk allow-pass vlan 111 4001
 mode lacp-static
 dfs-group 1 m-lag 2   # 重点, 重点
commit 
quit




# <Backup>
undo interface Eth-Trunk 111   # 删除聚合口,同时也就删除了该口的所有配置
undo interface Eth-Trunk 112   # 删除聚合口,同时也就删除了该口的所有配置
commit
int 25GE 1/0/6
clear configuration this      # 清空该口配置
y
commit
int 25GE 1/0/12
clear configuration this
y
commit


vlan batch 111
interface Eth-Trunk111
trunkport 25GE 1/0/6
 port link-type trunk
 port trunk pvid vlan 111
 undo port trunk allow-pass vlan 1
 port trunk allow-pass vlan 111 4001
 mode lacp-static
 dfs-group 1 m-lag 1   # 重点, 重点
commit
quit

interface Eth-Trunk112
trunkport 25GE 1/0/12
 port link-type trunk
 port trunk pvid vlan 111
 undo port trunk allow-pass vlan 1
 port trunk allow-pass vlan 111 4001
 mode lacp-static
 dfs-group 1 m-lag 2   # 重点, 重点
commit 
quit


参考网址

posted @ 2024-03-05 00:08  梭梭666  阅读(7)  评论(0编辑  收藏  举报
返回顶部