Command Line Reference
Ethernet Switching
MC-LAG Configuration
23 min
mc lag configuration mc lag configuration show mclag state show mclag state \[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 show mclag consistency check result 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 pass show interface errdown 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 errdown interface status \ ethernet1 up ethernet2 up ethernet3 up ethernet4 down ethernet5 up ethernet6 up … mclag domain mclag domain number \[command] mclag domain number no mclag domain number \[purpose] configure the mclag domain \[parameter] parameter description number 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 1 sonic(mclag domain)# peer link {ethernet|link aggregation} peer link {ethernet|link aggregation} name \[command] peer link {ethernet|link aggregation} name no peer link \[purpose] specify the peer link interface \[parameter] parameter description 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 1 sonic(mclag domain)# peer link ethernet 10 peer address peer address a b c d \[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 1 sonic(mclag domain)# peer address 10 10 1 1 local address local address a b c d \[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 1 sonic(mclag domain)# local address 10 10 1 1 heartbeat interval heartbeat interval number \[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 1 sonic(mclag domain)# heartbeat interval 3 session timeout session timeout number \[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 1 sonic(mclag domain)# session timeout 9 member lag member lag id \[command] member lag id no member lag id \[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 backup channel vlan backup channel vlan id \[command] backup channel 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 1 sonic(mclag domain)# backup channel vlan 10 consistency check action {idle|default|graceful} 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 standby device \[view] mc lag view \[use cases] sonic(config)# mclag domain 1 sonic(mclag domain)# consistency check action idle dad local address dad local address a b c d \[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 1 sonic(mclag domain)# dad local address 10 1 1 1 dad peer address dad peer address a b c d \[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 1 sonic(mclag domain)# dad peer address 10 1 15 1 dad detection delay dad detection delay time \[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 1 sonic(mclag domain)# dad detection delay 10 dad recovery delay mlag dad recovery delay mlag time \[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 1 sonic(mclag domain)# dad recovery delay mlag 10 dad recovery delay non mlag dad recovery delay non mlag time \[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 1 sonic(mclag domain)# dad recovery delay non mlag 10 dad vrf dad vrf vrf name \[command] dad vrf vrf 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 dad mgmt interface dad mgmt interface interface \[command] dad mgmt interface interface 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
