Skip to content
Ask AI

MC-LAG Configuration Guide

MC-LAG (Multi Chassis Link Aggregation Group) is a mechanism for implementing cross-device link aggregation by aggregating one device with two other devices across the switch, retaining all the benefits of normal link aggregation while providing device-level redundancy. MC-LAG provides a horizontal virtualization technique that virtualizes two physical devices into a single logical device, and this virtualized “single device” is “one-to-one” with its connected uplink or downlink device for link aggregation.

As shown in figure above, the MC-LAG group is externally represented as a logical device for link aggregation; the MC-LAG switch group deploys Ethernet or LAG type peer-link for protocol information interaction between MC-LAG, as well as taking up the east-west traffic in case of failure scenarios. The MC-LAG group is externally presented as a single node, which does not pose a loop risk when implementing redundant backups, and the load balancing mode of link aggregation does not result in idle links, making link utilization more efficient. As shown in figure below, the Server side performs cross-device link aggregation with the other two devices Leaf1 and Leaf2 via the MC-LAG mechanism.

Refers to the two devices participating in the cross-device link aggregation group. The two MC-LAG peer devices assume the Active and Standby roles respectively. According to the comparison of the size of the local_ip and peer_ip numbers in the configuration information, the smaller number will be the Active side, the Client side of the TCP connection; the larger number will be the Standby side, the Server side of the TCP connection, and the Client side will initiate a connection request to the server.

Refers to a series of LAGs that participate in cross-device link aggregation.

The keep-alive link is a heartbeat detection link, typically implemented as a direct Layer 3 connection between MC-LAG peer, periodically sends heartbeat packet. It’s used for transmitting ICCP control protocol packets, synchronizing table information, establishing MC-LAG peer relationships, and implementing configuration consistency checks.

The peer-link refers to a direct physical link between MC-LAG peers, used to forward traffic when there is a failure in downstream links. Generally, it is recommended to be shared with keep-alive link for operational efficiency and resource optimization.

The DAD (Dual Active Detection) link is a layer 3 interoperable link used by MC-LAG peer to send dual-active detection packets, applicable in scenarios when the peer-link and keep-alive link are shared. When the keep-alive link is detected as disconnected, the system will automatically shut down all interfaces on the standby node except logical interfaces, management ports, and peer-link interfaces.

SONiC uses a lightweight ICCP protocol on the MC-LAG control plane, with only a small amount of consistency checking and packet synchronization while safeguarding functionality. ICCP (Inter-Chassis Communication Protocol), a standard protocol defined in RFC 7275, uses TCP port 8888 to establish a connection between MC-LAG peers, and the lightweight ICCP protocol performs configuration consistency checks, ARP table entry and MAC table entry synchronization.

The two MC-LAG peer devices establish ICCP neighbor with local_ip and peer_ip as the source and destination addresses of the TCP connection. When the ICCP connection is established, the MC-LAG peer modifies the APP_PORT_TABLE or APP_LAG_TABLE or APP_VXLAN_TUNNEL_TABLE table entry in APP_DB and disables the mac learning function of the peer-link, depending on the port type of the peer-link.

The following information is synchronized between MC-LAG peers.

  • System Information Synchronize the MAC addresses of MC-LAG member ports to ensure that the “system ID” field in the LACP packets sent from MC-LAG peer to Server is the same, so as to achieve cross-device link aggregation. To achieve cross-device link aggregation, when the Standby side receives the system MAC information of the Active side, it sends a netlink packet to modify the system ID of the local MC-LAG member port to be the same as that of the Active side.
  • MC-LAG member port configuration information Records information such as the name of the local and peer MC-LAG member ports, which is used for consistency checking.
  • MC-LAG member port status information The local and peer-LAG member port status is recorded to ensure the isolation of peer-link to MC-LAG member port in case of no fault, and the isolation of peer-link to port of the same name in case of peer-LAG member port fault is released. Isolation is adding table entries to APP_DB, and the table entry is deleted for isolation release.
  • ARP information The ARP table entries associated with MC-LAG member ports are synchronized between MC-LAG peers. When an ARP packet is received from the peer, the ARP table entry is updated locally by sending a netlink packet.
  • FDB Information The FDB table entries associated with MC-LAG member ports are synchronized between MC-LAG peers. Upon receipt of FDB packets from the peer, the local FDB table entries are updated by modifying the table entries in APP_DB.

In SONiC, a heartbeat packet is sent to the other end at 1s intervals. If a heartbeat packet is not received for 15 consecutive cycles, it is judged to have timed out and the ICCP connection is broken.

SONiC uses the lightweight ICCP protocol for consistency checking of the following attributes: symmetrical configuration of MC-LAG peer in local_ip, peer_ip; same configuration of MC-LAG member ports: name, number, joined VLAN, routing port IP of VLAN, routing port MAC address of VLAN; same configuration of MC-LAG peer in the port type of peer-link. The MC-LAG solution provides an automatic detection mechanism that supports the following three modes:

  • Idle Mode In this mode, consistency checks only display the relevant results without performing any processing.
  • Default Mode In this mode, member ports failing detection will be shut down on two peers.
  • Graceful Mode In this mode, member ports failing detection will be shut down on standby node. The default mode for MC-LAG consistency checks is the idle mode.

Table 1 Overview of MC-LAG Configuration Tasks

Configuration TasksDescriptionRefer to
MC-LAG ConfigurationConfigure MC-LAGRequiredConfigure MC-LAG
Configure Peer-linkRequiredConfigure Peer-link
Configure Keep-aliveRequiredConfigure Keep-alive
Configure MC-LAG MemberRequiredConfigure MC-LAG Member
Configure Monitor Link GroupRequiredConfigure Monitor Link Group
Configure Dual-Active GatewayOptionalConfigure Dual-Active Gateway
Configure DAD-linkOptionalConfigure DAD-link
Configure Consistency Check ModeOptionalConfigure Consistency Check Mode
Configure MSTPOptionalConfigure MSTP
Configure ICCP Backup ChannelOptionalConfigure ICCP Backup Channel
Configure Loopback-DetectOptionalConfigure Loopback-Detect
Configure Unique IPOptionalConfigure Unique IP

MC-LAG Default Setting

The default setting of the MC-LAG is shown in the table below.

Table 2 MC-LAG Default Setting

ParametersDefault value
heartbeat-interval1s
session timeout15s
consistency-check modeidle
MCLAG VRFdefault
DAD detection delay60s
DAD recovery delay (MCLAG member)60s
DAD recovery delay (not MCLAG member)0s
DAD VRFdefault

Table 3 MC-LAG Basic Configuration

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Create MC-LAG domainmclag domain domain-idOnly one domain is currently supported, with range of 1-4095
(Optional) Configure the MC-LAG session timeoutsession-timeout timeoutTimeout time, in seconds, value range is 3-3600, default value is 15 seconds; the time interval of the heartbeat detection message should be less than 1/3 of the MC-LAG session timeout time; the session timeout time should be a multiple of the time interval of the heartbeat detection message
  • Peer-link is recommended to use a high-speed interface for interconnection, and it is recommended that a directly connected aggregation link located between two MC-LAG devices be used as a Peer-link link, and it is recommended that it be configured as a static aggregation in order to improve the reliability of MC-LAGs
  • After interface is configured as a peer-link interface, no other services can be configured on this interface
  • Assign a dedicated VLAN for the peer-link and add the peer-link to other MC-LAG service VLANs
  • Configure interface delayed startup on the physical port where the peer-link is located so that it is up before the up/downlink port up, so that the MC-LAG state is restored and the table entries are synchronized and then the traffic is forwarded, which reduces packet loss when the MC-LAG master and backup devices reboot.

Table 4 MC-LAG Member Configuration

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Create a peer-link private VLANvlan vlan-idvlan-id: range 1-4094
Exit VLAN configuration viewexit-
Enter LAG configuration view and create a link-aggregationinterface link-aggregation lag-idlag-id: aggregation group id, range 1-9999
Configure static aggregation modemode static-
Commit the configurationcommit-
Specify the private VLAN and join other service VLANs.switchport trunk vlan vlan-id-
Exit LAG interface configuration viewexit-
Enter Ethernet interface viewinterface ethernet interface-name-
Add the corresponding LAGlink-aggregation-group lag-id [port-priority port-priority]Port priority can be specified, in the range 0 to 65535, default 255.
Configure the delay to start the interfacestartup-delay delayThe default interface delay startup is 150 seconds, and it is recommended that 120 seconds be configured on the physical interface where peer-link is located.
Exit Ethernet interface viewexit-
Enter MC-LAG domain configuration view.mclag domain domain-iddomain-id: range 1-4095
Specify peer-linkpeer-link link-aggregation lag-id-
Commit configurationcommit-
Exit MC-LAG domain configuration viewexit-
  • The heartbeat detection link is used to forward control messages of MC-LAG, which can be shared with peer-link or use a separate physical link.
  • When the dual-master detection function is enabled, the heartbeat detection link is required to be shared with the peer-link, otherwise the function will be disabled. The configuration using a separate physical link is as follow.

Table 5 Configure Keep-Alive Link

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter ethernet interface viewinterface{ ethernet interface-name | link-aggregation lag-id | vlan vlan-id}When heartbeat detection link is shared with peer-link, the interface uses VLAN interface.
Configure the IPv4 addressip address {A.B.C.D/M|A::B/M}-
Exit ethernet interface viewexit-
Enter MC-LAG domain configuration viewmclag domain domain-iddomain-id: range 1-4095
Configure the peer IP of the keep-alive linkpeer-address {A.B.C.D | A::B}-
Configure the local IP of the keep-alive linklocal-address {A.B.C.D | A::B}-
(Optional) Specify the VRF of the keep-alive link.vrf vrf-nameDefault is default VRF
(Optional) Configure the time interval for sending MC-LAG heartbeat detection messages.heartbeat-interval intervalThe unit of interval time is second, the value range is 1-60, and the default value is 1 second; the time interval of heartbeat detection message should be less than 1/3 of the MC-LAG session timeout time; the session timeout time should be a multiple of the time interval of heartbeat detection message.
Commit Configurationcommit-
Exit MC-LAG domain configuration view.exit-
  • It is recommended to use low-speed interfaces as MC-LAG member interfaces
  • To improve system reliability, it is recommended to use dynamic aggregation for cross-device aggregation groups and enable LACP short timeout
  • It is required that the port IDs of the member physical interfaces of the two devices deployed with MC-LAG are the same, otherwise they cannot be aggregated properly

Table 6 MC-LAG Member Configuration

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter VLAN interface configuration viewvlan vlan-idvlan-id: range 1-4094
Exit VLAN configuration viewexit-
Enter LAG interface configuration view and create an aggregation groupinterface link-aggregation lag-idlag-id: aggregation group id, range 1-9999
(Optional) Enable LACP short timeoutlacp fast-rate-
(Optional) Enable LACP fallbacklacp fallbackWhen not receiving LACP packets, activate one member port of a LAG, which can only be configured on one of the MCLAG devices.
Commit the configurationcommit-
Join the service VLANswitchport trunk vlan vlan-id-
Exit LAG interface configuration viewexit-
Enter MC-LAG configuration viewmclag domain domain-iddomain-id: range 1-4095
Add member lag port of MC-LAGmember lag lag-idlag-id: aggregation group id, range 1-9999
Exit mc-lag configuration viewexit-
Enter the LAG interface view where peer-link is locatedinterface link-aggregation lag-id-
Join the service VLANswitchport trunk vlan vlan-id-
  • It is recommended that you configure the Monitor Link group on the master and backup devices deployed with MC-LAG, with the uplink port configured as uplink and the downlink port configured as downlink. After you enable this function, the downlink port will be linked down after the uplink port state is down, ensuring that it can converge quickly when a failure occurs in the topology.

Table 7 Configure Monitor Link Group

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Create Monitor Link Groupmonitor-link-group group-name [ delay-time ]delay-time is an optional parameter, which indicates the delay time of downlink port up after uplink port up, the unit is second, and the default value is 0 when not configured.
Enter Ethernet interface viewinterface ethernet interface-name-
Configure the uplink port as uplinkmonitor-link group-name uplink-
Exit Ethernet interface viewexit-
Enter downlink LAG interface configuration viewinterface ethernet interface-name-
Configure the MC-LAG member interface as downlinkmonitor-link group-name downlink-

In scenarios where the MC-LAG accesses a Layer 3 network or a VXLAN network, the MC-LAG master and backup devices need to act as Layer 3 gateways at the same time, and must ensure that the VLANIF interfaces corresponding to the MC-LAG member interfaces have the same IP address and MAC address; in scenarios with a VXLAN network, it is also required that the VRFs corresponding to the same L3 VNI on the MC-LAG master and backup devices have the MAC is the same.

Table 8 Configure Dual-Active Gateway

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter VRF configuration viewvrf vrf-name-
Set the MAC of VRF.mac HH:HH:HH:HH:HH:HH-
Exit VRF configuration viewexit-
Enter the service VLANIF configuration viewinterface vlan vlan-id-
(Optional)Configure VRF for the interfacevrf vrf-name-
Configure the VLANIF interface IPv4 addressip address A.B.C.D/M-
Configure the MAC address of the VLANIF interfacemac-address HH:HH:HH:HH:HH:HH-
  • Dual Active Detection Link (DAD-link) is recommended to be interconnected using low-speed service ports and is recommended to be configured on a separate physical Layer 3 interface.
  • The DAD-link and peer-link cannot be shared.
  • If the peer-link is configured before the DAD-link is not configured, configure the DAD-link when the peer-link port is in the Up state to prevent the standby device port from being mistakenly Error-Down.

Table 9 DAD-link Configuration

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter Ethernet interface viewinterface ethernet interface-name-
Configure the interface IPv4 address to enable DAD link interworkingip address A.B.C.D/M-
Exit Ethernet interface viewexit-
Enter MC-LAG configuration viewmclag domain domain-iddomain-id: range 1-4095
Configure DAD local ipdad local-address A.B.C.D-
Configure DAD peer ipdad peer-address A.B.C.D-
(Optional) Configure DAD detection delaydad detection-delay timetime: range 0-512; default value 15
(Optional) Configure the delay for recovering the error-down status of MC-LAG member interfaces on the MC-LAG standby side.dad recovery-delay mlag timetime: recovery delay time , range 0-1000; default value 60 for mc-lag member interfaces
(Optional) Configure the delay of error-down state recovery for non-MC-LAG member interfaces on the MC-LAG standby side.dad recovery-delay non-mlag timetime: recovery delay time , range 0-1000; default value 0 for non-mc-lag member interfaces
(Optional) Configure the VRF where the DAD link is locateddad vrf {default|name}default: default VRFname: VRF name
Delete DAD local ip configurationcommit-
Delete DAD peer ip configurationexit-

Table 10 Configure Consistency Check Mode

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter MC-LAG domain configuration viewmclag domain domain-iddomain-id: range 1-4095
Configure the mode of MC-LAG consistency checkingconsistency-check-action {default|graceful|idle}The default consistency check is idle mode
Exit MC-LAG domain configuration viewexit-

The MC-LAG scenario supports the configuration of MSTP Spanning Tree Protocol anti-loop.

  • You should manually deploy the two devices of the MC-LAG as the root bridge of the Layer 2 network when you turn on MSTP, and configure the same bridge ID to simulate the two devices as the same root bridge, and the root priority is configured to be the highest in both cases to ensure that the M-LAG device is the root node. By default, the bridge MAC on the switch that participates in the spanning tree calculation is the MAC address of the switch. When configuring manually, it is recommended that you additionally select a smaller MAC address (not the MAC address of the MC-LAG master or backup device) as the bridge MAC.
  • Since the switches at both ends of the MC-LAG need to be simulated as the same STP root bridge, it should be ensured that the switch’s directly connected interface will not be blocked off, and it is necessary to disable the STP function of the peer-link interface, that is, to turn on the BPDU filtering function.
  • The MC-LAG member interface needs to be manually configured as an edge interface.
  • Does not support multi-level MC-LAG scenarios.

Table 11 Configure MSTP

PurposeCommandsDescription
Enter global configuration view.configure terminal-
Enable MSTP.mstp enable-
Enter the default MSTP instance configuration view.mstp instance 0-
Configure the MC-LAG master/standby device MSTP instance priority to 0.priority 0-
Exit the MSTP instance configuration view.exit-
Configure the MC-LAG root bridge MAC on the MC-LAG master and standby device.bridge mac HH:HH:HH:HH:HH:HH-
Disable the STP function for peer-link links on MC-LAG master and backup devices.mstp bpdu-filter enable interface {ethernet interface-name|link-aggregation lag-id}-
Configure MC-LAG member interfaces as edge interfacesmstp edge-port enable interface {ethernet interface-name|link-aggregation lag-id}-

Use a separate link, added to an independent VLAN, as a backup path for ICCP. When the heartbeat detection link is disconnected, the system can automatically switch to this ICCP backup path, ensuring MC-LAG reliability. No manual IP address configuration is required on the ICCP backup path; only a VLANIF interface needs to be configured, and Link-local addresses will be used for ICCP communication.

Table 12 Configure ICCP Backup Channel

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Create an ICCP backup channel dedicated VLANvlan vlan-idvlan-id: range: 1-4094.
Exit VLAN configuration viewexit-
Create ICCP backup channel VLANIF configuration viewinterface vlan vlan-id-
Exit VLANIF configuration viewexit-
Enter Ethernet configuration viewinterface ethernet interface-name-
Add member for the ICCP standby path dedicated VLANswitchport trunk vlan vlan-id-
Enter MC-LAG domain configuration viewmclag domain domain-iddomain-id: range 1-4095
Configure the ICCP backup channelbackup-channel vlan vlan-id-
Exit MC-LAG domain configuration viewexit-

Loop detection policies include two modes: shutdown and block-vlan. In shutdown mode, the system administratively disables the interface where a loop is detected. In block-vlan mode, the system blocks the VLAN in which a loop is detected. The default mode is shutdown.

Table 13 Configure Loopback-Detect

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Enter downlink LAG view (MC-LAG member)interface link-aggregation lag-idlag-id: aggregation group id, range 1-9999
Configure MC-LAG loopback-detectloopback-detect vlan vlan-id [policy {shutdown|block-vlan} interval interval [wait-time wait-time]]vlan-id: VLAN ID, the range is [1,4094].policy: Optionally configure the execution policy after a loopback has been detected. The default is shutdown mode.shutdown: Indicates that the switch will shut down interfaces with loopback detection configured.block-vlan: Indicates that the switch will block the VLAN with loopback detection configured.interval: Specify the interval time in seconds. The default value is 5 s.wait-time: Specifies the wait time in seconds before restoring a blocked port or VLAN. The default value is 60 s.

This feature supports the MC-LAG Peer to establish a routing protocol with the access side to transmit routes. Two options are currently available.

  • Dual VLANs, that is, the gateway VLAN is separate from the routing protocol VLAN. The IP and the MAC of the gateway VLAN should be the same. While the IP of the routing protocol VLAN should be different from one another and the MAC can just use the default value. In addition, it is required to enable unique-ip in diff_mac mode and ARP proxy in EVPN mode for routing protocol VLAN.
  • The gateway VLAN and the routing protocol VLAN are shared. The primary IP of the SVI are supposed to be different for protocol interactions, while the secondary IP be the same for external gateway. The VLAN MAC should be set to the same value (not the same with system MAC or interface MAC of the peers). In addition, it is required to enable unique-ip in same_mac mode and ARP proxy in EVPN mode for this VLAN.

The first one is configured as follows:

Table 14 MC-LAG Unique-ip Dual VLANs Configuration

PurposeCommandsDescription
Enter global configuration view.configure terminal-
Create two VLANs, one for gateway and another for protocol communication.vlan vlan-idvlan-id range: 1-4094
Exit VLAN configuration view.exit-
Enter MC-LAG domain configuration view.mclag domain domain-iddomain-id range 1-4095
Enable MC-LAG Unique-ip for protocol communication.unique-ip vlan vlan-id [diff_mac]Enable with mode diff_mac (the default mode is diff_mac).
Exit MC-LAG configuration view.exit-
Enter protocol VLAN interface view.interface vlan vlan-id-
Set the IP address.ip address A.B.C.D/MAssign with different IP on MC-LAG peers.
(Optional)Set the MAC address.mac-address HH:HH:HH:HH:HH:HHThe MAC of this VLANIF needs to be different on MC-LAG peers. It is recommended to use the default value.
Configure ARP Proxyarp proxy mode evpn-
Enter gateway VLAN interface viewinterface vlan vlan-id-
Set the IP address.ip address A.B.C.D/MAssign with the same IP on MC-LAG peers.
Set the MAC address.mac-address HH:HH:HH:HH:HH:HHAssign with the same MAC on MC-LAG peers.

The second one is configured as follows:

Table 15 MC-LAG Unique-ip Single VLAN with Dual IP Configuration

PurposeCommandsDescription
Enter global configuration viewconfigure terminal-
Create a VLAN for both uses.vlan vlan-idvlan-id range: 1-4094
Exit VLAN configuration view.exit-
Enter MC-LAG domain configuration view.mclag domain domain-iddomain-id range 1-4095
Enable MC-LAG Unique-ip.unique-ip vlan vlan-id same_macEnable with mode same_mac.
Exit MC-LAG configuration view.exit-
Enter VLAN interface view.interface vlan vlan-id-
Set the primary IP as the protocol IP.ip address A.B.C.D/MAssign with different IP as protocol IP on MC-LAG peers.
Set the secondary IP as the service gateway IP.ip address A.B.C.D/M secondaryAssign with the same IP as gateway IP on MC-LAG peers.
Set the MAC address.mac-address HH:HH:HH:HH:HH:HHThe MAC of this VLANIF needs to be consistent on MC-LAG peers (should not be the same with system MAC or interface MAC).
Configure ARP Proxyarp proxy mode evpn-

Table 16 MC-LAG Configuration Display

PurposeCommandsDescription
Check MC-LAG statusshow mclag state [ domain-id ]domain-id: the created MC-LAG domain ID
Display MC-LAG consistency check resultsshow mclag consistency_check_result-

Example of a Single Group MC-LAG Configuration

Section titled “Example of a Single Group MC-LAG Configuration”
  1. Networking Requirements In the network, Leaf1 and Leaf2 are two independently operating devices, connected to Spine respectively. Due to the high service reliability requirements of the customer, MC-LAG is required to be configured between Leaf1 and Leaf2 to achieve cross-device link aggregation.
  2. Topology

  1. Configuration Roadmap (1) Check that the link status of the ports used on the switch is normal, and that all ports are stable in the UP state. (2) Configure the switch interface IP addresses. (3) Configure VLAN and configure IP address for VLAN interface. (4) Configure link aggregation group and add it to VLAN. (5) Configure MC-LAG. (6) Configure monitor-link-group. (7) Configure static routes to ensure reachability of the service network.
  2. Procedure Spine Configure IP addresses for interfaces.
interface ethernet 0/48
ip address 10.93.0.1/30
exit
!
interface ethernet 0/52
ip address 10.93.0.9/30
exit
!

Configure service VLAN with VLAN-ID 20.

!
vlan 20
exit
!
interface vlan 20
ip address 10.20.0.1/24
exit

Add the interface to the VLAN.

!
interface ethernet 0/0
switchport trunk vlan 20

Configure static routes

ip route 10.10.0.1/24 10.93.0.2
ip route 10.10.0.1/24 10.93.0.10

Leaf1 Configure IP addresses for interfaces.

interface ethernet 0/48
ip address 10.93.0.2/30
exit

Configure service VLAN with VLAN-ID 10 and Keep-alive VLAN with VLAN-ID 4094.

vlan 10
exit
!
vlan 4094
exit
!
interface vlan 10
ip address 10.10.0.1/24
mac-address 00:00:00:10:00:00
exit
!
interface vlan 4094
ip address 10.245.0.1/30
exit

Configure LAG.

interface link-aggregation 9999
mode static
commit
switchport trunk vlan 4094
switchport trunk vlan 10
exit
!
interface link-aggregation 1
lacp fast-rate
commit
switchport trunk vlan 10
!
interface ethernet 0/72
link-aggregation-group 9999
exit
!
interface ethernet 0/76
link-aggregation-group 9999
exit
!
interface ethernet 0/0
link-aggregation-group 1
exit

Configure MC-LAG.

mclag domain 1
local-address 10.245.0.1
peer-address 10.245.0.2
peer-link link-aggregation 9999
commit
member lag 1

Configure Monitor-link

!
monitor-link-group MC_LAG 90
!
interface ethernet 0/48
monitor-link MC_LAG uplink
exit
!
interface ethernet 0/0
monitor-link MC_LAG downlink
exit

Configure static routes.

ip route 10.20.0.1/24 10.93.0.1

Leaf2 Configure IP addresses for interfaces.

interface ethernet 0/48
ip address 10.93.0.10/30
exit

Configure service VLAN with VLAN-ID 10 and Keep-alive VLAN with VLAN-ID 4094.

vlan 10
exit
!
vlan 4094
exit
!
interface vlan 10
ip address 10.10.0.1/24
mac-address 00:00:00:10:00:00
exit
!
interface vlan 4094
ip address 10.245.0.2/30
exit

Configure LAG.

interface link-aggregation 9999
mode static
commit
switchport trunk vlan 4094
switchport trunk vlan 10
exit
!
interface link-aggregation 1
lacp fast-rate
commit
switchport trunk vlan 10
!
interface ethernet 0/72
link-aggregation-group 9999
exit
!
interface ethernet 0/76
link-aggregation-group 9999
exit
!
interface ethernet 0/0
link-aggregation-group 1
exit

Configure MC-LAG.

mclag domain 1
local-address 10.245.0.2
peer-address 10.245.0.1
peer-link link-aggregation 9999
commit
member lag 1

Configure Monitor-link

!
monitor-link-group MC_LAG 90
!
interface ethernet 0/48
monitor-link MC_LAG uplink
exit
!
interface ethernet 0/0
monitor-link MC_LAG downlink
exit

Configure static routes.

ip route 10.20.0.1/24 10.93.0.9
  1. Verify the configuration.

(1) Check the MC-LAG status (Leaf1).

sonic# show mclag state
The MCLAG's keepalive is: OK
MCLAG info sync is: completed
Domain id: 1
MCLAG session Channel: Primary Channel
VRF Name: default
consistency Check Action: idle
Local Ip: 10.245.0.1
Peer Ip: 10.245.0.2
Dad Local Ip:
Dad Peer Ip:
Peer Link Interface: lag 9999
Keepalive time: 1
Dad Detection Delay: 15
Dad Recovery Delay Mlag Intf: 60
Dad Recovery Delay Non Mlag Intf: 0
Dad VRF Name: default
Dad Status: disable
session Timeout : 15
Peer Link Mac: 60:eb:5a:01:10:b1
System Mac: 60:eb:5a:01:10:b1
Peer Mac: 00:00:00:00:00:00
Admin Role: None
Role: Active
MCLAG Interface: lag 1
Loglevel: NOTICE

(2) Verify VM connectivity. VM-A1 and VM-B1 ping each other, can ping through, indicating successful configuration.

Section titled “Example of MC-LAG ICCP Backup-channel Configuration (keepalive and peer-link are not the same link)”
  1. Networking Requirements In the network, Leaf1 and Leaf2 are two independently operating devices, connected to Spine respectively. Due to the high service reliability requirements of the customer, MC-LAG is required to be configured between Leaf1 and Leaf2 to achieve cross-device link aggregation. Also configure ICCP backup-channel to ensure keep-alive link failure does not affect the work of MC-LAG.
  2. Topology

  1. Steps (1)Check that the link status of the ports used on the switch is normal, and that all ports are stable in the UP state. (2)Configure the switch interface IP addresses. (3)Configure VLAN and configure IP address for VLAN interface. (4)Configure link aggregation group and add it to VLAN. (5)Configure MC-LAG. (6)Configure Monitor-link-group. (7)Configure static routes to ensure reachability of the service network.
  2. Procedure Spine Configure IP addresses for interfaces.
interface ethernet 0/48
ip address 10.93.0.1/30
exit
!
interface ethernet 0/52
ip address 10.93.0.9/30
exit
!

Configure service VLAN with VLAN-ID 20.

!
vlan 20
exit
!
interface vlan 20
ip address 10.20.0.1/24
exit

Add the interface to the VLAN.

!
interface ethernet 0/0
switchport trunk vlan 20

Configure static routes

ip route 10.10.0.1/24 10.93.0.2
ip route 10.10.0.1/24 10.93.0.10

Leaf1 Configure IP addresses for interfaces.

interface ethernet 0/48
ip address 10.93.0.2/30
exit

Configure service VLAN with VLAN-ID 10, Keep-alive VLAN with VLAN-ID 4094 and ICCP backup VLAN with VLAN-ID 4093.

vlan 10
exit
!
vlan 4094
exit
!
vlan 4093
exit
!
interface vlan 10
ip address 10.10.0.1/24
mac-address 00:00:00:10:00:00
exit
!
interface vlan 4094
ip address 10.245.0.1/30
exit
!
interface vlan 4093
exit

Configure LAG.

interface link-aggregation 9999
mode static
commit
switchport trunk vlan 10
exit
!
interface link-aggregation 1
lacp fast-rate
commit
switchport trunk vlan 10
!
interface ethernet 0/64
switchport trunk vlan 4094
!
interface ethernet 0/68
switchport trunk vlan 4093
!
interface ethernet 0/72
link-aggregation-group 9999
exit
!
interface ethernet 0/76
link-aggregation-group 9999
exit
!
interface ethernet 0/0
link-aggregation-group 1
exit

Configure MC-LAG.

mclag domain 1
local-address 10.245.0.1
peer-address 10.245.0.2
peer-link link-aggregation 9999
backup-channel vlan 4093
commit
member lag 1

Configure Monitor-link-group

!
monitor-link-group MC_LAG 90
!
interface ethernet 0/48
monitor-link MC_LAG uplink
exit
!
interface ethernet 0/0
monitor-link MC_LAG downlink
exit

Configure static routes.

ip route 10.20.0.1/24 10.93.0.1

Leaf2 Configure IP addresses for interfaces.

interface ethernet 0/48
ip address 10.93.0.10/30
exit

Configure service VLAN with VLAN-ID 10, Keep-alive VLAN with VLAN-ID 4094 and ICCP backup VLAN with VLAN-ID 4093.

vlan 10
exit
!
vlan 4094
exit
!
vlan 4093
exit
!
interface vlan 10
ip address 10.10.0.1/24
mac-address 00:00:00:10:00:00
exit
!
interface vlan 4094
ip address 10.245.0.2/30
exit
!
interface vlan 4093
exit

Configure LAG.

interface link-aggregation 9999
mode static
commit
switchport trunk vlan 10
exit
!
interface link-aggregation 1
lacp fast-rate
commit
switchport trunk vlan 10
!
interface ethernet 0/64
switchport trunk vlan 4094
!
interface ethernet 0/68
switchport trunk vlan 4093
!
interface ethernet 0/72
link-aggregation-group 9999
exit
!
interface ethernet 0/76
link-aggregation-group 9999
exit
!
interface ethernet 0/0
link-aggregation-group 1
exit

Configure MC-LAG.

mclag domain 1
local-address 10.245.0.2
peer-address 10.245.0.1
peer-link link-aggregation 9999
backup-channel vlan 4093
commit
member lag 1

Configure Monitor-link-group

!
monitor-link-group MC_LAG 90
!
interface ethernet 0/48
monitor-link MC_LAG uplink
exit
!
interface ethernet 0/0
monitor-link MC_LAG downlink
exit

Configure static routes.

ip route 10.20.0.1/24 10.93.0.9
  1. Verify the configuration.

(1) Check the MC-LAG status (Leaf1).

sonic# show mclag state
The MCLAG's keepalive is: OK
MCLAG info sync is: completed
Domain id: 1
MCLAG session Channel: Primary Channel
VRF Name: default
consistency Check Action: idle
Local Ip: 10.245.0.1
Peer Ip: 10.245.0.2
Dad Local Ip:
Dad Peer Ip:
Peer Link Interface: lag 9999
Keepalive time: 1
Dad Detection Delay: 15
Dad Recovery Delay Mlag Intf: 60
Dad Recovery Delay Non Mlag Intf: 0
Dad VRF Name: default
Dad Status: disable
session Timeout : 15
Peer Link Mac: 60:eb:5a:01:10:b1
System Mac: 60:eb:5a:01:10:b1
Peer Mac: 00:00:00:00:00:00
Admin Role: None
Role: Active
MCLAG Interface: lag 1
Loglevel: NOTICE

(2) Verify VM connectivity. VM-A1 and VM-B1 ping each other, can ping through, indicating successful configuration. (3) Check if the ICCP backup channel is active. Disconnect the keep-alive link and then check the MC-LAG status.

sonic# show mclag state
The MCLAG's keepalive is: OK
MCLAG info sync is: completed
Domain id: 1
MCLAG session Channel: Backup channel(vlan4093)
VRF Name: default
consistency Check Action: idle
Local Ip: 10.245.0.1
Peer Ip: 10.245.0.2
Dad Local Ip:
Dad Peer Ip:
Peer Link Interface: lag 9999
Keepalive time: 1
Dad Detection Delay: 15
Dad Recovery Delay Mlag Intf: 60
Dad Recovery Delay Non Mlag Intf: 0
Dad VRF Name: default
Dad Status: disable
session Timeout : 15
Peer Link Mac: 60:eb:5a:01:10:b1
System Mac: 60:eb:5a:01:10:b1
Peer Mac: 00:00:00:00:00:00
Admin Role: None
Role: Active
MCLAG Interface: lag 1
Loglevel: NOTICE
  1. Topology

  1. Configuration Roadmap (1) Check that the link status of the ports used on the switch is normal, and that all ports are stable in the UP state. (2) Configure the switch interface IP addresses. (3) Configure VLAN and configure IP address for VLAN interface. (4) Configure link aggregation group and add it to VLAN. (5) Configure MC-LAG. (6) Configure loop detection on the interface (7) Configure static routes to ensure reachability of the service network
  2. Procedure Spine Configure IP addresses for interfaces.
interface ethernet 0/48
ip address 10.93.0.1/30
exit
!
interface ethernet 0/52
ip address 10.93.0.9/30
exit
!

Configure service VLAN with VLAN-ID 20.

!
vlan 20
exit
!
interface vlan 20
ip address 10.20.0.1/24
exit

Add the interface to the VLAN.

!
interface ethernet 0/0
switchport trunk vlan 20

Configure static routes.

ip route 10.10.0.1/24 10.93.0.2
ip route 10.10.0.1/24 10.93.0.10

Leaf1 Configure IP addresses for interfaces.

interface ethernet 0/48
ip address 10.93.0.2/30
exit

Configure service VLAN with VLAN-ID 10, Keep-alive VLAN with VLAN-ID 4094.

vlan 10
exit
!
vlan 4094
exit
!
interface vlan 10
ip address 10.10.0.1/24
mac-address 00:00:00:10:00:00
exit
!
interface vlan 4094
ip address 10.245.0.1/30
exit

Configure LAG.

interface link-aggregation 9999
mode static
commit
switchport trunk vlan 4094
switchport trunk vlan 10
exit
!
interface link-aggregation 1
lacp fast-rate
commit
switchport trunk vlan 10
!
interface ethernet 0/68
switchport trunk vlan 10
!
interface ethernet 0/72
link-aggregation-group 9999
exit
!
interface ethernet 0/76
link-aggregation-group 9999
exit
!
interface ethernet 0/0
link-aggregation-group 1
exit

Configure MC-LAG.

mclag domain 1
local-address 10.245.0.1
peer-address 10.245.0.2
peer-link link-aggregation 9999
commit
member lag 1

Configure loopback detection on the interface.

!
interface link-aggregation 1
loopback-detect vlan 10-40 policy block-vlan interval 20 wait-time 60

Configure static routes.

ip route 10.20.0.1/24 10.93.0.1

Leaf2 Configure IP addresses for interfaces.

interface ethernet 0/48
ip address 10.93.0.10/30
exit

Configure service VLAN with VLAN-ID 10, Keep-alive VLAN with VLAN-ID 4094.

vlan 10
exit
!
vlan 4094
exit
!
interface vlan 10
ip address 10.10.0.1/24
mac-address 00:00:00:10:00:00
exit
!
interface vlan 4094
ip address 10.245.0.2/30
exit

Configure LAG.

interface link-aggregation 9999
mode static
commit
switchport trunk vlan 4094
switchport trunk vlan 10
exit
!
interface link-aggregation 1
lacp fast-rate
commit
switchport trunk vlan 10
!
interface ethernet 0/68
switchport trunk vlan 10
!
interface ethernet 0/72
link-aggregation-group 9999
exit
!
interface ethernet 0/76
link-aggregation-group 9999
exit
!
interface ethernet 0/0
link-aggregation-group 1
exit

Configure MC-LAG.

mclag domain 1
local-address 10.245.0.2
peer-address 10.245.0.1
peer-link link-aggregation 9999
commit
member lag 1

Configure loopback detection on the interface.

!
interface link-aggregation 1
loopback-detect vlan 10-40 policy block-vlan interval 20 wait-time 60

Configure static routes.

ip route 10.20.0.1/24 10.93.0.9
  1. Verify the configuration.

(1) Check the MC-LAG status (Leaf1).

sonic# show mclag state
The MCLAG's keepalive is: OK
MCLAG info sync is: completed
Domain id: 1
MCLAG session Channel: Primary Channel
VRF Name: default
consistency Check Action: idle
Local Ip: 10.245.0.1
Peer Ip: 10.245.0.2
Dad Local Ip:
Dad Peer Ip:
Peer Link Interface: lag 9999
Keepalive time: 1
Dad Detection Delay: 15
Dad Recovery Delay Mlag Intf: 60
Dad Recovery Delay Non Mlag Intf: 0
Dad VRF Name: default
Dad Status: disable
session Timeout : 15
Peer Link Mac: 60:eb:5a:01:10:b1
System Mac: 60:eb:5a:01:10:b1
Peer Mac: 00:00:00:00:00:00
Admin Role: None
Role: Active
MCLAG Interface: lag 1
Loglevel: NOTICE

(2) Check the loop detection results.

sonic# show loopback-detect
Port Policy Vlan Interval Wait time Vlans with loop
------ ---------- ------ ---------- ----------- -----------------
lag1 block-vlan 10-40 20 60 10
  1. Networking Requirements The customer needs to build a large Layer 2 data center network using a two-level MC-LAG approach to expand the number of accessible hosts.
  2. Topology

  1. Configuration Roadmap (1) Check that the link status of the ports used on the switch is normal, and that all ports are stable in the UP state. (2) Configure VLAN and configure IP address for VLAN interface. (3) Configure link aggregation group and add it to VLAN. (4) Configure MC-LAG.
  2. Procedure Leaf1 Configure service VLAN with VLAN-ID 10, Keep-alive VLAN with VLAN-ID 4094.
vlan 10
exit
!
vlan 4094
exit
!
interface vlan 10
ip address 10.10.0.1/24
mac-address 00:00:00:10:00:00
exit
!
interface vlan 4094
ip address 10.245.0.1/30
exit

Configure LAG.

interface link-aggregation 9999
mode static
commit
switchport trunk vlan 4094
switchport trunk vlan 10
exit
!
interface link-aggregation 1
lacp fast-rate
commit
switchport trunk vlan 10
!
interface link-aggregation 2
lacp fast-rate
commit
switchport trunk vlan 10
!
interface ethernet 0/72
link-aggregation-group 9999
exit
!
interface ethernet 0/76
link-aggregation-group 9999
exit
!
interface ethernet 0/0
link-aggregation-group 1
exit
!
interface ethernet 0/1
link-aggregation-group 1
exit
!
interface ethernet 0/2
link-aggregation-group 2
exit
!
interface ethernet 0/3
link-aggregation-group 2
exit

Configure MC-LAG

mclag domain 1
local-address 10.245.0.1
peer-address 10.245.0.2
peer-link link-aggregation 9999
commit
member lag 1
member lag 2

Leaf2 Configure service VLAN with VLAN-ID 10, Keep-alive VLAN with VLAN-ID 4094.

vlan 10
exit
!
vlan 4094
exit
!
interface vlan 10
ip address 10.10.0.1/24
mac-address 00:00:00:10:00:00
exit
!
interface vlan 4094
ip address 10.245.0.2/30
exit

Configure LAG.

interface link-aggregation 9999
mode static
commit
switchport trunk vlan 4094
switchport trunk vlan 10
exit
!
interface link-aggregation 1
lacp fast-rate
commit
switchport trunk vlan 10
!
interface link-aggregation 2
lacp fast-rate
commit
switchport trunk vlan 10
!
interface ethernet 0/72
link-aggregation-group 9999
exit
!
interface ethernet 0/76
link-aggregation-group 9999
exit
!
interface ethernet 0/0
link-aggregation-group 1
exit
!
interface ethernet 0/1
link-aggregation-group 1
exit
!
interface ethernet 0/2
link-aggregation-group 2
exit
!
interface ethernet 0/3
link-aggregation-group 2
exit

Configure MC-LAG

mclag domain 1
local-address 10.245.0.2
peer-address 10.245.0.1
peer-link link-aggregation 9999
commit
member lag 1
member lag 2

Leaf3 Configure service VLAN with VLAN-ID 10, Keep-alive VLAN with VLAN-ID 4094.

vlan 10
exit
!
vlan 4094
exit
!
interface vlan 4094
ip address 10.245.0.5/30
exit

Configure LAG.

interface link-aggregation 9999
mode static
commit
switchport trunk vlan 4094
switchport trunk vlan 10
exit
!
interface link-aggregation 1
lacp fast-rate
commit
switchport trunk vlan 10
!
interface link-aggregation 100
lacp fast-rate
commit
switchport trunk vlan 10
!
interface link-aggregation 101
lacp fast-rate
commit
switchport trunk vlan 10
!
interface ethernet 0/72
link-aggregation-group 9999
exit
!
interface ethernet 0/76
link-aggregation-group 9999
exit
!
interface ethernet 0/0
link-aggregation-group 1
exit
!
interface ethernet 0/1
link-aggregation-group 1
exit
!
interface ethernet 0/2
link-aggregation-group 100
exit
!
interface ethernet 0/3
link-aggregation-group 101
exit

Configure MC-LAG

mclag domain 1
local-address 10.245.0.5
peer-address 10.245.0.6
peer-link link-aggregation 9999
commit
member lag 1
member lag 100
member lag 101

Leaf4 Configure service VLAN with VLAN-ID 10, Keep-alive VLAN with VLAN-ID 4094.

vlan 10
exit
!
vlan 4094
exit
!
interface vlan 4094
ip address 10.245.0.6/30
exit

Configure LAG.

interface link-aggregation 9999
mode static
commit
switchport trunk vlan 4094
switchport trunk vlan 10
exit
!
interface link-aggregation 1
lacp fast-rate
commit
switchport trunk vlan 10
!
interface link-aggregation 100
lacp fast-rate
commit
switchport trunk vlan 10
!
interface link-aggregation 101
lacp fast-rate
commit
switchport trunk vlan 10
!
interface ethernet 0/72
link-aggregation-group 9999
exit
!
interface ethernet 0/76
link-aggregation-group 9999
exit
!
interface ethernet 0/0
link-aggregation-group 1
exit
!
interface ethernet 0/1
link-aggregation-group 1
exit
!
interface ethernet 0/2
link-aggregation-group 100
exit
!
interface ethernet 0/3
link-aggregation-group 101
exit

Configure MC-LAG

mclag domain 1
local-address 10.245.0.6
peer-address 10.245.0.5
peer-link link-aggregation 9999
commit
member lag 1
member lag 100
member lag 101

Leaf5 Configure service VLAN with VLAN-ID 10, Keep-alive VLAN with VLAN-ID 4094.

vlan 10
exit
!
vlan 4094
exit
!
interface vlan 4094
ip address 10.245.0.9/30
exit

Configure LAG.

interface link-aggregation 9999
mode static
commit
switchport trunk vlan 4094
switchport trunk vlan 10
exit
!
interface link-aggregation 2
lacp fast-rate
commit
switchport trunk vlan 10
!
interface link-aggregation 100
lacp fast-rate
commit
switchport trunk vlan 10
!
interface link-aggregation 101
lacp fast-rate
commit
switchport trunk vlan 10
!
interface ethernet 0/72
link-aggregation-group 9999
exit
!
interface ethernet 0/76
link-aggregation-group 9999
exit
!
interface ethernet 0/0
link-aggregation-group 2
exit
!
interface ethernet 0/1
link-aggregation-group 2
exit
!
interface ethernet 0/2
link-aggregation-group 100
exit
!
interface ethernet 0/3
link-aggregation-group 101
exit

Configure MC-LAG

mclag domain 1
local-address 10.245.0.9
peer-address 10.245.0.10
peer-link link-aggregation 9999
commit
member lag 2
member lag 100
member lag 101

Leaf6 Configure service VLAN with VLAN-ID 10, Keep-alive VLAN with VLAN-ID 4094.

vlan 10
exit
!
vlan 4094
exit
!
interface vlan 4094
ip address 10.245.0.10/30
exit

Configure LAG.

interface link-aggregation 9999
mode static
commit
switchport trunk vlan 4094
switchport trunk vlan 10
exit
!
interface link-aggregation 2
lacp fast-rate
commit
switchport trunk vlan 10
!
interface link-aggregation 100
lacp fast-rate
commit
switchport trunk vlan 10
!
interface link-aggregation 101
lacp fast-rate
commit
switchport trunk vlan 10
!
interface ethernet 0/72
link-aggregation-group 9999
exit
!
interface ethernet 0/76
link-aggregation-group 9999
exit
!
interface ethernet 0/0
link-aggregation-group 2
exit
!
interface ethernet 0/1
link-aggregation-group 2
exit
!
interface ethernet 0/2
link-aggregation-group 100
exit
!
interface ethernet 0/3
link-aggregation-group 101
exit

Configure MC-LAG

mclag domain 1
local-address 10.245.0.10
peer-address 10.245.0.9
peer-link link-aggregation 9999
commit
member lag 2
member lag 100
member lag 101
  1. Verify the configuration.

(1) Check the MC-LAG status (Leaf1)

sonic# show mclag state
The MCLAG's keepalive is: OK
MCLAG info sync is: completed
Domain id: 1
MCLAG session Channel: Primary Channel
VRF Name: default
consistency Check Action: idle
Local Ip: 10.245.0.1
Peer Ip: 10.245.0.2
Dad Local Ip:
Dad Peer Ip:
Peer Link Interface: lag 9999
Keepalive time: 1
Dad Detection Delay: 15
Dad Recovery Delay Mlag Intf: 60
Dad Recovery Delay Non Mlag Intf: 0
Dad VRF Name: default
Dad Status: disable
session Timeout : 15
Peer Link Mac: 60:eb:5a:01:10:b1
System Mac: 60:eb:5a:01:10:b1
Peer Mac: 18:45:85:98:43:9b
Admin Role: None
Role: Active
MCLAG Interface: lag 1
Loglevel: NOTICE

(2) Verify Server connectivity. Configure IPs for the Servers within the subnet of VLAN 10: assign 10.10.0.11 to Server1, 10.10.0.12 to Server2, 10.10.0.13 to Server3, and 10.10.0.14 to Server4. Server1, Server2, Server3, Server4, ping each other, can ping through, indicating successful configuration.

Section titled “Example of MC-LAG L3 Backup Link Configuration”
  1. Networking Requirements In the network, Leaf1 and Leaf2 are two independently operating devices, connected to Spine respectively. Due to the high service reliability requirements of the customer, MC-LAG is required to be configured between Leaf1 and Leaf2 to achieve cross-device link aggregation. An additional L3 backup link needs to be configured to ensure that traffic can be forwarded normally in the event of an uplink failure.
  2. Topology

  1. Configuration Roadmap (1) Check that the link status of the ports used on the switch is normal, and that all ports are stable in the UP state. (2) Configure the switch interface IP addresses. (3) Configure VLAN and configure IP address for VLAN interface. (4) Configure link aggregation group and add it to VLAN. (5) Configure MC-LAG. (6) Configure L3 backup link. (7) Configure static routes to ensure reachability of the service network
  2. Procedure Spine Configure IP addresses for interfaces.
interface ethernet 0/48
ip address 10.93.0.1/30
exit
!
interface ethernet 0/52
ip address 10.93.0.9/30
exit
!

Configure service VLAN with VLAN-ID 20.

!
vlan 20
exit
!
interface vlan 20
ip address 10.20.0.1/24
exit

Add the interface to the VLAN.

!
interface ethernet 0/0
switchport trunk vlan 20

Configure static routes.

ip route 10.10.0.1/24 10.93.0.2
ip route 10.10.0.1/24 10.93.0.10

Leaf1 Configure IP addresses for interfaces.

interface ethernet 0/48
ip address 10.93.0.2/30
exit

Configure service VLAN with VLAN-ID 10 and Keep-alive VLAN with VLAN-ID 4094.

vlan 10
exit
!
vlan 4094
exit
!
interface vlan 10
ip address 10.10.0.1/24
mac-address 00:00:00:10:00:00
exit
!
interface vlan 4094
ip address 10.245.0.1/30
exit

Configure LAG.

interface link-aggregation 9999
mode static
commit
switchport trunk vlan 4094
switchport trunk vlan 10
exit
!
interface link-aggregation 1
lacp fast-rate
commit
switchport trunk vlan 10
!
interface ethernet 0/72
link-aggregation-group 9999
exit
!
interface ethernet 0/76
link-aggregation-group 9999
exit
!
interface ethernet 0/0
link-aggregation-group 1
exit

Configure MC-LAG.

mclag domain 1
local-address 10.245.0.1
peer-address 10.245.0.2
peer-link link-aggregation 9999
commit
member lag 1

Configure static routes.

ip route 10.20.0.1/24 10.93.0.1

Configure L3 backup link

interface vlan 4094
ip ospf bfd
ip ospf network point-to-point
exit
!
ospf enable
!
router ospf
network 10.245.0.1/30 area 0.0.0.0
network 10.20.0.1/24 area 0.0.0.0

Leaf2 Configure IP addresses for interfaces.

interface ethernet 0/48
ip address 10.93.0.10/30
exit

Configure service VLAN with VLAN-ID 10 and Keep-alive VLAN with VLAN-ID 4094.

vlan 10
exit
!
vlan 4094
exit
!
interface vlan 10
ip address 10.10.0.1/24
mac-address 00:00:00:10:00:00
exit
!
interface vlan 4094
ip address 10.245.0.2/30
exit

Configure LAG.

interface link-aggregation 9999
mode static
commit
switchport trunk vlan 4094
switchport trunk vlan 10
exit
!
interface link-aggregation 1
lacp fast-rate
commit
switchport trunk vlan 10
!
interface ethernet 0/72
link-aggregation-group 9999
exit
!
interface ethernet 0/76
link-aggregation-group 9999
exit
!
interface ethernet 0/0
link-aggregation-group 1
exit

Configure MC-LAG.

mclag domain 1
local-address 10.245.0.2
peer-address 10.245.0.1
peer-link link-aggregation 9999
commit
member lag 1

Configure static routes.

ip route 10.20.0.1/24 10.93.0.9

Configure L3 backup link

interface vlan 4094
ip ospf bfd
ip ospf network point-to-point
!
ospf enable
!
router ospf
network 10.245.0.2/30 area 0.0.0.0
network 10.20.0.1/24 area 0.0.0.0
  1. Verify the configuration. (1) Check the MC-LAG status (Leaf1).
sonic# show mclag state
The MCLAG's keepalive is: OK
MCLAG info sync is: completed
Domain id: 1
MCLAG session Channel: Primary Channel
VRF Name: default
consistency Check Action: idle
Local Ip: 10.245.0.1
Peer Ip: 10.245.0.2
Dad Local Ip:
Dad Peer Ip:
Peer Link Interface: lag 9999
Keepalive time: 1
Dad Detection Delay: 15
Dad Recovery Delay Mlag Intf: 60
Dad Recovery Delay Non Mlag Intf: 0
Dad VRF Name: default
Dad Status: disable
session Timeout : 15
Peer Link Mac: 60:eb:5a:01:10:b1
System Mac: 60:eb:5a:01:10:b1
Peer Mac: 00:00:00:00:00:00
Admin Role: None
Role: Active
MCLAG Interface: lag 1
Loglevel: NOTICE

(2) Verify VM connectivity. VM-A1 and VM-B1 ping each other, can ping through, indicating successful configuration