What Is DLDP?
The Device Link Detection Protocol (DLDP) monitors the link status of optical fibers or copper twisted pairs such as super Category 5 twisted pairs. Upon detecting a unidirectional link on an interface, DLDP automatically shuts down or prompts users to manually shut down the interface to prevent network faults.
Why Do We Need DLDP?
If a unidirectional link occurs in a network, a local device is able to receive packets from the remote device at the data link layer, but the remote device cannot receive packets from the local device. Unidirectional links result in problems such as loops on a spanning tree protocol (STP) topology.
As shown in the figures below, a unidirectional link fault may be caused by intersected fibers or disconnection of an optical fiber.
Intersected fibers
Disconnected fibers
As a link layer protocol, DLDP works with physical layer protocols to detect the link status. The auto negotiation mechanism at the physical layer detects physical signals and faults, and DLDP identifies the remote device, detects unidirectional links, and shuts down unreachable interfaces. The auto negotiation mechanism and DLDP work together to detect and disable unidirectional links at physical and logical layers. If the interfaces on both ends of a link work properly at the physical layer, DLDP checks connections and packet exchange between the two interfaces at the link layer. This detection cannot be implemented using the auto negotiation mechanism.
What Are Application Scenarios of DLDP?
Unidirectional Link Detection When a Single Neighbor Exists
Two scenarios are involved:
- A link is unidirectional before DLDP is enabled.
On the network shown in the figure below, DLDP is enabled between the optical fibers connecting two switches.
Intersected fibersWhen DLDP is enabled, interfaces in Up state enter the Active state and send Advertisement packets with RSY tags to notify neighbors and request neighbor information. The following uses Interface 1 as an example to describe the detection process:
When receiving an Advertisement packet with the RSY tag from Interface 4, Interface 1 regards that it has detected a neighbor. Interface 1 starts the echo timer, sets up a neighbor entry, and starts the entry aging timer. Interface 1 then enters the Probe state and sends probe packets to detect Interface 4.
Interface 4 cannot receive the probe packets from Interface 1, so Interface 1 will not receive echo packets from Interface 4. When the echo timer on Interface 1 times out, Interface 1 enters the Disable state.
The detection process on other interfaces is similar to that on Interface 1. At last, the four interfaces enter the Disable state.
- A link changes from bidirectional to unidirectional after DLDP is enabled.
On the network shown in the figure below, optical fibers connect devices.
Correct optical fiber connections when a single neighbor existsWhen the Tx and Rx optical fibers are working properly, Switch A and Switch B establish a bidirectional relationship as follows:
When DLDP is enabled, Interface 1 in Up state enters the Active state and sends Advertisement packets with RSY tags to notify neighbors and request neighbor information.
When receiving an Advertisement packet with the RSY tag from Interface 1, Interface 2 regards that it has detected a neighbor. Interface 2 then starts the echo timer, sets up a neighbor entry, and starts the entry aging timer. Interface 2 enters the Probe state and sends a probe packet.
Upon receiving the probe packet, Interface 1 sets up a neighbor entry, enters the Probe state, and returns an echo packet to Interface 2.
When Interface 2 receives the echo packet, it finds that the neighbor entry exists and the neighbor information carried by the echo packet is the same as that saved on the local device. Therefore, Interface 2 marks this neighbor as a bidirectionally connected neighbor. Interface 2 transits from the Probe state to Advertisement state, and periodically sends Advertisement packets. Interface 2 in Advertisement state resets the aging timer for a known neighbor each time a packet is received from the neighbor.
- After DLDP is enabled, the procedure for sending packets from Interface 2 and setting up a neighbor on Interface 1 is similar to steps 1 to 4.
- At last, Interface 1 and Interface 2 regard each other as bidirectionally connected neighbors and enter the Advertisement state.
The Rx optical fiber of Interface 2 has failed and cannot receive an optical signal (shown in the figure below). When this occurs, Interface 2 enters the Inactive state and stops sending and receiving packets. The Tx optical fiber of Interface 2 remains normal, so Interface 1 can receive signals and remain in Up state. Interface 1 cannot receive DLDP Data Units (DLDPDUs) from Interface 2 before the entry aging timer times out. The procedure for detecting unidirectional links varies depending on the configured DLDP working mode.
Disconnection of one optical fiber when a single neighbor existsNormal mode: Interface 1 deletes the neighbor entry, enters the Active state, and sends an Advertisement packet with the RSY tag when the entry aging timer times out. After 5 seconds in Active state, Interface 1 enters the Advertisement state. Then Interface 1 remains in Advertisement state and has no neighbor. Interface 2 retains the Inactive state. In this case, DLDP cannot detect unidirectional links.
Enhanced mode: Interface 1 starts the enhanced timer and echo timer and sends a probe packet to the neighbor when the entry aging timer times out. The Tx optical fiber of Interface 1 is disconnected, making Interface 1 unable to receive the echo packet from Interface 2. When the echo timer times out, Interface 1 enters the Disable state and sends a Disable packet to the neighbor. In addition, Interface 1 deletes the neighbor entry and starts the RecoverProbe timer to check whether the Tx optical fiber is restored. Interface 2 retains the Inactive state.
In enhanced mode, Interface 2 is physically Down, but Interface 1 cannot detect the change. DLDP supports the fast Link-Down notification mechanism that can rapidly detect a fault on the link connecting Interface 1 and Interface 2 before the entry aging timer times out. Upon detecting that Interface 2 is Down, the physical layer sends a Link-Down notification packet to Interface 1. When receiving the Link-Down notification packet, Interface 1 enters the Disable state.
The fast Link-Down notification mechanism applies only to the enhanced mode.
Unidirectional Link Detection When Multiple Neighbors Exist
DLDP can be configured for devices connected by hubs to detect unidirectional links. Each interface detects at least one neighbor.
As shown in the figure below, a hub connects SwitchA to SwitchB, SwitchC, and SwitchD through copper twisted pairs or optical fibers. All switches support DLDP. To detect unidirectional links on this network, enable DLDP on all switch interfaces connected to the hub.
Networking diagram of multiple neighbors
On a network with multiple neighbors, an interface immediately enters the Disable state when receiving Disable packets from a neighbor or detecting that a neighbor is unidirectional. When SwitchA, SwitchB, and SwitchC detect a unidirectional link fault on SwitchD, interfaces transition to the Disable state. This prevents traffic forwarding errors when the topology changes. If the Rx optical fiber between SwitchB and the hub is disconnected when SwitchA is forwarding traffic to SwitchB, SwitchA shuts down its interface connected to the hub and stops sending packets to SwitchB, SwitchC, and SwitchD. If a backup link exists between SwitchA and SwitchB, STP immediately starts the backup link when SwitchA shuts down the interface.
If the switches on the preceding network are connected by a device that has DLDP disabled but supports DLDPDU forwarding, DLDP still detects unidirectional links as if the network has multiple neighbors.
How Does DLDP Work?
DLDP States
The DLDP allows a device to identify the remote device and check connectivity of the unidirectional link by exchanging DLDPDUs with the remote device. DLDP defines the following states: Initial, Inactive, Active, Advertisement, Probe, Disable, and DelayDown.
State transition during DLDP packet exchange
State |
Description |
|---|---|
Initial |
DLDP is disabled. |
Inactive |
DLDP is enabled but the link is Down. |
Active |
DLDP is enabled and the link is Up, or neighbor entries are cleared. |
Advertisement |
All neighbors are bidirectionally reachable or have been in Active state for more than 5 seconds. This is a stable state when no unidirectional link has been detected. |
Probe |
Probe packets are sent to detect whether the link is unidirectional. When an interface enters this state, DLDP starts the probe timer and starts an echo timer for each neighbor to be detected. |
Disable |
DLDP in enhanced mode detects a unidirectional link and disables the interface that fails to send optical signals. |
DelayDown |
When an interface in Active, Advertisement, or Probe state receives a Port-Down event, the interface enters the DelayDown state but does not immediately delete neighbor entries or transition to the Inactive state. In DelayDown state, the system retains DLDP neighbor information and only responds to Port-Up events. |
DLDP Timers
DLDP uses the following timers.
Timer |
Description |
|---|---|
Active timer |
After DLDP is enabled and the link is Up or neighbor entries are cleared, the interface enters the Active state and starts the Active timer to send Advertisement packets with RSY tags. The default value of the Active timer is 1 second. The interface sends an Advertisement packet with an RSY tag every 1 second, and sends a maximum of five Advertisement packets. If no response packet is received after the interface sends five Advertisement packets with RSY tags, the Active timer times out and the interface enters the Advertisement state. |
Advertisement timer |
When an interface enters the Advertisement state, the interface starts the Advertisement timer and sends Advertisement packets. This timer determines the interval for sending Advertisement packets, which can be set using a command. The default value of the Advertisement timer is 5 seconds. |
Probe timer |
When receiving a packet from an unknown neighbor, the interface enters the Probe state and sends a probe packet to check for the unidirectional link. The interface in Probe state starts the Probe timer. This timer determines the interval for sending Probe packets (the default value is 1 second). A DLDP interface in Probe state sends two Probe packets every second. |
Echo timer |
This timer is triggered when DLDP transitions to the Probe state. The default value is 10 seconds. If an interface in Probe state does not receive any echo packet from a neighbor when the Echo timer times out, the interface status is set to unidirectional and the DLDP state machine transitions to the Disable state. In this case, the system records logs and alarms and sends flush packets. In addition, the system shuts down or promotes the user to shut down the interface according to the DLDP Down mode, and deletes the neighbor entry. |
Entry aging timer |
When a new neighbor joins, a neighbor entry is created and the entry aging timer is triggered for the entry. When a DLDP packet is received from a neighbor, DLDP updates the corresponding neighbor entry and resets the entry aging timer depending on the following modes:
The value of the entry aging timer is three times the value of the Advertisement timer. |
Enhanced timer |
In enhanced mode, the enhanced timer is triggered if no DLDP packet is received from a neighbor when the entry aging timer times out. The local device consecutively sends eight probe packets to the neighbor, at the rate of 1 pps. If no echo packet is received from the neighbor when the enhanced timer times out, DLDP enters the Disable state. The value of the enhanced timer is 10 seconds. |
DelayDown timer |
In enhanced mode, when DLDP in Active, Advertisement, or Probe state detects a Port-Down event, it transitions to the DelayDown state instead of deleting the neighbor entry and transitioning to the Inactive state. At this time, the system retains DLDP neighbor information and only responds to Port-Up events.
|
RecoverProbe timer |
An interface in Disable state sends one RecoverProbe packet every 2 seconds to detect whether the unidirectional link fault is rectified. Upon receiving a RecoverEcho packet from the remote end, the local interface checks whether the neighbor information in the RecoverEcho packet is the same as that on the local interface. If they are the same, the link between the local interface and the neighbor has recovered. The local interface transitions from the Disable state to the Active state and reestablishes the neighbor relationship. |
DLDP Working Modes
DLDP has two working modes: normal mode or enhanced mode.
DLDP Working Mode |
When a Neighbor Entry Expires |
Unidirectional Link Detection |
|---|---|---|
Normal |
DLDP does not automatically probe a neighbor before aging out a neighbor entry. When the entry aging timer times out, DLDP ages out the neighbor entry. |
DLDP can identify only unidirectional links caused by intersected fibers. |
Enhanced |
DLDP automatically probes a neighbor before aging out a neighbor entry. When the entry aging timer times out, DLDP starts the enhanced timer and echo timer. When the echo timer times out, the local link status is set to unidirectional and the neighbor entry is deleted. |
DLDP can identify unidirectional links caused by intersected fibers or fiber disconnection. NOTE:
To detect unidirectional links caused by disconnection of one optical fiber, manually set the rate and full duplex mode of the connected interfaces. If you do not set the rate and full duplex mode of the connected interfaces, DLDP does not take effect even if it is enabled. |
DLDP Authentication Modes
If a link of the DLDP interface is in Up state, the DLDP interface sends DLDPDUs to the remote device and processes the DLDPDUs received from the remote device. To ensure packet validity on an insecure network, you can configure one of the following authentication modes for DLDPDUs.
Authentication Mode |
Description |
|---|---|
Non-authentication mode |
The sender sets the authentication key of the DLDPDUs to all 0s and the authentication type field to 0. The receiver compares the authentication key and authentication type with those set on the local end. If the settings on the two ends are different, the receiver discards the DLDPDUs. |
Simple authentication mode |
The sender sets the authentication key of the DLDPDUs to the plain-text password set on the local end and the authentication type field to 1. The receiver compares the authentication key and authentication type with those set on the local end. If the settings on the two ends are different, the receiver discards the DLDPDUs. |
MD5 authentication mode |
The sender sets the authentication key of the DLDPDUs to the summary of the cipher text obtained from the password set on the local end using the MD5 algorithm, and sets the authentication type field to 2. The receiver compares the authentication key and authentication type with the summary of the cipher text obtained on the local end using the MD5 algorithm. If the settings on the two ends are different, the receiver discards the DLDPDUs. |
SHA authentication mode |
The sender sets the authenticator field of the DLDPDUs to the digest of the cipher text obtained from the password set on the local end using the SHA256 algorithm, and sets the authentication type field to 3. The receiver compares the authenticator and authentication type with the digest of the cipher text obtained on the local end using the SHA256 algorithm. If the settings on the two ends are different, the receiver discards the DLDPDUs. |
DLDP Working Process
DLDP processes a received DLDP packet as follows:
Authenticates the DLDP packet and discards the DLDP packet if it fails to be authenticated.
Discards the DLDP packet if the interval for sending Advertisement packets in the DLDP packet is different from that on the local device.
Processes the DLDP packet if the packet is authenticated and contains the same Advertisement interval as that configured on the local device.
- Author: Meng Xianhai, Li Qiang
- Updated on: 2025-07-18
- Views: 1460
- Average rating:
Export PDF