MC-LAG Configuration
show mclag state
Section titled “show mclag state”[Command]
show mclag state
[Purpose]
View information about MC-LAG
[View]
System view
[Use Cases]
sonic# show mclag stateThe MCLAG's keepalive is: ERRORMCLAG info sync is: incompleteDomain id: 1MCLAG session Channel: NoneVRF Name: defaultconsistency Check Action: idleLocal Ip: 30.30.30.2Peer Ip: 30.30.30.3Peer Link Interface: Ethernet25Keepalive time: 1sesssion Timeout : 3Peer Link Mac: 00:11:24:1a:1b:62Admin Role: NoneRole: ActiveMCLAG Interface:Loglevel: NOTICEshow mclag consistency check result
Section titled “show mclag consistency check result”[Command]
show mclag consistency check result
[Purpose]
View the results of the membership consistency check
[View]
System view
[Usage Scenario]
MCLAG (Multi-Chassis Link Aggregation Group) consists of two devices that together form a dual-active system. These two MCLAG devices are logically virtualized as a single device, creating a unified Layer 2 logical node. This also means that certain configurations on both ends of the MCLAG need to be consistent; otherwise, it could lead to issues such as MCLAG not functioning correctly or creating loops in the network.
[Use Cases]
sonic# show mclag consistency_check_result-----------------------------------------------------------------------------------------ifname mode(lacp/static) fast-rate fallback trunk_mode allowed_vlan-----------------------------------------------------------------------------------------PortChannel0020 Failed Failed Failed Pass Passshow interface errdown
Section titled “show interface errdown”[Command]
show interface errdown
[Purpose]
View the status of interfaces that have been forcibly shut down due to Duplicate Address Detection (DAD) disconnection.
[View]
System view
[Use Cases]
sonic# show interface errdownInterface Status----------- --------Ethernet1 upEthernet2 upEthernet3 upEthernet4 downEthernet5 upEthernet6 upEthernet48 upEthernet49 up…Ethernet50 upEthernet51 upEthernet52 upmclag domain
Section titled “mclag domain”[Command]
mclag domain domain_id
no mclag domain
[Purpose]
Configure the MCLAG domain
[Parameter]
| Parameter | Description |
|---|---|
| domain_id | The range of value |
[View]
System configuration view
[Usage Scenario]
All MC-LAG related configurations must be based on the MC-LAG domain. Each device can only be configured with one MC-LAG domain.
[Notes]
Please note that for a successful MC-LAG connection between two devices, the MC-LAG domains on both ends must match.
[Use Cases]
sonic(config)# mclag domain 1sonic(mclag-domain)#peer-link {ethernet|link-aggregation}
Section titled “peer-link {ethernet|link-aggregation}”[Command]
peer-link {ethernet|link-aggregation} interface_name
no peer-link
[Purpose]
Specify the peer-link interface
[Parameter]
| Parameter | Description |
|---|---|
| interface_name | Interface name |
[View]
MC-LAG view
[Usage Scenario]
The Peer-link link is a directly connected link between two devices in a deployed MC-LAG setup. It is used for exchanging protocol messages and transmitting some traffic to ensure the proper functioning of the MC-LAG. Typically, the peer-link interface is configured in trunk mode and allows all VLANs belonging to the MC-LAG domain’s member aggregated ports to pass through.
[Use Cases]
sonic(config)# mclag domain 1sonic(mclag-domain)# peer-link ethernet 10peer-address
Section titled “peer-address”[Command]
peer-address A.B.C.D
no peer-address
[Purpose]
Configure the IP address of the heartbeat packet of the peer device
[View]
MC-LAG View
[Use Cases]
sonic(config)# mclag domain 1sonic(mclag-domain)# peer-address 10.10.1.1local-address
Section titled “local-address”[Command]
local-address A.B.C.D
no local-address
[Purpose]
Configure the IPv4 address bound to the current domain
[View]
MC-LAG View
[Use Cases]
sonic(config)# mclag domain 1sonic(mclag-domain)# local address 10.10.1.1heartbeat-interval
Section titled “heartbeat-interval”[Command]
heartbeat-interval number
[Purpose]
Configure the transmission interval of MC-LAG Keep alive packets
[Parameter]
| Parameter | Description |
|---|---|
| number | Value range: 1-60, unit: s |
[View]
MC-LAG View
[Usage Scenario]
In the context of MC-LAG, if the remote MC-LAG device doesn’t receive Keepalive messages from the local MC-LAG device within the specified timeout period, it will consider the remote MC-LAG device as being in a “down” state. To ensure the proper operation of MC-LAG, it’s crucial that the Keepalive message sending intervals are configured consistently on both the local and remote MC-LAG devices. Failing to do so may result in abnormal functionality.
[Notes]
A critical consideration is that the Keepalive message interval should be set to less than one-third of the session timeout duration. The session timeout duration should be a multiple of the Keepalive message interval. This ensures that Keepalive messages are sent frequently enough to detect failures promptly while allowing for some tolerance in case of network delays.
[Use Cases]
sonic(config)# mclag domain 1sonic(mclag-domain)# heartbeat-interval 3session-timeout
Section titled “session-timeout”[Command]
session-timeout number
[Purpose]
Configure the MC-LAG session timeout period
[Parameter]
| Parameter | Description |
|---|---|
| number | Value range: 3-3600, unit: s |
[View]
MC-LAG view
[Usage Scenario]
In certain scenarios, if Keep Alive messages are not received continuously within the specified timeout period, the device will determine that the Peer-Link link is malfunctioning.
[Notes]
Please note the following considerations: The interval between sending Keep Alive messages should be less than one-third of the session timeout period, and the session timeout period must be a multiple of the Keep Alive message interval. This configuration ensures that Keep Alive messages are sent frequently enough to detect faults promptly while providing some fault tolerance in cases of network latency.
[Use Cases]
sonic(config)# mclag domain 1sonic(mclag-domain)# session-timeout 9member lag
Section titled “member lag”[Command]
member lag lag_id
no member lag
[Purpose]
Add member ports for MC-LAG
[View]
MC-LAG view
[Notes]
This command removes a member port
[Use Cases]
sonic(config)# mclag domain 1sonic(mclag-domain)# member lag 9member lag active-backup
Section titled “member lag active-backup”[Command]
member lag lag_id active-backup
no member lag lag_id active-backup
[Purpose]
Add MC-LAG member ports and configure them in master/backup mode
[View]
MC-LAG view
[Usage Scenario]
When servers with dual network adapters are connected using a primary-backup configuration, the device needs to configure the following command. The device will automatically determine the primary and backup interfaces on the device side based on the traffic transmitted and received through the primary and backup ports of the server.
[Use Cases]
sonic(config)# mclag domain 1sonic(mclag-domain)# member lag 9 active-backupbackup-channel vlan
Section titled “backup-channel vlan”[Command]
backup-channel vlan vlan_id
[Purpose]
Configure the backup link for peer-link
[View]
MC-LAG view
[Usage Scenario]
In the event of a peer-link link failure, configuring a backup link ensures that the network environment remains unaffected. This configuration allows MC-LAG to continue functioning normally even when the peer-link link is down.
[Notes]
In the event of a peer-link link failure, the member interfaces of the specified VLAN on the backup-channel will be switched to serve as backup links
[Use Cases]
sonic(config)# mclag domain 1sonic(mclag-domain)# backup-channel vlan 10consistency-check-action {idle|default|graceful}
Section titled “consistency-check-action {idle|default|graceful}”[Command]
consistency-check-action {idle|default|graceful}
[Purpose]
Enable the M-LAG configuration consistency check function and specify the check mode
[Parameter]
| Parameter | Description |
|---|---|
| idle | Only check for consistency, do not make movements |
| default | Check whether the member interface is consistent and shutdown is inconsistent |
| graceful | Check whether it is consistent, only the shutdown role is a member port of the standbydevice |
[View]
MC-LAG view
[Use Cases]
sonic(config)# mclag domain 1sonic(mclag-domain)# consistency-check-action idledad local-address
Section titled “dad local-address”[Command]
dad local-address A.B.C.D
no dad local-address
[Purpose]
Configure the source IP address for DAD heartbeat packets
[View]
MC-LAG view
[Usage Scenario]
In the MC-LAG scenario, devices on both ends of the MC-LAG use the IP address configured by this command to send and receive heartbeat packets. When a Peer-link link failure is detected, the standby device negotiated by the MC-LAG has its interface states (excluding management and loopback interfaces) set to down.
[Notes]
The IP address specified by this command needs to be the IP address of either the loopback interface or the management interface
[Use Cases]
sonic(config)# mclag domain 1sonic(mclag-domain)# dad local-address 10.1.1.1dad peer-address
Section titled “dad peer-address”[Command]
dad peer-address A.B.C.D
no dad peer-address
[Purpose]
Configure the destination IP address for DAD heartbeat packets
[View]
MC-LAG view
[Notes]
It is necessary to ensure that the configured local-address and peer-address are reachable at the Layer 3 level.
[Use Cases]
sonic(config)# mclag domain 1sonic(mclag-domain)# dad peer-address 10.1.15.1dad detection-delay
Section titled “dad detection-delay”[Command]
dad detection-delay time
no dad detection-delay
[Purpose]
Configure the Error Down delay time
[View]
MC-LAG view
[Notes]
When a Peer-link failure occurs but Duplicate Address Detection (DAD) detection is normal, the backup device will trigger an Error Down after the configured delay time to prevent session flapping.
[Use Cases]
sonic(config)# mclag domain 1sonic(mclag-domain)# dad detection-delay 10dad recovery-delay mlag
Section titled “dad recovery-delay mlag”[Command]
dad recovery-delay mlag time
no dad recovery-delay mlag
[Purpose]
Configure the Error Down recovery delay time
[View]
MC-LAG view
[Notes]
After the Peer-link failure is restored, the Error Down state of the MC-LAG member LAGs will be restored after the configured delay time to prevent session flapping.
[Use Cases]
sonic(config)# mclag domain 1sonic(mclag-domain)# dad recovery-delay mlag 10dad recovery-delay non-mlag
Section titled “dad recovery-delay non-mlag”[Command]
dad recovery-delay non-mlag time
no dad recovery-delay non-mlag
[Purpose]
Configure the Error Down recovery delay time
[View]
MC-LAG view
[Notes] After the restoration of a Peer-link failure, the Error Down state of non-MC-LAG member interfaces will be recovered after the configured delay time to prevent session flapping.
[Use Cases]
sonic(config)# mclag domain 1sonic(mclag-domain)# dad recovery-delay non-mlag 10dad vrf
Section titled “dad vrf”[Command]
dad vrf vrf_name
no dad vrf
[Purpose]
Specify the VRF to which the DAD packets belong
[View]
MC-LAG view
[Notes]
When using the management network interface as the source for DAD packets, and the management network interface is designated as the MGMT VRF, use this command to specify that the source of DAD is the MGMT VRF.
[Use Cases]
sonic(config)# mclag domain 1sonic(mclag-domain)# dad vrf mgmt