100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > 玩转华为数据中心交换机系列 | 配置M-LAG双归接入普通以太网络示例

玩转华为数据中心交换机系列 | 配置M-LAG双归接入普通以太网络示例

时间:2020-04-23 11:56:35

相关推荐

玩转华为数据中心交换机系列 | 配置M-LAG双归接入普通以太网络示例

素材来源:华为数据中心交换机配置指南

一边学习一边整理试验笔记,并与大家分享,侵权即删,谢谢支持!

附上汇总贴:玩转华为数据中心交换机系列 | 汇总_COCOgsta的博客-CSDN博客

组网需求

如图1所示,采用M-LAG方式将主机双归接入普通以太网络。由于用户对于业务的可靠性要求很高,如果主机和接入设备之间做链路聚合只能保证链路级的可靠性,接入设备发生故障时则会导致业务中断。这时用户可以采用跨设备链路聚合技术,正常工作时链路进行负载分担且任何一台设备故障对业务均没有影响,保证业务的高可靠性。由于普通以太网络中存在阻塞端口无法传输M-LAG主备设备的心跳报文,这里采用配置DFS Group绑定管理网口IP地址,保证M-LAG主备设备的心跳报文能够正常传输。

配置思路

将SwitchA和SwitchB配置为根桥,配置相同的桥ID,保证M-LAG主备设备在二层网络中处于根桥地位。分别在SwitchA和SwitchB上配置管理网口的IP地址,且保证能够三层互通,用于M-LAG主备设备间心跳报文的传输。分别在SwitchA和SwitchB上配置M-LAG特性,实现服务器的双归接入。在SwitchC和SwitchD上创建VLANIF接口并配置IP地址,在VLANIF接口上创建VRRP备份组,作为M-LAG主备设备的网关。

操作步骤

将SwitchA和SwitchB配置为根桥,配置相同的桥ID

# 配置SwitchA。

<HUAWEI> system-view[~HUAWEI] sysname SwitchA[*HUAWEI] commit[~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。

<HUAWEI> system-view[~HUAWEI] sysname SwitchB[*HUAWEI] commit[~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 1/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 1/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。

<HUAWEI> system-view[~HUAWEI] sysname SwitchC[*HUAWEI] commit[~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。

<HUAWEI> system-view[~HUAWEI] sysname SwitchD[*HUAWEI] commit[~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

验证配置结果执行命令display dfs-group,查看M-LAG的相关信息。

# 查看DFS Group编号为1的M-LAG信息。

[~SwitchA] display dfs-group 1 m-lag*: Local nodeHeart beat state : OKNode 1 *Dfs-Group ID : 1Priority : 150Address : ip address 10.1.1.1State: MasterCausation: -System ID: 00e0-fc95-7c31SysName : SwitchAVersion : V200R020C00Device Type : CE9860EINode 2Dfs-Group ID : 1Priority : 120Address : ip address 10.1.1.2State: BackupCausation: -System ID: 00e0-fc95-7c11SysName : SwitchBVersion : V200R020C00Device Type : CE9860EI

# 查看SwitchA上的M-LAG信息。

[~SwitchA] display dfs-group 1 node 1 m-lag brief* - Local nodeM-Lag IDInterfacePort State StatusConsistency-check1Eth-Trunk 1 Up active(*)-active--Failed reason:1 -- Relationship between vlan and port is inconsistent 2 -- STP configuration under the port is inconsistent 3 -- STP port priority configuration is inconsistent 4 -- LACP mode of M-LAG is inconsistent 5 -- M-LAG configuration is inconsistent6 -- The number of M-LAG members is inconsistent

# 查看SwitchB上的M-LAG信息。

[~SwitchA] display dfs-group 1 node 2 m-lag brief* - Local nodeM-Lag IDInterfacePort State StatusConsistency-check1Eth-Trunk 1 Up active-active(*)--Failed reason:1 -- Relationship between vlan and port is inconsistent 2 -- STP configuration under the port is inconsistent 3 -- STP port priority configuration is inconsistent 4 -- LACP mode of M-LAG is inconsistent 5 -- M-LAG configuration is inconsistent6 -- The number of M-LAG members is inconsistent

通过以上显示信息可以看到,“Heart beat state”的状态是“OK”,表明心跳状态正常;SwitchA作为Node 1,优先级为150,“State”的状态是“Master”;SwitchB作为Node 2,优先级为120,“State”的状态是“Backup”。同时“Causation”的状态是“-”,Node 1的“Port State”状态为“Up”,Node 2的“Port State”状态为“Up”,且Node 1和Node 2的M-LAG状态均为“active”,表明M-LAG的配置正确。

在SwitchC和SwitchD上分别执行display vrrp命令,可以看到SwitchC在备份组中的状态为Master,SwitchD在备份组中的状态为Backup。

[~SwitchC] display vrrp verboseVlanif11 | Virtual Router 1State : MasterVirtual IP: 10.2.1.111Master IP: 10.2.1.1PriorityRun : 120PriorityConfig : 120MasterPriority : 120Preempt : YES Delay Time : 0s Remain : -- TimerRun : 1s TimerConfig : 1s Auth Type: NONEVirtual MAC : 0000-5e00-0101 Check TTL: YES Config Type : Normal Create Time : -01-30 11:39:18 Last Change Time : -02-04 11:38:58

[~SwitchD] display vrrp verboseVlanif11 | Virtual Router 1State : BackupVirtual IP: 10.2.1.111Master IP: 10.2.1.1PriorityRun : 100PriorityConfig : 100MasterPriority : 120Preempt : YES Delay Time : 0s Remain : --TimerRun : 1sTimerConfig : 1sAuth Type: NONEVirtual MAC : 0000-5e00-0101Check TTL: YESConfig Type : Normal Create Time: -01-30 11:39:18 Last Change Time : -02-04 11:38:58

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。