M-LAG

M-LAG

跨设备链路聚合组,是一种实现跨设备链路聚合的机制,把链路可靠性从单板级提高到了设备级

协商出M-LAG主备后,两台设备之间会通过双主检测链路按照1s的周期发送M-LAG双主检测报文,一旦设备感知peer-link故障,会按照100ms的周期发送三个双主检测链路报文,加速检测。当两台设备均能够收到对端发送的报文时,双活系统即开始正常的工作。

在DFS Group配对失败或者peer-link故障场景下,双主检测链路用于检查是否出现双主的情况。双主检测链路可以通过外部网络承载(比如,如果M-LAG上行接入IP网络,那么两台双归设备通过IP网络可以互通,那么互通的链路就可以作为双主检测链路)。也可以单独配置一条三层可达的链路来作为双主检测链路(比如通过管理口)。

配置M-LAG双归接入普通以太网络

在这里插入图片描述

# 配置SwitchA

[~SwitchA] stp root primary
[*SwitchA] stp bridge-address 39-39-39
[*SwitchA] interface eth-trunk 1
[*SwitchA-Eth-Trunk1] trunkport 10ge 1/0/5
[*SwitchA-Eth-Trunk1] trunkport 10ge 1/0/6
[*SwitchA-Eth-Trunk1] stp edged-port enable
[*SwitchA-Eth-Trunk1] commit
[~SwitchA-Eth-Trunk1] quit

# 配置SwitchB

[~SwitchB] stp root primary
[*SwitchB] stp bridge-address 39-39-39
[*SwitchB] interface eth-trunk 1
[*SwitchB-Eth-Trunk1] trunkport 10ge 1/0/5
[*SwitchB-Eth-Trunk1] trunkport 10ge 1/0/6
[*SwitchB-Eth-Trunk1] stp edged-port enable
[*SwitchB-Eth-Trunk1] commit
[~SwitchB-Eth-Trunk1] quit
分别配置SwitchA和SwitchB管理网口的IP地址

# 配置SwitchA

[~SwitchA] interface meth 0/0/0
[~SwitchA-MEth0/0/0] ip address 10.1.1.1 24
[*SwitchA-MEth0/0/0] quit
[*SwitchA] commit

# 配置SwitchB

[~SwitchB] interface meth 0/0/0
[~SwitchB-MEth0/0/0] ip address 10.1.1.2 24
[*SwitchB-MEth0/0/0] quit
[*SwitchB] commit
在SwitchA和SwitchB上分别创建DFS并绑定管理网口的IP地址
SwitchA和SwitchB管理网口需要保证能够三层互通。

# 配置SwitchA。

[~SwitchA] dfs-group 1
[*SwitchA-dfs-group-1] source ip 10.1.1.1
[*SwitchA-dfs-group-1] priority 150
[*SwitchA-dfs-group-1] quit
[*SwitchA] commit

# 配置SwitchB

[~SwitchB] dfs-group 1
[*SwitchB-dfs-group-1] source ip 10.1.1.2
[*SwitchB-dfs-group-1] priority 120
[*SwitchB-dfs-group-1] quit
[*SwitchB] commit
配置SwitchA和SwitchB之间的Peer-link

# 配置SwitchA。

[~SwitchA] interface eth-trunk 0
[*SwitchA-Eth-Trunk0] trunkport 10ge 1/0/3
[*SwitchA-Eth-Trunk0] trunkport 10ge 2/0/4
[*SwitchA-Eth-Trunk0] undo stp enable
[*SwitchA-Eth-Trunk0] mode lacp-static
[*SwitchA-Eth-Trunk0] peer-link 1
[*SwitchA-Eth-Trunk0] quit
[*SwitchA] commit

# 配置SwitchB

[~SwitchB] interface eth-trunk 0
[*SwitchB-Eth-Trunk0] trunkport 10ge 1/0/3
[*SwitchB-Eth-Trunk0] trunkport 10ge 2/0/4
[*SwitchB-Eth-Trunk0] undo stp enable
[*SwitchB-Eth-Trunk0] mode lacp-static
[*SwitchB-Eth-Trunk0] peer-link 1
[*SwitchB-Eth-Trunk0] quit
[*SwitchB] commit

配置SwitchA和SwitchB连接服务器的Eth-Trunk接口加入VLAN 11并绑定DFS Group
服务器上行连接交换机的端口需要绑定在一个聚合链路中且链路聚合模式需要和交换机侧的聚合模式匹配。

# 配置SwitchA。

[~SwitchA] vlan batch 11
[*SwitchA] interface eth-trunk 1
[*SwitchA-Eth-Trunk1] mode lacp-dynamic
[*SwitchA-Eth-Trunk1] port link-type access
[*SwitchA-Eth-Trunk1] port default vlan 11
[*SwitchA-Eth-Trunk1] dfs-group 1 m-lag 1
[*SwitchA-Eth-Trunk1] quit
[*SwitchA] commit

# 配置SwitchB

[~SwitchB] vlan batch 11
[*SwitchB] interface eth-trunk 1
[*SwitchB-Eth-Trunk1] mode lacp-dynamic
[*SwitchB-Eth-Trunk1] port link-type access
[*SwitchB-Eth-Trunk1] port default vlan 11
[*SwitchB-Eth-Trunk1] dfs-group 1 m-lag 1
[*SwitchB-Eth-Trunk1] quit
[*SwitchB] commit

配置SwitchA和SwitchC之间为聚合链路以及SwitchB和SwitchD之间为聚合链路,并配置接口类型和通过的VLAN

# 配置SwitchA

[~SwitchA] interface eth-trunk 2
[*SwitchA-Eth-Trunk2] mode lacp-static
[*SwitchA-Eth-Trunk2] port link-type trunk
[*SwitchA-Eth-Trunk2] port trunk allow-pass vlan 11
[*SwitchA-Eth-Trunk2] trunkport 10ge 1/0/1
[*SwitchA-Eth-Trunk2] trunkport 10ge 1/0/2
[*SwitchA-Eth-Trunk2] quit
[*SwitchA] commit

# 配置SwitchB

[~SwitchB] interface eth-trunk 2
[*SwitchB-Eth-Trunk2] mode lacp-static
[*SwitchB-Eth-Trunk2] port link-type trunk
[*SwitchB-Eth-Trunk2] port trunk allow-pass vlan 11
[*SwitchB-Eth-Trunk2] trunkport 10ge 1/0/1
[*SwitchB-Eth-Trunk2] trunkport 10ge 1/0/2
[*SwitchB-Eth-Trunk2] quit
[*SwitchB] commit

# 配置SwitchC

[~SwitchC] vlan batch 11
[*SwitchC] interface eth-trunk 2
[*SwitchC-Eth-Trunk2] mode lacp-static
[*SwitchC-Eth-Trunk2] port link-type trunk
[*SwitchC-Eth-Trunk2] port trunk allow-pass vlan 11
[*SwitchC-Eth-Trunk2] trunkport 10ge 1/0/1
[*SwitchC-Eth-Trunk2] trunkport 10ge 1/0/2
[*SwitchC-Eth-Trunk2] quit
[*SwitchC] commit

# 配置SwitchD

[~SwitchD] vlan batch 11
[*SwitchD] interface eth-trunk 2
[*SwitchD-Eth-Trunk2] mode lacp-static
[*SwitchD-Eth-Trunk2] port link-type trunk
[*SwitchD-Eth-Trunk2] port trunk allow-pass vlan 11
[*SwitchD-Eth-Trunk2] trunkport 10ge 1/0/1
[*SwitchD-Eth-Trunk2] trunkport 10ge 1/0/2
[*SwitchD-Eth-Trunk2] quit
[*SwitchD] commit

在SwitchC和SwitchD上创建VLANIF接口并配置IP地址,在VLANIF接口上创建VRRP备份组
# 在SwitchC上创建VRRP备份组1,配置SwitchC在该备份组中的优先级为120[~SwitchC] interface vlanif 11
[*SwitchC-Vlanif11] ip address 10.2.1.1 24
[*SwitchC-Vlanif11] vrrp vrid 1 virtual-ip 10.2.1.111
[*SwitchC-Vlanif11] vrrp vrid 1 priority 120
[*SwitchC-Vlanif11] quit
[*SwitchC] commit

# 在SwitchD上创建VRRP备份组1,其在该备份组中的优先级为缺省值100[~SwitchD] interface vlanif 11
[*SwitchD-Vlanif11] ip address 10.2.1.2 24
[*SwitchD-Vlanif11] vrrp vrid 1 virtual-ip 10.2.1.111
[*SwitchD-Vlanif11] quit
[*SwitchD] commit
  • 2
    点赞
  • 33
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值