驗(yàn))
1. 配置DeviceA、DeviceB、DeviceC建立M-LAG系統(tǒng)。配置DeviceB和DeviceC的V-STP。配置DeviceB和DeviceC的DFS Group并綁定管理網(wǎng)口的IP地址。配置DeviceB和DeviceC之間的peer-link鏈路。配置DeviceB和DeviceC的M-LAG成員接口DeviceA的Eth-Trunk接口。配置DeviceB和DeviceC的Monitor Link功能。說明Monitor Link將上行接口和下行接口關(guān)聯(lián)避免因上行鏈路故障導(dǎo)致用戶側(cè)流量無法轉(zhuǎn)發(fā)而丟棄。在華為 CloudEngine (CE) 數(shù)據(jù)中心交換機(jī)上配置 M-LAG跨設(shè)備鏈路聚合核心邏輯分為四個(gè)部分心跳線 (Keepalive)、控制組 (DFS Group)、數(shù)據(jù)同步線 (Peer-link) 以及 下行成員接口 (M-LAG Interface)。以下是一套標(biāo)準(zhǔn)的 M-LAG 配置步驟與完整命令。步驟步驟配置DeviceA、DeviceB、DeviceC建立M-LAG系統(tǒng)。1.配置DeviceB和DeviceC的V-STP。#配置DeviceB。DeviceC的配置與DeviceB類似這里不再贅述。HUAWEIsystem-view[~HUAWEI]sysname DeviceB[*HUAWEI]commit[~DeviceB]stp mode rstp[*DeviceB]stp v-stp enable[*DeviceB]commit2.配置DeviceB和DeviceC的DFS Group并綁定管理網(wǎng)口的IP地址。DeviceB和DeviceC管理網(wǎng)口需要保證能夠三層互通。#配置DeviceB。DeviceC的配置與DeviceB類似這里不再贅述。[~DeviceB]dfs-group 1[*DeviceB-dfs-group-1]dual-active detection source ip 10.200.1.1 peer 10.200.2.1[*DeviceB-dfs-group-1]authentication-mode hmac-sha256 password YsHsjx_202206[*DeviceB-dfs-group-1]quit[*DeviceB]commit3.配置DeviceB和DeviceC之間的peer-link鏈路。#配置DeviceB。DeviceC的配置與DeviceB類似這里不再贅述。[~DeviceB]interface eth-trunk 1[*DeviceB-Eth-Trunk1]mode lacp-static[*DeviceB-Eth-Trunk1]trunkport 100ge 1/0/4[*DeviceB-Eth-Trunk1]trunkport 100ge 1/0/5[*DeviceB-Eth-Trunk1]peer-link 1[*DeviceB-Eth-Trunk1]quit[*DeviceB]commit4.配置DeviceB和DeviceC的M-LAG成員接口DeviceA的Eth-Trunk接口。#配置DeviceB。DeviceC的配置與DeviceB類似這里不再贅述。[~DeviceB]interface eth-trunk 10[*DeviceB-Eth-Trunk10]mode lacp-static[*DeviceB-Eth-Trunk10]port link-type trunk[*DeviceB-Eth-Trunk10]lacp mixed-rate link enable[*DeviceB-Eth-Trunk10]trunkport 100ge 1/0/2[*DeviceB-Eth-Trunk10]trunkport 100ge 1/0/3[*DeviceB-Eth-Trunk10]dfs-group 1 m-lag 1[*DeviceB-Eth-Trunk10]quit[*DeviceB]commit#配置DeviceA。HUAWEIsystem-view[~HUAWEI]sysname DeviceA[*HUAWEI]commit[~DeviceA]interface eth-trunk 10[*DeviceA-Eth-Trunk10]mode lacp-static[*DeviceA-Eth-Trunk10]port link-type trunk[*DeviceA-Eth-Trunk10]trunkport 100ge 1/0/1 to 1/0/4[*DeviceA-Eth-Trunk10]quit[*DeviceA]commit5.配置DeviceB和DeviceC的Monitor Link功能。#配置DeviceB。DeviceC的配置與DeviceB類似這里不再贅述。[~DeviceB]monitor-link group 1[*DeviceB-mtlk-group1]port 100ge 1/0/1 uplink[*DeviceB-mtlk-group1]port eth-trunk 10 downlink 1[*DeviceB-mtlk-group1]quit[*DeviceB]committip:在真實(shí)數(shù)據(jù)中心環(huán)境尤其是二層網(wǎng)絡(luò)中為了防止 M-LAG 分裂引發(fā)二層環(huán)路還需要配置V-STP (虛擬生成樹)或?qū)⑷?MAC 地址設(shè)置一致。對接下端設(shè)備服務(wù)器或接入交換機(jī)時(shí)下端設(shè)備只需將接口配置為普通的 LACP 動(dòng)態(tài)鏈路聚合即可它會(huì)認(rèn)為自己連接的是同一臺(tái)交換機(jī)。