Monitor-Link Configuration
Introduction
Section titled “Introduction”Monitor Link is an interface linkage solution that triggers changes in the up/down state of downstream interfaces based on the changes in the up/down state of a monitored device’s upstream interface. This triggering subsequently leads to topology protocol switches on downstream devices.
Explanation of Principles
Section titled “Explanation of Principles”Each Monitor Link group consists of two types of member interfaces: upstream interfaces and downstream interfaces. While a Monitor Link group can have multiple upstream or downstream interfaces, an interface can only belong to a single Monitor Link group.
The upstream interface is the monitored interface, and its associated link is known as the upstream link. The state of the Monitor Link group is coordinated with the state of this interface. When all the uplink interfaces in the Monitor Link group are down, the Monitor Link group is considered down. Conversely, when all the uplink interfaces in the Monitor Link group are up, the Monitor Link group is considered up.
The downstream interface is the monitoring interface, and its associated link is known as the downstream link. The state of this interface is synchronized with the state of the Monitor Link group. Changes in the up/down state of the Monitor Link group correspondingly affect the state of the downstream interface, ensuring consistency between the two.
Configuration Example
Section titled “Configuration Example”Network requirements
Device uses Ethernet ports 49,50 to connect to the uplink device and Ethernet ports 1,2,3,4 to connect to the downlink device. Requirements:
When the upstream port all failure, need to promptly cut off the downstream port.
When the uplink port restores connection, the downlink port connection is restored with a delay of 5 seconds to prevent frequent UP and DOWN of the downlink port caused by unstable link.

Procedure
# Create linkage group 1 and specify a delay time of 5 seconds
sonic(config)# monitor-link-group 1 5sonic(config-monitor-link-group-1)## Add uplink and downlink ports, support range configuration
sonic(config-monitor-link-group-1)# interface 1-4 downlinksonic(config-monitor-link-group-1)# interface 49,50 uplinkVerify configuration
sonic# show monitor-link+--------------+----------+------------------+---------------------+| Group Name | Delay | Uplink Members | Downlink Members |+==============+==========+==================+=====================+| 1 | 5 | Ethernet49 | Ethernet1 || | | Ethernet50 | Ethernet2 || | | | Ethernet3 || | | | Ethernet4 |+--------------+----------+------------------+---------------------+