h3c m-lag简单配置案例_服务器


#SWA配置
 [SWA]m-lag system-mac a08e-80d2-0100 #相同,建议选主设备为系统MAC
 [SWA]m-lag system-number 1 #主设备为1,备设备为2
 [SWA]m-lag system-priority 123 #相同优先级
 [SWA]m-lag keepalive ip destination 1.1.1.2 source 1.1.1.1
[SWA]int g1/0/24
 [SWA-GigabitEthernet1/0/24]po li rou
 [SWA-GigabitEthernet1/0/24]ip add 1.1.1.1 30
 [SWA]m-lag mad exclude int g1/0/24 #设置keepalive口为保留口,不会被shutdown[SWA]int br 1 #peer-link口
 [SWA-Bridge-Aggregation1]link mo dy #动态模式[SWA]int rang g1/0/1 g1/0/2
 [SWA-if-range]po li gr 1[SWA]int br 1
 [SWA-Bridge-Aggregation1]port m-lag peer-link 1 #设置为peer-link口[SWA]int br 100 #下联的m-lag口
 [SWA-Bridge-Aggregation100]link mo dy
 [SWA]int g1/0/3
 [SWA-GigabitEthernet1/0/3]po li gr 100
 [SWA]int br 100
 [SWA-Bridge-Aggregation100]port m-lag group 100 #设置m-lag组为100#SWB配置
 [SWB]m-lag system-mac a08e-80d2-0100 #相同,建议选主设备为系统MAC
 [SWB]m-lag system-number 2 #主设备为1,备设备为2
 [SWB]m-lag system-priority 123 #相同优先级
 [SWB]m-lag keepalive ip destination 1.1.1.1 source 1.1.1.2[SWB]int g1/0/24
 [SWB-GigabitEthernet1/0/24]po li rou
 [SWB-GigabitEthernet1/0/24]ip add 1.1.1.2 30
 [SWB]m-lag mad exclude int g1/0/24 #设置keepalive口为保留口,不会被shutdown[SWB]int br 1 #peer-link口
 [SWB-Bridge-Aggregation1]link mo dy #动态模式
 [SWB]int rang g1/0/1 g1/0/2
 [SWB-if-range]po li gr 1
 [SWB]int br 1
 [SWB-Bridge-Aggregation1]port m-lag peer-link 1 #设置为peer-link口[SWB]int br 100 #下联的m-lag口
 [SWB-Bridge-Aggregation100]link mo dy
 [SWB]int g1/0/3
 [SWB-GigabitEthernet1/0/3]po li gr 100
 [SWB]int br 100
 [SWB-Bridge-Aggregation100]port m-lag group 100 #设置m-lag组为100#备注
 本实验中,SWB的配置与SWA相比较,仅以下不同
 (1)系统编号不同
 (2)Keepalive配置不同,如接口IP和源目IP#SWC配置
 [SWC]int br 100
 [SWC-Bridge-Aggregation100]link mo dy
 [SWC-Bridge-Aggregation100]int rang g1/0/1 g1/0/2#如果HCL模拟器的M-LAG起不来,两边配置以下命令,忽略一致性检查
 #仅实验目的,生产环境需谨慎
 m-lag consistency-check disable#看状态
 (1)[SWA]display m-lag keepalive
 Neighbor keepalive link status (cause): Up
 Neighbor is alive for: 1003 s 776 ms
 Keepalive packet transmission status:
 Sent: Successful
 Received: Successful
 Last received keepalive packet information:
 Source IP address: 1.1.1.2
 Time: 2023/06/28 17:58:38
 Action: AcceptM-LAG keepalive parameters:
 Destination IP address: 1.1.1.2
 Source IP address: 1.1.1.1
 Keepalive UDP port : 6400
 Keepalive VPN name : N/A
 Keepalive interval : 1000 ms
 Keepalive timeout : 5 sec
 Keepalive hold time: 3 sec
 (2)[SWA]display m-lag summary
 Flags: A – Aggregate interface down, B – No peer M-LAG interface configured
 C – Configuration consistency check failedPeer-link interface: BAGG1
 Peer-link interface state (cause): UP
 Keepalive link state (cause): UPM-LAG interface information
 M-LAG IF M-LAG group Local state (cause) Peer state Remaining down time(s)
 BAGG100 100 UP UP -