跳转到内容
Ask AI

MC-LAG Configuration

此内容尚不支持你的语言。

[Command] show mclag state

[Purpose] View information about MC-LAG

[View] System view

[Use Cases]

sonic# show mclag state
The MCLAG's keepalive is: ERROR
MCLAG info sync is: incomplete
Domain id: 1
MCLAG session Channel: None
VRF Name: default
consistency Check Action: idle
Local Ip: 30.30.30.2
Peer Ip: 30.30.30.3
Peer Link Interface: Ethernet25
Keepalive time: 1
sesssion Timeout : 3
Peer Link Mac: 00:11:24:1a:1b:62
Admin Role: None
Role: Active
MCLAG Interface:
Loglevel: NOTICE

[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 Pass

[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 errdown
Interface Status
----------- --------
Ethernet1 up
Ethernet2 up
Ethernet3 up
Ethernet4 down
Ethernet5 up
Ethernet6 up

[Command] mclag domainnumber no mclag domainnumber

[Purpose] Configure the MCLAG domain

[Parameter]

ParameterDescription
numberThe 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 1
sonic(mclag-domain)#

[Command] **peer-link {ethernet|link-aggregation}**name

no peer-link

[Purpose] Specify the peer-link interface

[Parameter]

ParameterDescription
nameInterface 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 1
sonic(mclag-domain)# peer-link ethernet 10

[Command] peer-addressA.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 1
sonic(mclag-domain)# peer-address 10.10.1.1

[Command] local-addressA.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 1
sonic(mclag-domain)# local address 10.10.1.1

[Command] heartbeat-intervalnumber

[Purpose] Configure the transmission interval of MC-LAG Keep alive packets

[Parameter]

ParameterDescription
numberValue 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 1
sonic(mclag-domain)# heartbeat-interval 3

[Command] session-timeoutnumber

[Purpose] Configure the MC-LAG session timeout period

[Parameter]

ParameterDescription
numberValue 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 1
sonic(mclag-domain)# session-timeout 9

[Command] member lagID no member lagID

[Purpose] Add member ports for MC-LAG

[View] MC-LAG view

[Notes] This command removes a member port

[Use Cases]

sonic(config)# mclag domain 1
sonic(mclag-domain)# member lag 9

[Command] backup-channel vlanID

[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 1
sonic(mclag-domain)# backup-channel vlan 10

consistency-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]

ParameterDescription
idleOnly check for consistency, do not make movements
defaultCheck whether the member interface is consistent and shutdown is inconsistent
gracefulCheck whether it is consistent, only the shutdown role is a member port of the standby device

[View] MC-LAG view

[Use Cases]

sonic(config)# mclag domain 1
sonic(mclag-domain)# consistency-check-action idle

[Command] dad local-addressA.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 1
sonic(mclag-domain)# dad local-address 10.1.1.1

[Command] dad peer-addressA.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 1
sonic(mclag-domain)# dad peer-address 10.1.15.1

[Command] dad detection-delaytime 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 1
sonic(mclag-domain)# dad detection-delay 10

[Command] dad recovery-delay mlagtime 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 1
sonic(mclag-domain)# dad recovery-delay mlag 10

[Command] dad recovery-delay non-mlagtime 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 1
sonic(mclag-domain)# dad recovery-delay non-mlag 10

[Command] dad vrfvrf-name

no dad vrf

[Purpose] Specify the VRF to which the DAD packets belong

[View] MC-LAG view

[Notes] Specify the VRF where the DAD link resides, ensuring that DAD links can function properly even when located in a non-default VRF.

[Use Cases]

sonic(config)# mclag domain 1
sonic(mclag-domain)# dad vrf test

[Command] dad mgmt-interfaceinterface no dad mgmt-interface

[Purpose] Specify the name of the physical port with the management IP configured on the device as the mgmt-interface for DAD.This prevents the management port on the backup device from being error-disabled and becoming inaccessible in the event of a DAD failure. Configuring the DAD mgmt-interface specifically avoids this outcome for the management interface.

[View] MC-LAG view

[Notes] Currently, the DAD mgmt-interface only supports configuration of physical port names (e.g., Ethernet1), and does not yet support configuration of LAG interfaces or VLAN interfaces.

[Use Cases]

sonic(config)# mclag domain 1
sonic(mclag-domain)# dad mgmt-interface Ethernet1