Example for Deploying M-LAG to Connect the Device to an Ethernet Network in Dual-Homing Mode Through the Root Bridge
Networking Requirements
As shown in Figure 4-22, a server is dual-homed to an Ethernet network through M-LAG. The customer requires high service reliability. Link aggregation between the server and devices only achieves link-level reliability, and a fault on a device may cause service interruption. M-LAG can be configured. When devices work properly, links load balance traffic and a fault of any device does not affect services. High service reliability is therefore ensured. On an Ethernet network, the blocked interface cannot transmit heartbeat packets of M-LAG master and backup devices; therefore, a DFS group is configured and bound to the IP address of the management interface to ensure that heartbeat packets of M-LAG master and backup devices can be transmitted normally.
Configuration Roadmap
Configure SwitchA and SwitchB as the root bridge and configure the same bridge ID to ensure that M-LAG master and backup devices are used as root bridges.
Configure IP addresses for management interfaces on SwitchA and SwitchB to ensure Layer 3 connectivity and transmission of heartbeat packets of M-LAG master and backup devices.
Configure M-LAG on SwitchA and SwitchB so that the server is dual-homed to SwitchA and SwitchB.
Create VLANIF interfaces on SwitchC and SwitchD and configure IP addresses for the VLANIF interfaces. Create VRRP groups on the VLANIF interfaces and configure VRRP groups as gateways of M-LAG master and backup devices.
Procedure
- Configure SwitchA and SwitchB as root bridges and configure the same bridge ID for them.
If the two devices that constitute an M-LAG connect to downstream switching devices, you must configure root protection.
# Configure 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
# Configure 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
- Configure IP addresses for management interfaces on SwitchA and SwitchB.
# Configure 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
# Configure 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
- Create a DFS group and bind IP addresses of management interfaces to the DFS group on SwitchA and SwitchB.
Configure IP addresses for management interfaces on SwitchA and SwitchB to ensure Layer 3 connectivity.
# Configure 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
# Configure 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
- Configure the link between SwitchA and SwitchB as a peer-link.
# Configure 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
# Configure 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
- Add Eth-Trunks that connect SwitchA and SwitchB to the server to VLAN 11 and bind the Eth-Trunks to the DFS group.
The uplink interface of the server connected to the switch needs to be bound to an aggregation link, and the link aggregation modes on the server and switch must be consistent.
# Configure 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
# Configure 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
- Configure the links between SwitchA and SwitchC and between SwitchB and SwitchD as aggregated links, and configure interface types and allowed VLANs.
# Configure 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
# Configure 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
# Configure 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
# Configure 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
- Create VLANIF interfaces on SwitchC and SwitchD and configure IP addresses for the VLANIF interfaces. Create VRRP groups on the VLANIF interfaces.
# Configure VRRP group 1 on SwitchC and set the priority of SwitchC to 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
# Configure VRRP group 1 on SwitchD. SwitchD uses default priority 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
- Verify the configuration.
Run the display dfs-group command to check M-LAG information.
# Check information about the M-LAG with DFS group 1.
[~SwitchA] display dfs-group 1 m-lag * : Local node Heart beat state : OK Node 1 * Dfs-Group ID : 1 Priority : 150 Address : ip address 10.1.1.1 State : Master Causation : - System ID : 0025-9e95-7c31 SysName : SwitchA Version : V100R006C00 Device Type : CE12800 Node 2 Dfs-Group ID : 1 Priority : 120 Address : ip address 10.1.1.2 State : Backup Causation : - System ID : 0025-9e95-7c11 SysName : SwitchB Version : V100R006C00 Device Type : CE12800
# Check M-LAG information on SwitchA.
[~SwitchA] display dfs-group 1 node 1 m-lag brief * - Local node M-Lag ID Interface Port State Status Consistency-check 1 Eth-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 inconsistent 6 -- The number of M-LAG members is inconsistent
# Check M-LAG information on SwitchB.
[~SwitchA] display dfs-group 1 node 2 m-lag brief * - Local node M-Lag ID Interface Port State Status Consistency-check 1 Eth-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 inconsistent 6 -- The number of M-LAG members is inconsistent
In the preceding command outputs, the value of Heart beat state is OK, indicating that the heartbeat is normal. SwitchA is used as Node 1, its priority is 150, and its status is Master. SwitchB is used as Node 2, its priority is 120, and its status is Backup. The value of Causation is -, and the values of Port State of Node 1 and Node 2 are both Up, and the M-LAG status of Node 1 and Node 2 is both active, indicating that the M-LAG configuration is correct.
Run the display vrrp command on SwitchC and SwitchD. You can see that SwitchC is in Master state and SwitchD is in Backup state.
[~SwitchC] display vrrp verbose Vlanif11 | Virtual Router 1 State : Master Virtual IP : 10.2.1.111 Master IP : 10.2.1.1 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 120 Preempt : YES Delay Time : 0s Remain : -- TimerRun : 1s TimerConfig : 1s Auth Type : NONE Virtual MAC : 0000-5e00-0101 Check TTL : YES Config Type : Normal Create Time : 2020-01-30 11:39:18 Last Change Time : 2020-02-04 11:38:58
[~SwitchD] display vrrp verbose Vlanif11 | Virtual Router 1 State : Backup Virtual IP : 10.2.1.111 Master IP : 10.2.1.1 PriorityRun : 100 PriorityConfig : 100 MasterPriority : 120 Preempt : YES Delay Time : 0s Remain : -- TimerRun : 1s TimerConfig : 1s Auth Type : NONE Virtual MAC : 0000-5e00-0101 Check TTL : YES Config Type : Normal Create Time : 2020-01-30 11:39:18 Last Change Time : 2020-02-04 11:38:58
Configuration Files
SwitchA configuration file
# sysname SwitchA # dfs-group 1 priority 150 source ip 10.1.1.1 # vlan batch 11 # stp bridge-address 0039-0039-0039 stp instance 0 root primary # interface MEth0/0/0 ip address 10.1.1.1 255.255.255.0 # interface Eth-Trunk0 stp disable mode lacp-static peer-link 1 # interface Eth-Trunk1 port default vlan 11 stp edged-port enable mode lacp-dynamic dfs-group 1 m-lag 1 # interface Eth-Trunk2 port link-type trunk port trunk allow-pass vlan 11 mode lacp-static # interface 10GE1/0/1 eth-trunk 2 # interface 10GE1/0/2 eth-trunk 2 # interface 10GE1/0/3 eth-trunk 0 # interface 10GE1/0/5 eth-trunk 1 # interface 10GE1/0/6 eth-trunk 1 # interface 10GE2/0/4 eth-trunk 0 # return
SwitchB configuration file
# sysname SwitchB # dfs-group 1 priority 120 source ip 10.1.1.2 # vlan batch 11 # stp bridge-address 0039-0039-0039 stp instance 0 root primary # interface MEth0/0/0 ip address 10.1.1.2 255.255.255.0 # interface Eth-Trunk0 stp disable mode lacp-static peer-link 1 # interface Eth-Trunk1 port default vlan 11 stp edged-port enable mode lacp-dynamic dfs-group 1 m-lag 1 # interface Eth-Trunk2 port link-type trunk port trunk allow-pass vlan 11 mode lacp-static # interface 10GE1/0/1 eth-trunk 2 # interface 10GE1/0/2 eth-trunk 2 # interface 10GE1/0/3 eth-trunk 0 # interface 10GE1/0/5 eth-trunk 1 # interface 10GE1/0/6 eth-trunk 1 # interface 10GE2/0/4 eth-trunk 0 # return
SwitchC configuration file
# sysname SwitchC # vlan batch 11 # interface Vlanif11 ip address 10.2.1.1 255.255.255.0 vrrp vrid 1 virtual-ip 10.2.1.111 vrrp vrid 1 priority 120 # interface Eth-Trunk2 port link-type trunk port trunk allow-pass vlan 11 mode lacp-static # interface 10GE1/0/1 eth-trunk 2 # interface 10GE1/0/2 eth-trunk 2 # return
SwitchD configuration file
# sysname SwitchD # vlan batch 11 # interface Vlanif11 ip address 10.2.1.2 255.255.255.0 vrrp vrid 1 virtual-ip 10.2.1.111 # interface Eth-Trunk2 port link-type trunk port trunk allow-pass vlan 11 mode lacp-static # interface 10GE1/0/1 eth-trunk 2 # interface 10GE1/0/2 eth-trunk 2 # return