Interfaces and Hardware Component Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

PDF

Interfaces and Hardware Component Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

Unidirectional Link Detection protocol

Want to summarize with AI?

Log in

This topic describes Unidirectional Link Detection (UDLD), a Cisco-proprietary single-hop physical link protocol that monitors ethernet links, including point-to-point and shared media links, and detects link error conditions such as miswiring or unidirectional link failure that are not detected at the physical link layer.



UDLD operation

UDLD exchanges protocol packets between the neighboring devices. UDLD works if both devices on the link support UDLD and have it enabled on respective ports.

UDLD sends an initial PROBE message on the ports where it is configured. When it receives a PROBE message, UDLD sends periodic ECHO (hello) messages. Both the messages help identify the sender and its port, and also contain some information about the operating parameters of the protocol on that port. The messages also contain the device and port identifiers on the port for any neighbor devices that the local device has connected with on the port. Similarly, each device gets to know where it is connected and where its neighbors are connected. This helps in detecting faults and miswiring conditions.

The protocol employs a mechanism where information from neighbors that is not periodically refreshed is eventually timed out for fault detection.

The protocol uses a FLUSH message to indicate when UDLD is disabled on a port. This causes the peers to remove the local device from their neighbor cache to prevent a time out.

If a problem is detected, UDLD disables the affected interface and notifies the user to avoid further network problems beyond traffic loss. Example: Loops which are not detected or prevented by Spanning Tree Protocol (STP).


Types of fault detection

UDLD can detect these types of faults:

  • Transmit faults — These are transmission failures from the local port to the peer device which also includes the faults caused by physical link failure or packet path issues on the local or peer device. These failures can lead to serious network issues such as loops which occur specifically when a link is unidirectional.

  • Miswiring faults — These are instances that occur when using unbundled fibers to connect fiber optic ports. In such instances, the receiving and transmitting sides of a port on the local device are connected to different peer ports (on the same device or on different devices).

  • Loopback faults — In these instances, the receiving and transmitting sides of a port are connected to each other, creating a loopback condition. This can be an intentional mode of operation, for certain types of testing, but UDLD must not be used in these cases.

  • Receive faults — The protocol uses a heartbeat signal that is transmitted at a negotiated periodic interval to the peer device. Missed heartbeats can therefore be used to detect failures on the receiving side of the link (where they do not result in interface state changes). These could be caused by a unidirectional link with a failure only affecting the receiving side, or by a link which has developed a bidirectional fault. This detection depends on reliable, regular packet transmission by the peer device. For this reason, the UDLD protocol has two configurable modes of operation namely Normal mode and Agressive mode, which determine the behavior on a heartbeat timeout. For more information about these modes, see UDLD modes of operation.


UDLD modes of operation

UDLD can operate in these modes:

  • Normal mode: In this mode, if a Receive Fault is detected, the user is informed and no further action is taken.

  • Aggressive mode: In this mode, if a Receive Fault is detected, the user is informed and the affected port is disabled.


UDLD aging mechanism

Aging of UDLD information occurs in a Receive Fault condition when the port that runs UDLD does not receive UDLD packets from the neighbor port for a duration of the hold time. The hold time for the port is dictated by the remote port and is dependent on the message interval at the remote end. The shorter the message interval, the shorter is the hold time and faster the detection of the fault. The hold time is three times the message interval in Cisco IOS XR Software.

UDLD information can age out due to the high error rate on the port caused by a physical issue or duplex mismatch. Packet drops due to age out does not mean that the link is unidirectional. UDLD in normal mode does not disable such link.

It is important to choose the right message interval to ensure proper detection time. The message interval should be fast enough to detect the unidirectional link before the forwarding loop is created. The default message interval is 60 seconds. The detection time is approximately equal to three times the message interval. Therefore, when using default UDLD timers, UDLD does not timeout the link faster than the STP aging time.


UDLD state machines

UDLD uses two types of finite state machines (FSMs), generally referred as state machines. The Main FSM deals with all the phases of operation of the protocol while the Detection FSM handles only the phases that determine the status of a port.

Main FSM

The Main FSM can be in one of these states:

  • Init: Protocol is initializing.

  • UDLD inactive: Port is down or UDLD is disabled.

  • Linkup: Port is up and running, and UDLD is in the process of detecting a neighbor.

  • Detection: A hello message from a new neighbor has been received and the Detection FSM is running to determine the status of the port.

  • Advertisement: The Detection FSM has run and concluded that the port is operating correctly, periodic hello messages are being sent and the hello messages from neighbors are monitored.

  • Port shutdown: The Detection FSM detected a fault, or all neighbors were timed out in Aggressive mode, and the port has been disabled as a result.

Detection FSM

The Detection FSM can be in one of these states:

  • Unknown: Detection has not yet been performed or UDLD has been disabled.

  • Unidirectional detected: A unidirectional link condition has been detected because a neighbor does not see the local device, the port will be disabled.

  • Tx/Rx loop: A loopback condition has been detected by receiving a type, length, and value (TLV) message with the ports own identifiers, the port will be disabled.

  • Neighbor mismatch: A miswiring condition has been detected in which a neighbor can identify other devices than the devices the local device can see and the port will be disabled.

  • Bidirectional detected: UDLD hello messages are exchanged successfully in both the directions, the port is operating correctly.


Limitations

  • UDLD on Cisco 8000 Series Routers does not work if the peer UDLD configuration has custom MAC address; Peer must have either Cisco MAC address or IEEE Slow Proto MAC address.

  • Use only these MAC Addresses to establish a successful connection and communication with the Cisco 8000 Series Routers.

    • cisco-l2cp (0x01000ccccccc) - Cisco proprietary MAC Address which can also be used by all other Cisco protocols.

    • ieee-slow-protocols (0x0180c2000002) - IEEE Slow Protocol MAC Address.

  • UDLD is not tunneled through L2VPN like other slow protocols.

  • UDLD must not be enabled on a Switched Port Analyzer (SPAN) source or a destination port.

  • The UDLD protocol is not supported on the subinterfaces and bundle interfaces.