Example for Configuring Dynamic Routing Protocols for Communication with an M-LAG
Applicable Products and Versions
This example applies to CE16800, CE6881, CE6820, CE6863, CE5881, CE6881K, CE6881E, and CE6863K series switches running V200R020C00 or later versions.
For details about the mapping between software versions and switch models, see the Hardware Query Tool.
Networking Requirements
In Figure 1-22, SwitchB and SwitchC establish an M-LAG, and M-LAG member interfaces on SwitchB and SwitchC support dynamic routing protocols. You can configure dynamic routing protocols on SwitchA so that SwitchA can communicate with the M-LAG through Layer 3 routes.
Device Name |
Interface Number |
VLAN and IP Address |
Connected Device and Interface Number |
---|---|---|---|
SwitchA |
Eth-Trunk 10
|
VLAN 100: IPv4 address 10.100.0.2/24 VLAN 101: IPv6 address 2001:DB8:101::2/64 VLAN 102: IPv4 address 10.102.0.2/24 VLAN 103: IPv6 address 2001:DB8:103::2/64 |
SwitchB: Eth-Trunk 10
|
SwitchC: Eth-Trunk 10
|
|||
SwitchB |
Management interface |
10.200.1.1/24 |
- |
10GE1/0/1 |
IP address: 192.168.1.1/24 IPv6 address: 2001:DB8:1::1/64 |
SwitchD: 10GE1/0/1 |
|
Eth-Trunk 1
|
- |
SwitchC: Eth-Trunk 1
|
|
Eth-Trunk 10
|
VLAN 100: IPv4 address 10.100.0.1/24 M-LAG IPv4 address 10.100.0.3/24 VLAN 101: IPv6 address 2001:DB8:101::1/64 M-LAG link-local address FE80:1000::1 VLAN 102: IPv4 address 10.102.0.1/24 M-LAG IPv4 address 10.102.0.3/24 VLAN 103: IPv6 address 2001:DB8:103::1/64 M-LAG IPv6 address 2001:DB8:103::3/64 |
SwitchA: Eth-Trunk 10
|
|
Loopback 1 |
10.2.2.2/32 |
- |
|
Loopback 2 |
10.3.3.3/32 |
- |
|
SwitchC |
Management interface |
10.200.2.1/24 |
- |
10GE1/0/1 |
192.168.2.1/24 2001:DB8:2::1/64 |
SwitchD: 10GE1/0/2 |
|
Eth-Trunk 1
|
- |
SwitchB: Eth-Trunk 1
|
|
Eth-Trunk 10
|
VLAN 100: IPv4 address 10.100.0.1/24 M-LAG IPv4 address 10.100.0.4/24 VLAN 101: IPv6 address 2001:DB8:101::1/64 M-LAG link-local address FE80:1000::2 VLAN 102: IPv4 address 10.102.0.1/24 M-LAG IPv4 address 10.102.0.4/24 VLAN 103: IPv6 address 2001:DB8:103::1/64 M-LAG IPv6 address 2001:DB8:103::4/64 |
SwitchA: Eth-Trunk 10
|
|
Loopback 1 |
10.2.2.2/32 |
- |
|
Loopback 2 |
10.4.4.4/32 |
- |
|
SwitchD |
10GE1/0/1 |
192.168.1.2/24 2001:DB8:1::2/64 |
SwitchB: 10GE1/0/1 |
10GE1/0/2 |
192.168.2.2/24 2001:DB8:2::2/64 |
SwitchC: 10GE1/0/1 |
|
Loopback 1 |
10.1.1.1/32 |
- |
Configuration Roadmap
The configuration roadmap is as follows:
- Configure SwitchA, SwitchB, and SwitchC to establish an M-LAG.
- Configure V-STP on SwitchB and SwitchC.
- Configure a DFS group on SwitchB and SwitchC, and bind IP addresses of management interfaces to the DFS group.
- Configure a peer-link between SwitchB and SwitchC.
- Configure M-LAG member interfaces on SwitchB and SwitchC and an Eth-Trunk interface on SwitchA.
- Configure Monitor Link on SwitchB and SwitchC.
Monitor Link associates uplink and downlink interfaces to prevent user-side traffic from being discarded due to an uplink fault.
- Configure OSPF over M-LAG.
- Configure OSPF on SwitchB, SwitchC, and SwitchD to implement Layer 3 connectivity.
- Configure IPv4 addresses for OSPF over M-LAG on SwitchB and SwitchC.
Configure different M-LAG IPv4 addresses on SwitchB and SwitchC. Otherwise, neighbor relationships of the routing protocol cannot be established.
- Configure an IP address for SwitchA to establish OSPF neighbor relationships with M-LAG member devices.
- Configure OSPFv3 over M-LAG.
- Configure OSPFv3 on SwitchB, SwitchC, and SwitchD to implement Layer 3 connectivity.
- Configure link-local addresses for OSPFv3 over M-LAG on SwitchB and SwitchC.
Configure different M-LAG link-local addresses on SwitchB and SwitchC. Otherwise, neighbor relationships of the routing protocol cannot be established.
- Configure an IPv6 address for SwitchA to establish OSPFv3 neighbor relationships with M-LAG member devices.
- Configure BGP over M-LAG.
- Configure BGP on SwitchB, SwitchC, and SwitchD to implement Layer 3 connectivity.
- Configure IPv4 addresses for BGP over M-LAG on SwitchB and SwitchC.
Configure different M-LAG IPv4 addresses on SwitchB and SwitchC. Otherwise, peer relationships of the routing protocol cannot be established.
- Configure SwitchA to establish BGP peer relationships with M-LAG member devices (SwitchB and SwitchC).
- Configure BGP4+ over M-LAG.
- Configure BGP4+ on SwitchB, SwitchC, and SwitchD to implement Layer 3 connectivity.
- Configure IPv6 addresses for BGP4+ over M-LAG on SwitchB and SwitchC.
Configure different M-LAG IPv6 addresses on SwitchB and SwitchC. Otherwise, peer relationships of the routing protocol cannot be established.
- Configure SwitchA to establish BGP4+ peer relationships with M-LAG member devices (SwitchB and SwitchC) and import routes.
Procedure
- Configure SwitchA, SwitchB, and SwitchC to establish an M-LAG.
- Configure OSPF over M-LAG.
- Configure OSPFv3 over M-LAG.
- Configure BGP over M-LAG.
- Configure BGP4+ over M-LAG.
- Verify the configuration.
Run the display dfs-group 1 m-lag command to check M-LAG information.
# Check information about the M-LAG with DFS group ID 1.
[~SwitchB] display dfs-group 1 m-lag * : Local node Heart beat state : OK Node 1 * Dfs-Group ID : 1 Priority : 100 Address : ip address 10.200.1.1 State : Master Causation : - System ID : 0025-9e95-7c11 SysName : SwitchB Version : V200R020C00 Device Type : CE16800 Node 2 Dfs-Group ID : 1 Priority : 100 Address : ip address 10.200.2.1 State : Backup Causation : - System ID : 0025-9e95-7c31 SysName : SwitchC Version : V200R020C00 Device Type : CE16800
# Check M-LAG information on SwitchB.
[~SwitchB] display dfs-group 1 node 1 m-lag brief * - Local node M-Lag ID Interface Port State Status Consistency-check 1 Eth-Trunk 10 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 SwitchC.
[~SwitchC] display dfs-group 1 node 2 m-lag brief * - Local node M-Lag ID Interface Port State Status Consistency-check 1 Eth-Trunk 10 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
Run the display ospf peer brief command on SwitchB, SwitchC, and SwitchA to check OSPF neighbor information.
# Check OSPF neighbor information on SwitchB.
[~SwitchB] display ospf peer brief OSPF Process 1 with Router ID 11.1.1.1 Peer Statistic Information Total number of peer(s): 3 Peer(s) in full state: 3 ---------------------------------------------------------------------------- Area Id Interface Neighbor id State 0.0.0.0 10GE1/0/1 11.3.3.3 Full 0.0.0.0 Vlanif100 11.2.2.2 Full 0.0.0.0 Vlanif100 11.4.4.4 Full
# Check OSPF neighbor information on SwitchC.
[~SwitchC] display ospf peer brief OSPF Process 1 with Router ID 11.2.2.2 Peer Statistic Information Total number of peer(s): 3 Peer(s) in full state: 3 ---------------------------------------------------------------------------- Area Id Interface Neighbor id State 0.0.0.0 10GE1/0/1 11.3.3.3 Full 0.0.0.0 Vlanif100 11.1.1.1 Full 0.0.0.0 Vlanif100 11.4.4.4 Full
# Check OSPF neighbor information on SwitchA.
[~SwitchA] display ospf peer brief OSPF Process 1 with Router ID 11.4.4.4 Peer Statistic Information Total number of peer(s): 2 Peer(s) in full state: 2 ---------------------------------------------------------------------------- Area Id Interface Neighbor id State 0.0.0.0 Vlanif100 11.1.1.1 Full 0.0.0.0 Vlanif100 11.2.2.2 Full
Run the display ospfv3 peer command on SwitchB, SwitchC, and SwitchA to check OSPFv3 neighbor information.
# Check OSPFv3 neighbor information on SwitchB.[~SwitchB] display ospfv3 peer OSPFv3 Process (1) Total number of peer(s): 3 Peer(s) in full state: 3 OSPFv3 Area (0.0.0.0) Neighbor ID Pri State Dead Time Interface Instance ID 10.13.13.13 1 Full/Backup 00:00:37 10GE1/0/1 0 10.14.14.14 1 Full/DROther 00:00:38 Vlanif101 0 10.15.15.15 1 Full/DR 00:00:40 Vlanif101 0
# Check OSPFv3 neighbor information on SwitchC.
[~SwitchC] display ospfv3 peer OSPFv3 Process (1) Total number of peer(s): 3 Peer(s) in full state: 3 OSPFv3 Area (0.0.0.0) Neighbor ID Pri State Dead Time Interface Instance ID 10.13.13.13 1 Full/DR 00:00:37 10GE1/0/1 0 10.12.12.12 1 Full/DROther 00:00:38 Vlanif101 0 10.15.15.15 1 Full/DR 00:00:40 Vlanif101 0
# Check OSPFv3 neighbor information on SwitchA.
[~SwitchA]display ospfv3 peer OSPFv3 Process (1) Total number of peer(s): 2 Peer(s) in full state: 2 OSPFv3 Area (0.0.0.0) Neighbor ID Pri State Dead Time Interface Instance ID 10.14.14.14 1 Full/DROther 00:00:38 Vlanif101 0 10.12.12.12 1 Full/Backup 00:00:40 Vlanif101 0
Run the display bgp peer command on SwitchB, SwitchC, and SwitchA to check BGP peer information.
# Check BGP peer information on SwitchB.
[~SwitchB] display bgp peer Status codes: * - Dynamic BGP local router ID : 11.12.12.12 Local AS number : 100 Total number of peers : 2 Peers in established state : 2 Total number of dynamic peers : 0 Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv 10.102.0.2 4 100 30 30 0 00:24:37 Established 0 192.168.1.2 4 100 64 66 0 00:54:13 Established 0
# Check BGP peer information on SwitchC.
[~SwitchC] display bgp peer Status codes: * - Dynamic BGP local router ID : 11.14.14.14 Local AS number : 100 Total number of peers : 59 Peers in established state : 2 Total number of dynamic peers : 0 Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv 10.102.0.2 4 100 34 33 0 00:26:56 Established 0 192.168.2.2 4 100 71 72 0 00:59:44 Established 0
# Check BGP peer information on SwitchA.
[~SwitchA] display bgp peer 2020-07-07 21:06:02.443 Status codes: * - Dynamic BGP local router ID : 11.15.15.15 Local AS number : 100 Total number of peers : 2 Peers in established state : 2 Total number of dynamic peers : 0 Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv 10.102.0.3 4 100 29 29 0 00:23:22 Established 0 10.102.0.4 4 100 29 30 0 00:23:18 Established 0
Run the display bgp ipv6 peer command on SwitchB, SwitchC, and SwitchA to check BGP4+ peer information.
# Check BGP4+ peer information on SwitchB.
[~SwitchB] display bgp ipv6 peer Status codes: * - Dynamic BGP local router ID : 11.12.12.12 Local AS number : 100 Total number of peers : 2 Peers in established state : 2 Total number of dynamic peers : 0 Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv 2001:DB8:1::2 4 100 61 61 0 00:50:07 Established 2 2001:DB8:103::2 4 100 5 6 0 00:02:18 Established 0
# Check BGP4+ peer information on SwitchC.
[~SwitchC] display bgp ipv6 peer Status codes: * - Dynamic BGP local router ID : 11.14.14.14 Local AS number : 100 Total number of peers : 2 Peers in established state : 2 Total number of dynamic peers : 0 Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv 2001:DB8:2::2 4 100 76 75 0 01:03:13 Established 2 2001:DB8:103::2 4 100 21 22 0 00:15:55 Established 0
# Check BGP4+ peer information on SwitchA.
[~SwitchA] display bgp ipv6 peer Status codes: * - Dynamic BGP local router ID : 11.15.15.15 Local AS number : 100 Total number of peers : 2 Peers in established state : 2 Total number of dynamic peers : 0 Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv 2001:DB8:103::3 4 100 7 7 0 00:03:02 Established 1 2001:DB8:103::4 4 100 7 6 0 00:02:33 Established 1
Configuration Files
SwitchA configuration file
# sysname SwitchA # vlan batch 100 to 103 # ospfv3 1 router-id 10.15.15.15 area 0.0.0.0 # interface Vlanif100 ip address 10.100.0.2 255.255.255.0 # interface Vlanif101 ipv6 enable ipv6 address 2001:DB8:101::2/64 ospfv3 1 area 0.0.0.0 # interface Vlanif102 ip address 10.102.0.2 255.255.255.0 # interface Vlanif103 ipv6 enable ipv6 address 2001:DB8:103::2/64 # interface Eth-Trunk10 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 100 101 102 103 mode lacp-static lacp mixed-rate link enable # interface 10GE1/0/1 eth-trunk 10 # interface 10GE1/0/2 eth-trunk 10 # interface 10GE1/0/3 eth-trunk 10 # interface 10GE1/0/4 eth-trunk 10 # bgp 100 router-id 11.15.15.15 peer 10.102.0.3 as-number 100 peer 10.102.0.4 as-number 100 peer 2001:DB8:103::3 as-number 100 peer 2001:DB8:103::4 as-number 100 # ipv4-family unicast peer 10.102.0.3 enable peer 10.102.0.4 enable # ipv6-family unicast peer 2001:DB8:103::3 enable peer 2001:DB8:103::4 enable # ospf 1 router-id 11.4.4.4 area 0.0.0.0 network 10.100.0.0 0.0.0.255 # return
SwitchB configuration file
# sysname Leaf # dfs-group 1 source ip 10.200.1.1 # vlan batch 100 to 103 # stp mode rstp stp v-stp enable # ospfv3 1 router-id 10.12.12.12 area 0.0.0.0 # interface Vlanif100 ip address 10.100.0.1 255.255.255.0 ospf source sub-address 10.100.0.3 mac-address 0000-5e00-0101 m-lag ip address 10.100.0.3 255.255.255.0 # interface Vlanif101 ipv6 enable ipv6 address 2001:DB8:101::1/64 ospfv3 1 area 0.0.0.0 mac-address 0000-5e00-0102 m-lag ipv6 address FE80:1000::1 link-local # interface Vlanif102 ip address 10.102.0.1 255.255.255.0 mac-address 0000-5e00-0103 m-lag ip address 10.102.0.3 255.255.255.0 # interface Vlanif103 ipv6 enable ipv6 address 2001:DB8:103::1/64 mac-address 0000-5e00-0104 m-lag ipv6 address 2001:DB8:103::3 # interface Eth-Trunk1 mode lacp-static peer-link 1 # interface Eth-Trunk10 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 100 101 102 103 stp edged-port enable mode lacp-static lacp mixed-rate link enable dfs-group 1 m-lag 1 # interface 10GE1/0/1 undo portswitch ipv6 enable ip address 192.168.1.1 255.255.255.0 ipv6 address 2001:DB8:1::1/64 ospfv3 1 area 0.0.0.0 # interface 10GE1/0/2 eth-trunk 10 # interface 10GE1/0/3 eth-trunk 10 # interface 10GE1/0/4 eth-trunk 1 # interface 10GE1/0/5 eth-trunk 1 # interface LoopBack1 ip address 10.2.2.2 255.255.255.255 # interface LoopBack2 ip address 10.3.3.3 255.255.255.255 # bgp 100 router-id 11.12.12.12 peer 10.102.0.2 as-number 100 peer 10.102.0.2 connect-interface Vlanif102 10.102.0.3 peer 192.168.1.2 as-number 100 peer 2001:DB8:1::2 as-number 100 peer 2001:DB8:103::2 as-number 100 peer 2001:DB8:103::2 connect-interface Vlanif103 2001:DB8:103::3 # ipv4-family unicast peer 10.102.0.2 enable peer 192.168.1.2 enable # ipv6-family unicast network 2001:DB8:1:: 64 peer 2001:DB8:1::2 enable peer 2001:DB8:103::2 enable # ospf 1 router-id 11.1.1.1 area 0.0.0.0 network 10.2.2.2 0.0.0.0 network 10.3.3.3 0.0.0.0 network 10.100.0.0 0.0.0.255 network 192.168.1.0 0.0.0.255 # return
SwitchC configuration file
# sysname SwitchC # dfs-group 1 source ip 10.200.2.1 # vlan batch 100 to 103 # stp mode rstp stp v-stp enable # ospfv3 1 router-id 10.14.14.14 area 0.0.0.0 # interface Vlanif100 ip address 10.100.0.1 255.255.255.0 ospf source sub-address 10.100.0.4 mac-address 0000-5e00-0101 m-lag ip address 10.100.0.4 255.255.255.0 # interface Vlanif101 ipv6 enable ipv6 address 2001:db8:101::1/64 ospfv3 1 area 0.0.0.0 mac-address 0000-5e00-0102 m-lag ipv6 address FE80:1000::2 link-local # interface Vlanif102 ip address 10.102.0.1 255.255.255.0 mac-address 0000-5e00-0103 m-lag ip address 10.102.0.4 255.255.255.0 # interface Vlanif103 ipv6 enable ipv6 address 2001:DB8:103::1/64 mac-address 0000-5e00-0104 m-lag ipv6 address 2001:DB8:103::4 # interface Eth-Trunk1 mode lacp-static peer-link 1 # interface Eth-Trunk10 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 100 101 102 103 stp edged-port enable mode lacp-static lacp mixed-rate link enable dfs-group 1 m-lag 1 # interface 10GE1/0/1 undo portswitch ipv6 enable ip address 192.168.2.1 255.255.255.0 ipv6 address 2001:db8:2::1/64 ospfv3 1 area 0.0.0.0 # interface 10GE1/0/2 eth-trunk 10 # interface 10GE1/0/3 eth-trunk 10 # interface 10GE1/0/4 eth-trunk 1 # interface 10GE1/0/5 eth-trunk 1 # interface LoopBack1 ip address 10.2.2.2 255.255.255.255 # interface LoopBack2 ip address 10.4.4.4 255.255.255.255 # bgp 100 router-id 11.14.14.14 peer 10.102.0.2 as-number 100 peer 10.102.0.2 connect-interface Vlanif102 10.102.0 peer 192.168.2.2 as-number 100 peer 2001:DB8:2::2 as-number 100 peer 2001:DB8:103::2 as-number 100 peer 2001:DB8:103::2 connect-interface Vlanif103 2001:DB8:103::4 # ipv4-family unicast peer 10.102.0.2 enable peer 192.168.2.2 enable # ipv6-family unicast network 2001:DB8:2:: 64 peer 2001:DB8:2::2 enable peer 2001:DB8:103::2 enable # ospf 1 router-id 11.2.2.2 area 0.0.0.0 network 10.2.2.2 0.0.0.0 network 10.4.4.4 0.0.0.0 network 10.100.0.0 0.0.0.255 network 192.168.2.0 0.0.0.255 # return
SwitchD configuration file
# sysname SwitchD # ospfv3 1 router-id 10.13.13.13 area 0.0.0.0 # interface 10GE1/0/1 undo portswitch ipv6 enable ip address 192.168.1.2 255.255.255.0 ipv6 address 2001:db8:1::2/64 ospfv3 1 area 0.0.0.0 # interface 10GE1/0/2 undo portswitch ipv6 enable ip address 192.168.2.2 255.255.255.0 ipv6 address 2001:db8:2::2/64 ospfv3 1 area 0.0.0.0 # interface LoopBack1 ip address 10.1.1.1 255.255.255.255 # bgp 100 router-id 11.13.13.13 peer 192.168.1.3 as-number 100 peer 192.168.2.1 as-number 100 peer 2001:db8:1::1 as-number 100 peer 2001:db8:2::1 as-number 100 # ipv4-family unicast peer 192.168.1.3 enable peer 192.168.2.1 enable # ipv6-family unicast network 2001:db8:1:: 64 network 2001:db8:2:: 64 peer 2001:db8:1::1 enable peer 2001:db8:2::1 enable # ospf 1 router-id 11.3.3.3 area 0.0.0.0 network 10.1.1.1 0.0.0.0 network 192.168.1.0 0.0.0.255 network 192.168.2.0 0.0.0.255 # return