Command Line Reference
Ethernet Switching
MC-LAG Configuration
29 min
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 ethernet48 up ethernet49 up … ethernet50 up ethernet51 up ethernet52 up mclag domain 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 1 sonic(mclag domain)# peer link {ethernet|link aggregation} 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 1 sonic(mclag domain)# peer link ethernet 10 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 1 sonic(mclag domain)# peer address 10 10 1 1 local address 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 1 sonic(mclag domain)# local address 10 10 1 1 heartbeat interval 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 1 sonic(mclag domain)# heartbeat interval 3 session timeout 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 1 sonic(mclag domain)# session timeout 9 member lag 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 1 sonic(mclag domain)# member lag 9 member lag active backup 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 1 sonic(mclag domain)# member lag 9 active backup role {active|standby} role {active|standby} \[command] role {active|standby} \[purpose] configure the active/standby status of the current device \[parameter] parameter description active active status standby standby status \[view] mc lag view \[usage scenario] this command allows users to modify the active and standby roles of the two devices in the mc lag based on their specific networking requirements during consistency checks, the system evaluates whether the attributes of the standby device are consistent with those of the active device by default, the primary and secondary roles are determined based on the peer address and local address values, with the device having the larger ip address taking the active state and the one with the smaller ip address taking the standby state \[use cases] sonic(config)# mclag domain 1 sonic(mclag domain)# role active backup channel vlan 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 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 standbydevice \[view] mc lag view \[use cases] sonic(config)# mclag domain 1 sonic(mclag domain)# consistency check action idle dad local address 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 1 sonic(mclag domain)# dad local address 10 1 1 1 dad peer address 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 1 sonic(mclag domain)# dad peer address 10 1 15 1 dad detection delay 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 1 sonic(mclag domain)# dad detection delay 10 dad recovery delay mlag 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 1 sonic(mclag domain)# dad recovery delay mlag 10 dad recovery delay non mlag 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 1 sonic(mclag domain)# dad recovery delay non mlag 10 dad vrf 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 1 sonic(mclag domain)# dad vrf mgmt
