As shown in Figure 1-1 and Figure 1-2,
you may have encountered unidirectional links in networking. When a
unidirectional link occurs, the local device can receive packets from the peer
device through the link layer, but the peer device cannot receive packets from
the local device.
Unidirectional links can be divided into
two types: the first type is caused by cross-connected fibers, and the second
type is caused by a fiber which is not connected or a fiber which is
disconnected. The cross-connected fibers in Figure 1-1
refer to optical fibers which are connected inversely. The air-core lines in Figure 1-2 refer to a fiber which is not connected or
a fiber which is disconnected.
Unidirectional links can cause many
problems, such as spanning tree topology loop.
Device Link Detection Protocol (DLDP) can
detect the link status of the optical fiber cable or copper twisted pair (such
as super category 5 twisted pair). If DLDP finds a unidirectional link, it
disables the related ports automatically or informs users to disable them
manually according to the configurations, to avoid network problems.

Figure 1-1 Fiber cross-connection

Figure 1-2 Fiber which is not connected or
disconnected
DLDP provides the following features:
l
As a link layer protocol, it works together with
the physical layer protocols to monitor the link status of a device.
l
While the auto-negotiation mechanism on the
physical layer detects physical signals and faults; DLDP identifies peer
devices and unidirectional links, and disables unreachable ports.
l
Even if the links of both ends can normally
operate individually on the physical layer, DLDP can detect (at the link layer)
whether these links are connected correctly and packets can be exchanged
normally between the two ends. This detection cannot be implemented by the
auto-negotiation mechanism.
I. DLDP status
DLDP may be in one of the six states: initial,
inactive, active, advertisement, probe and disable.
Table 1-1 DLDP status
|
Status
|
Description
|
|
Initial
|
DLDP is not enabled.
|
|
Inactive
|
DLDP is enabled but the corresponding
link is down
|
|
Active
|
DLDP is enabled and the link is up, or
the state within five seconds after an neighbor entry is cleared
|
|
Advertisement
|
All neighbors communicate normally in
both direction, or DLDP remains in active status for more than five seconds and
enters this status. It is a stable status when no unidirectional link is
found
|
|
Probe
|
DLDP sends packets to check if it is a
unidirectional link. It enables the probe sending timer and an echo waiting
timer for each target neighbor.
|
|
Disable
|
DLDP detects a unidirectional link, or
finds (in enhanced mode) that a neighbor ages. In this case, DLDP does not
receive or send DLDP packets.
|
II. DLDP timers
DLDP works with the following timers:
Table 1-2 DLDP timers
|
Timer
|
Description
|
|
Advertisement sending timer
|
Interval of sending advertisement
packets, which can be configured with a command line.
By default, the interval is 10 seconds.
|
|
Probe sending timer
|
The interval is 1 second. In probe
status, DLDP sends two probe packets every second.
|
|
Echo waiting timer
|
It is enabled when DLDP enters probe
status. The timeout time is 10 seconds.
If no echo packet is received from the
neighbor when the Echo waiting timer expires, the local end is set to unidirectional
communication status and the state machine turns into disable status. DLDP
outputs log and tracking information, sends flush packets. Depending on the
user-defined DLDP down mode, DLDP disables the local port automatically or
prompt the user to disable the port manually. At the same time, DLDP deletes
the neighbor entry.
|
|
Entry aging timer
|
When a new neighbor joins, a neighbor
entry is created, and the corresponding entry aging timer is enabled.
When an advertisement packet is received from
a neighbor, the neighbor entry is updated, and the corresponding entry aging
timer is updated.
In normal mode, if no packet is received
from the neighbor when the entry aging timer expires, DLDP sends an
advertisement packet with RSY tag, and deletes the neighbor entry.
In enhanced mode, if no packet is
received from the neighbor when the entry aging timer expires, DLDP enables
the enhanced timer.
The interval set for the entry aging
timer is three times of that for the advertisement timer.
|
|
Enhanced timer
|
In enhanced mode, if no packet is
received from the neighbor when the entry aging timer expires, DLDP enables
the enhanced timer for the neighbor. The timeout time for the enhanced timer
is 10 seconds.
The enhanced timer then sends two probe
packets every one second and totally eight packets continuously to the
neighbor.
If no echo packet is received from the
neighbor when the Enhanced timer expires, the local end is set to
unidirectional communication status and the state machine turns into disable
status. DLDP outputs log and tracking information, and sends flush packets.
Depending on the user-defined DLDP down mode, DLDP disables the local port
automatically or prompt the user to disable the port manually. DLDP deletes
the neighbor entry.
|
III. DLDP operating mode
DLDP can operate in two modes: normal and
enhanced.
Table 1-3 DLDP operating mode and
neighbor entry aging
|
DLDP operating mode
|
DLDP probes neighbor during neighbor
entry aging
|
Enabling entry aging timer during
neighbor entry aging
|
Enabling enhanced timer when entry
aging timer expires
|
|
Normal mode
|
No
|
Yes (the neighbor entry ages after the
entry aging timer expires)
|
No
|
|
Enhanced mode
|
Yes
|
Yes (the enhanced timer is enabled after
the entry aging timer expires)
|
Yes (When the enhanced timer expires, the
local end is set to single pass status, and the neighbor entry ages)
|
IV. DLDP implementation
1)
If the DLDP-enabled link is up, DLDP sends DLDP
packets to the peer device, and analyses and processes DLDP packets received
from the peer device. DLDP in different status sends different packets.
Table 1-4 Types of packets sent by DLDP
|
DLDP status
|
Packet types
|
|
Active
|
Advertisement packets, including those
with or without RSY tags
|
|
Advertisement
|
Advertisement packets
|
|
Probe
|
Probe packets
|
2)
DLDP analyzes and processes received packets as
follows:
l
In authentication mode, DLDP authenticates the
packets, and discards those do not pass the authentication.
l
DLDP processes the received DLDP packets.
Table 1-5 Process received DLDP packets
|
Packet type
|
Processing procedure
|
|
Advertisement packet
|
Extract neighbor information
|
If this neighbor entry does not exist on
the local device, DLDP creates the neighbor entry, enables the entry aging
timer of the neighbor entry, and turns to probe status.
|
|
If the neighbor entry already exists on the
local device, DLDP refreshes the entry aging timer.
|
|
Flush packet
|
Delete the neighbor entry from the local
device
|
|
Probe
packet
|
Send echo
packets containing both neighbor and its own information to the peer
|
Create the
neighbor entry if this neighbor entry does not exist on the local device.
|
|
If the
neighbor entry already exists on the local device, refresh the entry aging
timer.
|
|
Echo
packet
|
Check
whether the local device is in probe status
|
No
|
Discard
this echo packet
|
|
Yes
|
Check
whether neighbor information in the packet is the same as that on the local
device
|
No
|
Discard
this echo packet
|
|
Yes
|
Set the
neighbor flag bit to bidirectional
|
|
If all neighbors are in bidirectional
communication state, DLDP turns from probe status to advertisement status,
and sets the echo waiting timer to 0.
|
3)
If no echo packet is received from the neighbor,
DLDP performs the following processing:
Table 1-6 Processing procedure when no
echo packet is received from the neighbor
|
No Echo packet received from the
neighbor
|
Processing procedure
|
|
In normal mode, no echo packet is received
when the echo waiting timer expires
|
DLDP turns into disable status. It
outputs log and tracking information, sends flush packets. Depending on the
user-defined DLDP down mode, DLDP disables the local port automatically or
prompt the user to disable the port manually. DLDP sends the RSY message and
deletes the neighbor entry.
|
|
In enhanced mode, no echo packet is
received when the enhanced timer expires
|
l
DLDP works only when the link is up.
l
To insure that DLDP neighbors can be established
properly and unidirectional links can be detected, you must make sure: DLDP is
enabled on both ends, and the interval of sending DLDP advertisement packets,
authentication mode and password are consistent on both ends.
l
You can adjust the interval of sending DLDP
advertisement packets (which is 10 seconds by default and in the range of 5
seconds to 100 seconds) in different network circumstances, so that DLDP can
respond rapidly to link failure. The interval must be shorter than one-third of
the STP convergence time, which is generally 30 seconds. If too long an
interval is set, an STP loop may occur before DLDP shut down unidirectional
links. On the contrary, if too short an interval is set, network traffic increases,
and port bandwidth is reduced.
l
DLDP is also applicable to Discarding ports.
Ports discarded by STP can set up normal DLDP neighbors and detect
unidirectional links.
l
DLDP does not process any LACP event, and treats
each link in the aggregation group as independent.
l
The mandatory duplex mode must be enabled on
both ends of the DLDP link. In this way, unidirectional links will be reported
and the ports can be shut down as required; if the auto-negotiation duplex mode
is configured on both ends, unidirectional links will not be reported and ports
will not be shut down, while only the state of DLDP neighbors changes.
l
If DLDP is enabled after unidirectional links
appear, DLDP cannot detect unidirectional links.
l
DLDP can detect only the two optical interfaces
connected through an optical fiber directly, and DLDP cannot be used cross
devices.
l
DLDP cannot be used together with similar
protocols of other companies, that is, you cannot enable DLDP on one end and
enable one of the similar protocols of other companies.
For XGbus products, pay attention to the
following points:
l
When interface boards are hot swapped, if the
plugged interface board is of the same type as the pulled interface board, DLDP
restores automatically.
l
When active/standby switchover is performed on
an SRPU, the standby SRPU detects unidirectional links instead of the SRPU.
DLDP parameters remain the same and unidirectional links are detected again on
each port.
The following table describes the DLDP configuration
tasks:
Table 1-7 DLDP configuration tasks
|
Operation
|
Command
|
Description
|
|
Enter system view
|
system-view
|
—
|
|
Enable
DLDP
|
Enable
DLDP globally
|
dldp
enable
|
Required.
Enable
DLDP globally and then enable DLDP on the specified port.
|
|
Enable DLDP on a port
|
Enter Ethernet port view
|
interface
{ interface-type interface-number | interface-name }
|
|
Enable DLDP on a port
|
dldp enable
|
|
Set the authentication mode and password
|
dldp authentication-mode { none | simple simple-password | md5 md5-password
}
|
Optional
By default, the authentication mode is none,
that is, authentication is not performed.
|
|
Set the interval of sending DLDP packets
|
dldp interval integer
|
Optional. By default, the interval of
sending DLDP packets is 10 seconds.
|
|
Set the DLDP handling mode when an
unidirectional link is detected
|
dldp unidirectional-shutdown { auto | manual }
|
Optional
By default, the handling mode is auto
|
|
Set the operating mode of DLDP
|
dldp work-mode { enhance | normal }
|
Optional
By default, DLDP works in normal mode.
|
|
Enter Ethernet port view
|
interface interface-type interface-number
|
—
|
|
Force the duplex attribute
|
duplex full
|
Required
If you want to use DLDP to detect which
fiber of the two fibers is not connected or fails, you must configure the
ports to work in the mandatory full duplex mode.
|
|
Force the speed value
|
speed speed-value
|
Required
|
|
Display the configuration information
about the DLDP-enabled ports
|
display dldp [ interface-type interface-number ]
|
—
|
l
When you use the dldp enable/dldp disable command
in system view to enable/disable DLDP globally on all optical ports of the
switch, this command is only valid for existing optical ports on the device,
however, it is not valid for those added subsequently.
l
DLDP can operate normally only when the same
authentication mode and password are set for local and peer ports.
l
When the DLDP protocol works in normal mode, the
system can identify only one type of unidirectional links: cross-connected
fibers.
l
When the DLDP protocol works in enhanced mode,
the system can identify two types of unidirectional links: the first type is
the cross-connected fiber, and the second type is one of the two fibers is not
connected or fails.
l
When the device is busy with services and the
CPU utilization is high, DLDP may issue mistaken reports. You are recommended to
configure the operating mode of DLDP as manual after unidirectional links are
discovered, so as to reduce the influence of DLDP mistaken reports.
Only after the
ports are DLDP down due to the detection of unidirectional links can you use
the dldp reset command to reset the DLDP status of these ports to
retrieve DLDP probes.
Table 1-8 Reset DLDP status
|
Operation
|
Command
|
Description
|
|
Reset the status of DLDP
|
Enter
system view
|
system-view
|
—
|
|
Reset the status of DLDP globally
|
dldp reset
|
Optional
|
|
Reset the status of DLDP on a port
|
Enter Ethernet port view
|
interface interface-type interface-number
|
—
|
|
Reset the status of DLDP on 100 M
Ethernet ports
|
dldp reset
|
Optional
|
|
Reset the status of DLDP on Gigabit
Ethernet ports
|
dldp reset
|
Caution:
l
This command only applies to the ports in DLDP
down status.
l
If a port is DLDP down, it cannot return to the
up state automatically even if the link is restored. You must use the dldp
reset command to bring the port back to the up state.
I. Network requirements
As shown in Figure
1-1:
l
Switch A and Switch B are connected through two
pairs of fibers. Both of them support DLDP;
l
Suppose the fibers between Switch A and Switch B
are cross-connected. DLDP disconnects the unidirectional links after detecting
them;
l
When the network administrator connects the
fiber correctly, the ports taken down by DLDP are restored.
II. Network diagram

Figure 1-3 Fiber
cross-connection
III. Configuration procedure
1)
Configure Switch A
# Configure the ports to work in mandatory
full duplex mode at the speed of 1000 Mbps.
<H3CA> system-view
[H3CA] interface gigabitethernet
2/1/3
[H3CA-GigabitEthernet2/1/3] duplex
full
[H3CA-GigabitEthernet2/1/3] speed
1000
[H3CA-GigabitEthernet2/1/3] quit
[H3CA] interface gigabitethernet
2/1/4
[H3CA-GigabitEthernet2/1/4] duplex
full
[H3CA-GigabitEthernet2/1/4] speed
1000
[H3CA-GigabitEthernet2/1/4] quit
# Enable DLDP globally
[H3CA] dldp enable
# Set the interval of sending DLDP packets
to 15 seconds
[H3CA] dldp interval 15
# Configure DLDP to work in enhanced mode
[H3CA] dldp work-mode enhance
# Set the DLDP handling mode to auto after
unidirectional links are detected
[H3CA] dldp unidirectional-shutdown
auto
# Display the DLDP status
[H3CA] display dldp
If the fibers are correctly connected
between the two switches, the system displays the connections with the neighbor
as bidirectional links.
When the fibers are not correctly
connected:
l
When the fibers are cross-connected, both ends
are unidirectional links and the two ends are displayed as in Disable status;
l
When one end is correctly connected and the
other end is not connected, one end is in Advertisement status and the other is
in Inactive status.
# Restore the ports taken down by DLDP
[H3CA] dldp reset
2)
Configure Switch B
The configuration of Switch B is the same
to that of Switch A.
l
Suppose the port works in the mandatory full
duplex mode and the connection at both ends of the link is normal. After DLDP
is enabled, if the optical fiber in one end is not connected, DLDP will report
that the link is a unidirectional link.
l
Suppose the port works in the non-mandatory full
duplex mode. If the optical fiber in one end is not connected, DLDP does not
take effect even if it is enabled. In this case, the port is though to be down.
l
If the link has been a unidirectional link and
then DLDP is enabled, DLDP cannot detect the unidirectional link.