华为多级m-lag简单配置案例

需求分析:

1、配置设备组建M-LAG系统,配置服务器M-LAG双归接入IP网络。

2、配置Monitor Link关联上行接口和下行接口,避免因上行链路故障导致流量丢弃,使用命令timer recover-time配置回切时间,防止上行链路故障回切后因为路由没有收敛而导致丢包。

3、Leaf1A与Leaf1B之间组建M-LAG系统,Peer-Link接口为Eth-Trunk0,成员接口为各设备上的10 GE1/0/11与10GE1/0/12接口。

4、Leaf设备的网关规划连接VM1的物理口允许Vlan1300通过,连接VM2的物理口允许Vlan1301通过。

5、Spine1与Leaf1A、Leaf1B之间运行OSPF协议,所有接口均属于OSPF区域0(包括Loopback1接口),Spine1上Loopback1接口IP地址模拟服务器需要访问的外部地址。

表1-1 设备互联接口IP



Leaf1A配置

Leaf1A interface LoopBack1

Leaf1A-LoopBack0 ip address 10.6.140.4 32

Leaf1A-LoopBack0 quit

Leaf1A interface 10GE1/0/1

Leaf1A-10GE1/0/1 undo portswitch

Leaf1A-10GE1/0/1 ip address 192.168.140.6 30

Leaf1A-10GE1/0/1 quit

m-lag配置

Leaf1A stp mode rstp

Leaf1A stp v-stp enable

Leaf1A dfs-group 1

Leaf1A-dfs-group-1 source ip 10.6.140.4 //这条命令可能不支持就用这个dual-active detection source ip XX peer XX

Leaf1A-dfs-group-1 priority 150

Leaf1A-dfs-group-1 quit

Leaf1A interface eth-trunk 0

Leaf1A-Eth-Trunk0 trunkport 10ge 1/0/11

Leaf1A-Eth-Trunk0 trunkport 10ge 1/0/12

Leaf1A-Eth-Trunk0 mode lacp-static

Leaf1A-Eth-Trunk0 peer-link 1

Leaf1A-Eth-Trunk0 quit

在Leaf1A上配置连接VM1接口的M-LAG工作组

Leaf1A interface eth-trunk 1

Leaf1A -Eth-Trunk1 trunkport 10GE 1/0/47

Leaf1A -Eth-Trunk1 port link-type trunk

Leaf1A -Eth-Trunk1 undo port trunk allow-pass vlan 1

Leaf1A -Eth-Trunk1 mode lacp-static

Leaf1A -Eth-Trunk1 dfs-group 1 m-lag 1

Leaf1A -Eth-Trunk1 quit

Leaf1A interface eth-trunk 2

Leaf1A -Eth-Trunk2 trunkport 10GE 1/0/48

Leaf1A -Eth-Trunk2 port link-type trunk

Leaf1A -Eth-Trunk2 undo port trunk allow-pass vlan 1

Leaf1A -Eth-Trunk2 mode lacp-static

Leaf1A -Eth-Trunk2 dfs-group 1 m-lag 2

Leaf1A -Eth-Trunk2 quit

步骤 3 配置网关和OSPF协议

配置M-LAG工作组的允许通过的vlan和创建vlanif

在Leaf1A上配置连接VM1接口的M-LAG工作组允许通过的vlan和创建vlanif

Leaf1Avlan 1300

Leaf1A-vlan1300quit

Leaf1Ainterface Eth-Trunk1

Leaf1A-Eth-Trunk1port trunk allow-pass vlan 1300

Leaf1A-Eth-Trunk1 quit

Leaf1Ainterface Vlanif 1300

Leaf1A-Vlanif1300 ip address 192.168.10.254 24

Leaf1A-Vlanif1300mac-address 0000-5e00-0101

在Leaf1A上配置连接VM2接口的M-LAG工作组允许通过的vlan和创建vlanif

Leaf1Avlan 1301

Leaf1A-vlan1301quit

Leaf1Ainterface Eth-Trunk2

Leaf1A-Eth-Trunk2port trunk allow-pass vlan 1301

Leaf1A-Eth-Trunk2 quit

Leaf1Ainterface Vlanif 1301

Leaf1A-Vlanif1301 ip address 192.168.20.254 24

Leaf1A-Vlanif1301mac-address 0000-5e00-0102

在Leaf1A上配置OSPF,将互联接口、Loopback1接口、Vlanif接口宣告进OSPF中。

Leaf1Aospf 1 router-id 10.6.140.4

Leaf1A-ospf-1 area 0

Leaf1A-ospf-1-area-0.0.0.0 network 10.6.140.4 0.0.0.0

Leaf1A-ospf-1-area-0.0.0.0 network 192.168.140.4 0.0.0.3

Leaf1A-ospf-1-area-0.0.0.0 network 192.168.10.0 0.0.0.255

Leaf1A-ospf-1-area-0.0.0.0 network 192.168.20.0 0.0.0.255

Leaf1A-ospf-1-area-0.0.0.0 quit

Leaf1A-ospf-1 quit

Leaf增加Monitor-link配置,下行接口需要添加所有业务接口。

Leaf1A配置如下:

Leaf1A monitor-link group 1

Leaf1A-mtlk-group1 port 10GE1/0/1 uplink

Leaf1A-mtlk-group1 port 10GE1/0/47 downlink 1

Leaf1A-mtlk-group1 port 10GE1/0/48 downlink 2

Leaf1A-mtlk-group1 timer recover-time 60

Leaf1A-mtlk-group1 quit

Leaf1B配置

Leaf1B interface LoopBack1

Leaf1B-LoopBack1 ip address 10.6.140.5 32

Leaf1B-LoopBack1 quit

Leaf1B interface 10GE1/0/1

Leaf1B-10GE1/0/1 undo portswitch

Leaf1B-10GE1/0/1 ip address 192.168.140.10 30

Leaf1B-10GE1/0/1 quit

m-lag配置

Leaf1B stp mode rstp

Leaf1B stp v-stp enable

Leaf1B dfs-group 1

Leaf1B-dfs-group-1 source ip 10.6.140.5 //这条命令可能不支持就用这个dual-active detection source ip XX peer XX

Leaf1B-dfs-group-1 priority 120

Leaf1B-dfs-group-1 quit

Leaf1B interface eth-trunk 0

Leaf1B-Eth-Trunk0 trunkport 10ge 1/0/11

Leaf1B-Eth-Trunk0 trunkport 10ge 1/0/12

Leaf1B-Eth-Trunk0 mode lacp-static

Leaf1B-Eth-Trunk0 peer-link 1

Leaf1B-Eth-Trunk0 quit

在Leaf1B上配置连接VM1接口的M-LAG工作组

Leaf1B interface eth-trunk 1

Leaf1B -Eth-Trunk1 trunkport 10GE 1/0/47

Leaf1B -Eth-Trunk1 port link-type trunk

Leaf1B -Eth-Trunk1 undo port trunk allow-pass vlan 1

Leaf1B -Eth-Trunk1 mode lacp-static

Leaf1B -Eth-Trunk1 dfs-group 1 m-lag 1

Leaf1B -Eth-Trunk1 quit

Leaf1B interface eth-trunk 2

Leaf1B -Eth-Trunk2 trunkport 10GE 1/0/48

Leaf1B -Eth-Trunk2 port link-type trunk

Leaf1B -Eth-Trunk2 undo port trunk allow-pass vlan 1

Leaf1B -Eth-Trunk2 mode lacp-static

Leaf1B -Eth-Trunk2 dfs-group 1 m-lag 2

Leaf1B -Eth-Trunk2 quit

在Leaf1B上配置连接VM1接口的M-LAG工作组允许通过的vlan和创建vlanif

Leaf1Bvlan 1300

Leaf1B-vlan1300quit

Leaf1Binterface Eth-Trunk1

Leaf1B-Eth-Trunk1port trunk allow-pass vlan 1300

Leaf1B-Eth-Trunk1 quit

Leaf1Binterface Vlanif 1300

Leaf1B-Vlanif1300 ip address 192.168.10.254 24

Leaf1B-Vlanif1300mac-address 0000-5e00-0101

在Leaf1B上配置连接VM2接口的M-LAG工作组允许通过的vlan和创建vlanif

Leaf1Bvlan 1301

Leaf1B-vlan1301quit

Leaf1Binterface Eth-Trunk2

Leaf1B-Eth-Trunk2port trunk allow-pass vlan 1301

Leaf1B-Eth-Trunk2 quit

Leaf1Binterface Vlanif 1301

Leaf1B-Vlanif1301 ip address 192.168.20.254 24

Leaf1B-Vlanif1301mac-address 0000-5e00-0102

在Leaf1B上配置OSPF,将互联接口、Loopback1接口、Vlanif接口宣告进OSPF中。

Leaf1Bospf 1 router-id 10.6.140.5

Leaf1B-ospf-1 area 0

Leaf1B-ospf-1-area-0.0.0.0 network 10.6.140.5 0.0.0.0

Leaf1B-ospf-1-area-0.0.0.0 network 192.168.140.8 0.0.0.3

Leaf1B-ospf-1-area-0.0.0.0 network 192.168.10.0 0.0.0.255

Leaf1B-ospf-1-area-0.0.0.0 network 192.168.20.0 0.0.0.255

Leaf1B-ospf-1-area-0.0.0.0 quit

Leaf1B-ospf-1 quit

Leaf1B Mointer-link配置如下:

Leaf1B monitor-link group 1

Leaf1B-mtlk-group1 port 10GE1/0/1 uplink

Leaf1B-mtlk-group1 port 10GE1/0/47 downlink 1

Leaf1B-mtlk-group1 port 10GE1/0/48 downlink 2

Leaf1B-mtlk-group1 timer recover-time 60

Leaf1B-mtlk-group1 quit

Spine1配置

Spine1 interface LoopBack1

Spine1-LoopBack1 ip address 10.6.140.2 32

Spine1-LoopBack1 quit

Spine1 interface 25GE1/1/1

Spine1-25GE1/1/1 port mode 10G

Spine1-25GE1/1/1 y

Spine1-25GE1/1/1 undo portswitch

Spine1-25GE1/1/1 ip address 192.168.140.5 30

Spine1-25GE1/1/1 quit

Spine1 interface 25GE1/1/2

Spine1-25GE1/1/2 undo portswitch

Spine1-25GE1/1/2 ip address 192.168.140.9 30

Spine1-25GE1/1/2 quit

在Spine1上配置OSPF,将互联接口、Loopback1接口宣告进OSPF中。

Spine1ospf 1 router-id 10.6.140.2

Spine1-ospf-1 area 0

Spine1-ospf-1-area-0.0.0.0 network 10.6.140.2 0.0.0.0

Spine1-ospf-1-area-0.0.0.0 network 192.168.140.4 0.0.0.3

Spine1-ospf-1-area-0.0.0.0 network 192.168.140.8 0.0.0.3

Spine1-ospf-1-area-0.0.0.0 quit

Spine1-ospf-1 quit

相关推荐
云端漫步19875 小时前
HarmonyOS 互动卡片(Live Form)入门指南:双态架构与场景动效全景解析
华为·架构·harmonyos
記億揺晃着的那天6 小时前
NAS 内网域名访问为什么需要浏览器授权
网络·nginx·js·nas
chunmiao30326 小时前
DeepSeek V4-Pro 正式版上线,API 8月17日起分时调价
网络·安全
迪康Defender8 小时前
AI 重构终端安全运营:智能分析中枢 AI Insight 模块架构与落地场景深度解析
运维·网络·人工智能·其他·安全·重构·架构
0x539 小时前
Java网络编程(二)
java·服务器·网络
西安景驰电子11 小时前
《PTP精确时间协议系列》第一篇:从原理到应用,全面解读IEEE 1588
linux·运维·服务器·开发语言·网络·windows·php
ZGi.ai11 小时前
多模型回答不稳定:路由规则与评测方法
网络·人工智能·大模型评测·多模型·模型路由·zgi·模型网关
80s77712 小时前
独享住宅IP、长效代理ip是什么?有哪些作用?
网络·网络协议·tcp/ip
IPdodo_12 小时前
静态 IP、住宅 IP 和固定出口有什么区别?开发场景选型指南
服务器·网络·网络协议·tcp/ip·代理ip
_ZHOURUI_H_13 小时前
Unity TCP底层极限拆解:粘包、半包、CRC、序列号、双缓冲到底怎么一起工作的?
网络·网络协议·tcp/ip·游戏·unity·游戏引擎·游戏开发