- Table of Contents
-
- 12-High Availability Configuration Guide
- 00-Preface
- 01-High Availability Overview
- 02-Active and Standby Switchover Configuration
- 03-Ethernet OAM Configuration
- 04-CFD Configuration
- 05-DLDP Configuration
- 06-RPR Configuration
- 07-RRPP Configuration
- 08-Smart Link Configuration
- 09-Monitor Link Configuration
- 10-VRRP Configuration
- 11-BFD Configuration
- 12-Track Configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
05-DLDP Configuration | 238.93 KB |
Contents
Configuring the duplex mode and speed of an Ethernet interface
Setting the interval to send advertisement packets
Setting the port shutdown mode
Configuring DLDP authentication
Displaying and maintaining DLDP
Automatically shutting down unidirectional links
Manually shutting down unidirectional links
Overview
Background
Unidirectional links occur when one end of a link can receive packets from the other end, but the other end cannot receive packets sent by the first end. Unidirectional links result in problems such as loops in an STP-enabled network.
For example, the link between Switch A and Switch B is bidirectional when they are connected through a fiber pair, with one fiber used for sending packets from A to B and the other for sending packets from B to A. This link is a two-way link. If one of these fibers gets broken, the link becomes unidirectional (one-way link).
There are two types of unidirectional fiber links. One occurs when fibers are cross-connected. The other occurs when a fiber is not connected, or when one fiber of a fiber pair gets broken. Figure 1 shows a correct fiber connection and the two types of unidirectional fiber connection.
Figure 1 Correct and incorrect fiber connections
The Device Link Detection Protocol (DLDP) detects unidirectional links (fiber links or twisted-pair links) and can be configured to shut down the related port automatically or prompt users to take actions to avoid network problems.
As a data link layer protocol, DLDP cooperates with physical layer protocols to monitor link status. While the auto-negotiation mechanism provided by the physical layer detects physical signals and faults, DLDP performs operations such as identifying peer switches, detecting unidirectional links, and shutting down unreachable ports. The auto-negotiation mechanism and DLDP work together to make sure that physical/logical unidirectional links can be detected and shut down, and to prevent failure of other protocols such as STP. If both ends of a link are operating normally at the physical layer, DLDP detects whether the link is correctly connected at the link layer and whether the two ends can exchange packets properly. This is beyond the capability of auto-negotiation mechanisms of the physical layer.
How DLDP works
DLDP link states
A switch is in one of these DLDP link states: Initial, Inactive, Active, Advertisement, Probe, Disable, and DelayDown.
Table 1 DLDP link states
State |
Indicates… |
Initial |
DLDP is disabled. |
Inactive |
DLDP is enabled and the link is down. |
Active |
DLDP is enabled and the link is up, or the neighbor entries have been cleared. |
Advertisement |
All neighbors are bi-directionally reachable or DLDP has been in active state for more than five seconds. This is a relatively stable state where no unidirectional link has been detected. |
Probe |
DLDP enters this state if it receives a packet from an unknown neighbor. In this state, DLDP sends packets to check whether the link is unidirectional. As soon as DLDP transitions to this state, a probe timer starts and an echo timeout timer starts for each neighbor to be probed. |
Disable |
A port enters this state when: · A unidirectional link is detected. · The contact with the neighbor in enhanced mode gets lost. In this state, the port does not receive or send packets other than DLDPDUs. |
DelayDown |
A port in the Active, Advertisement, or Probe DLDP link state transitions to this state rather than removes the corresponding neighbor entry and transitions to the Inactive state when it detects a port-down event. When a port transitions to this state, the DelayDown timer is triggered. |
DLDP timers
Table 2 DLDP timers
DLDP timer |
Description |
Active timer |
Determines the interval to send Advertisement packets with RSY tags, which defaults to 1 second. By default, a switch in the active DLDP link state sends one Advertisement packet with RSY tags every second. The maximum number of advertisement packets with RSY tags that can be sent successively is 5. |
Advertisement timer |
Determines the interval for sending common advertisement packets, which defaults to 5 seconds. |
Probe timer |
Determines the interval sending Probe packets, which defaults to 1 second. By default, a switch in the probe state sends one Probe packet every second. The maximum number of Probe packets that can be sent successively is 10. |
Echo timer |
This timer is set to 10 seconds. It is triggered when a switch transitions to the Probe state or when an enhanced detect is launched. When the Echo timer expires and no Echo packet has been received from a neighbor switch, the state of the link is set to unidirectional and the switch transitions to the Disable state. When this occurs, the switch does the following: · Sends Disable packets. · Prompts the user to shut down the port or shuts down the port automatically (depending on the DLDP down mode configured). · Removes the corresponding neighbor entries. |
Entry timer |
When a new neighbor joins, a neighbor entry is created and the corresponding entry timer is triggered. When a DLDP packet is received, the switch updates the corresponding neighbor entry and the entry timer. In normal mode, if no packet is received from a neighbor when the corresponding entry timer expires, DLDP sends advertisement packets with RSY tags and removes the neighbor entry. In enhanced mode, if no packet is received from a neighbor when the Entry timer expires, DLDP triggers the enhanced timer. The setting of an Entry timer is three times that of the Advertisement timer. |
Enhanced timer |
In enhanced mode, this timer is triggered if no packet is received from a neighbor when the entry timer expires. Enhanced timer is set to 1 second. After the Enhanced timer is triggered, the switch sends up to eight probe packets to the neighbor at a frequency of one packet per second. |
DelayDown timer |
A switch in Active, Advertisement, or Probe DLDP link state transitions to DelayDown state rather than removes the corresponding neighbor entry and transitions to the Inactive state when it detects a port-down event. When a switch transitions to this state, the DelayDown timer is triggered. A switch in DelayDown state only responds to port-up events. If a switch in DelayDown state detects a port-up event before the DelayDown timer expires, it resumes its original DLDP state. If not, when the DelayDown timer expires, the switch removes the corresponding DLDP neighbor information and transits to the Inactive state. |
RecoverProbe timer |
This timer is set to 2 seconds. In other words, a port in the Disable state sends one RecoverProbe packet every two seconds to detect whether a unidirectional link has restored. |
DLDP mode
DLDP can operate in two modes: normal mode and enhanced mode, as described below:
· In normal DLDP mode, when an entry timer expires, the switch removes the corresponding neighbor entry and sends an Advertisement packet with the RSY tag.
· In enhanced DLDP mode, when an entry timer expires, the Enhanced timer is triggered and the switch tests the neighbor by sending up to eight Probe packets at the frequency of one packet per second. If no Echo packet has been received from the neighbor when the Echo timer expires, the switch transitions to the Disable state.
Table 3 DLDP mode and neighbor entry aging
DLDP mode |
Detecting a neighbor after the corresponding neighbor entry ages out |
Removing the neighbor entry immediately after the Entry timer expires |
Triggering the Enhanced timer after an Entry timer expires |
Normal DLDP mode |
No |
Yes |
No |
Enhanced DLDP mode |
Yes |
No |
Yes |
Table 4 DLDP mode and unidirectional link types
Unidirectional link type |
Whether it occurs on fibers |
Whether it occurs on copper twisted pairs |
In which DLDP mode unidirectional links can be detected |
Cross-connected link |
Yes |
No |
Both normal and enhanced modes |
Connectionless or broken link |
Yes |
Yes |
Only enhanced mode. The port that can receive optical signals is in Disable state, while the other port is in Inactive state. |
Enhanced DLDP mode is designed for addressing black holes. It prevents situations where one end of a link is up and the other is down.
If you configure forced speed and full duplex mode on a port, the situation shown in Figure 2 may occur (take the fiber link for example). Without DLDP enabled, the port on Switch B is actually down but its state cannot be detected by common data link protocols, so the port on Switch A is still up. However, in enhanced DLDP mode, the following occurs:
The port on Device B is in Inactive DLDP state because it is physically down.
The port on Switch A tests the peer port on Switch B after the Entry timer for the port on Switch B expires. The port on Switch A transits to the Disable state if it does not receive an Echo packet from the port on Switch B when the Echo timer expires.
Figure 2 A scenario for enhanced DLDP mode
DLDP authentication mode
You can use DLDP authentication to prevent network attacks and illegal detecting. There are three through DLDP authentication. Three DLDP authentication modes exist, as described below.
· Non-authentication
The sending side sets the Authentication field and the Authentication type field of DLDP packets to 0. The receiving side checks the values of the two fields of received DLDP packets and drops the packets where the two fields conflict with the corresponding local configuration.
· Plain text authentication
Before sending a DLDP packet, the sending side sets the Authentication field to the password configured in plain text and sets the Authentication type field to 1.
The receiving side checks the values of the two fields in received DLDP packets and drops any packets where the two fields conflict with the corresponding local configuration.
· MD5 authentication
Before sending a packet, the sending side encrypts the user configured password using MD5 algorithm, assigns the digest to the Authentication field, and sets the Authentication type field to 2.
The receiving side checks the values of the two fields in received DLDP packets and drops any packets where the two fields conflict with the corresponding local configuration.
DLDP processes
1. On a DLDP-enabled link that is in up state, DLDP sends DLDP packets to the peer switch and processes the DLDP packets received from the peer switch. DLDP packets sent vary with DLDP states. Table 5 lists DLDP states and their packet types.
Table 5 DLDP packet types and DLDP states
DLDP state |
Type of DLDP packets sent |
Active |
Advertisement packet with RSY tag |
Advertisement |
Normal Advertisement packet |
Probe |
Probe packet |
Disable |
Disable packet and then RecoverProbe packet |
|
NOTE: A switch sends Flush packets when it transits to Initial state from Active, Advertisement, Probe, or DelayDown state but does not send them when it transits to the Initial state from Inactive or Disable state. |
2. A received DLDP packet is processed as follows:
¡ In any of the three authentication modes, the packet is dropped if it fails to pass the authentication.
¡ The packet is dropped if the setting of the interval to send Advertisement packets it carries conflicts with the corresponding local setting.
¡ Other processes are shown in Table 6.
Table 6 Procedures for processing different types of DLDP packets received
Packet type |
Processing procedure |
||
Advertisement packet with RSY tag |
Retrieves the neighbor information |
If the corresponding neighbor entry does not exist, creates the neighbor entry, triggers the Entry timer, and transitions to Probe state. |
|
If the corresponding neighbor entry already exists, resets the Entry timer and transitions to Probe state. |
|||
Normal Advertisement packet |
Retrieves the neighbor information |
If the corresponding neighbor entry does not exist, creates the neighbor entry, triggers the Entry timer, and transitions to Probe state. |
|
If the corresponding neighbor entry already exists, resets the Entry timer. |
|||
Flush packet |
Determines whether or not the local port is in Disable state |
If yes, performs no process. |
|
If no, removes the corresponding neighbor entry (if any). |
|||
Probe packet |
Retrieves the neighbor information |
If the corresponding neighbor entry does not exist, creates the neighbor entry, transitions to Probe state, and returns Echo packets. |
|
If the corresponding neighbor entry already exists, resets the Entry timer and returns Echo packets. |
|||
Echo packet |
Retrieves the neighbor information |
If the corresponding neighbor entry does not exist, creates the neighbor entry, triggers the Entry timer, and transitions to Probe state. |
|
The corresponding neighbor entry already exists |
If the neighbor information it carries conflicts with the corresponding locally maintained neighbor entry, drops the packet. |
||
Otherwise, sets the flag of the neighbor as two-way connected. In addition, if the flags of all the neighbors are two-way connected, the switch transitions from Probe state to Advertisement state, and disables the Echo timer. |
|||
Disable packet |
Checks whether the local port is in Disable state |
If yes, performs no process. |
|
If not, sets the state of the corresponding neighbor to unidirectional, and then checks the state of other neighbors. If all the neighbors are unidirectional, transitions the local port to the Disable state. If the state of some neighbors is unknown, waits until the state of these neighbors is determined. If bidirectional neighbors are present, removes all unidirectional neighbors. |
|||
RecoverProbe packet |
Checks whether the local port is in Disable or Advertisement state |
If not, performs no process. |
|
If yes, returns RecoverEcho packets. |
|||
RecoverEcho packet |
Checks whether the local port is in Disable state |
If not, performs no process. |
|
If yes, the local port transitions to Active state if the neighbor information the packet carries is consistent with the local port information. |
|||
LinkDown packet |
Checks whether the local port operates in Enhanced mode |
If not, performs no process. |
|
If yes and the local port is not in Disable state, sets the state of the corresponding neighbor to unidirectional, and then checks the state of other neighbors. If all the neighbors are unidirectional, transitions the local port to the Disable state. If the state of some neighbors is unknown, waits until the state of these neighbors is determined. If bidirectional neighbors are present, removes all unidirectional neighbors. |
3. If no echo packet is received from the neighbor, DLDP performs the following processing.
Table 7 DLDP process 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 timer expires. |
DLDP sets the state of the corresponding neighbor to unidirectional, and then checks the state of other neighbors: · If all the neighbors are unidirectional, removes all the neighbors, transitions to the Disable state, outputs log and tracking information, and sends Disable packets. In addition, depending on the user-defined DLDP down mode, shuts down the local port or prompts users to shut down the port. · If the state of some neighbors is unknown, waits until the state of these neighbors is determined. · If bidirectional neighbors are present, removes all unidirectional neighbors. |
In enhanced mode, no echo packet is received when the Echo timer expires. |
Link auto-recovery mechanism
If the port shutdown mode upon detection of a unidirectional link is set to auto, DLDP automatically sets the state of the port where a unidirectional link is detected to DLDP down. A DLDP down port cannot forward data traffic or send/receive any PDU except DLDPDUs.
On a DLDP down port, DLDP monitors the unidirectional link. Once DLDP finds out that the state of the link has restored to bidirectional, it brings up the port. The specific process is as follows:
The DLDP down port sends out a RecoverProbe packet, which carries only information about the local port, every two seconds. Upon receiving the RecoverProbe packet, the remote end returns a RecoverEcho packet. Upon receiving the RecoverEcho packet, the local port checks whether neighbor information in the RecoverEcho packet is the same as the local port information. If they are the same, the link between the local port and the neighbor is considered to have been restored to a bidirectional link, and the port will transit from Disable state to Active state and re-establish relationship with the neighbor.
Only DLDP down ports can send and process Recover packets, including RecoverProbe packets and RecoverEcho packets. If related ports are manually shut down with the shutdown command, the auto-recovery mechanism will not take effect.
DLDP neighbor state
A DLDP neighbor can be in one of the three states described in Table 8.
Table 8 Description of DLDP neighbor states
DLDP neighbor state |
Description |
Unknown |
A neighbor is in this state when it is just detected and is being probed. A neighbor is in this state only when it is being probed. It transitions to Two way state or Unidirectional state after the probe operation finishes. |
Two way |
A neighbor is in this state after it receives response from its peer. This state indicates the link is a two-way link. |
Unidirectional |
A neighbor is in this state when the link connecting it is detected to be a unidirectional link. After a switch transitions to this state, the corresponding neighbor entries maintained on other switches are removed. |
DLDP configuration task list
Complete the following tasks to configure DLDP:
Task |
Remarks |
Configuring the duplex mode and speed of an Ethernet interface |
Required |
Required |
|
Optional |
|
Optional |
|
Optional |
|
Optional |
|
Optional |
|
Optional |
|
CAUTION: · For DLDP to work properly, enable DLDP on both sides and make sure these settings are consistent: the interval to send Advertisement packets, DLDP authentication mode, and password. · DLDP does not process any link aggregation control protocol (LACP) events. The links in an aggregation are treated as individual links in DLDP. · Make sure the DLDP version running on devices on the two ends are the same. |
Configuring the duplex mode and speed of an Ethernet interface
To make sure that DLDP works properly on a link, you must configure the full duplex mode for the ports at two ends of the link, and configure a speed for the two ports, rather than letting them negotiate a speed.
To configure the duplex mode and speed of an Ethernet interface:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter Ethernet interface view. |
interface interface-type interface-number |
N/A |
3. Set the duplex mode. |
duplex full |
Optional. By default, full for a 10-GE interface, and auto for other Ethernet interfaces. |
4. Set the port speed. |
speed { 10 | 100 | 1000 | 10000 |
Optional. |
|
NOTE: For more information about the duplex and speed commands, see Ethernet interface configuration commands in the Interface Command Reference. |
Enabling DLDP
To properly configure DLDP on the switch, first enable DLDP globally, and then enable it on each port.
To enable DLDP:
Command |
Remarks |
|
1. Enter system view. |
system-view |
N/A |
2. Enable DLDP globally. |
dldp enable |
Globally disabled by default. |
3. Enter Ethernet port view or port group view. |
·
Enter Ethernet port view: ·
Enter port group view: |
Use either command. Configurations made in Ethernet port view apply to the current port only. Configurations made in port group view apply to all ports in the port group. |
4. Enable DLDP. |
dldp enable |
Disabled on a port by default. |
|
NOTE: · DLDP takes effect only on Ethernet interfaces (optical or copper). · Before enabling DLDP, make sure that optical fibers or copper twisted pairs are connected, because DLDP can detect unidirectional links only after all physical links are connected. |
Setting DLDP mode
DLDP works in normal or enhanced mode. In normal mode, DLDP does not actively detect neighbors when the corresponding neighbor entries age out. In enhanced mode, DLDP actively detects neighbors when the corresponding neighbor entries age out.
To set DLDP mode:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Set DLDP mode. |
dldp work-mode { enhance | normal } |
Optional Normal by default |
Setting the interval to send advertisement packets
DLDP detects unidirectional links by sending Advertisement packets. To make sure that DLDP can detect unidirectional links in time without affecting network performance, set the advertisement interval appropriately depending on your network environment. The interval should be set shorter than one third of the STP convergence time. If the interval is set too long, STP loops may occur before unidirectional links are detected and shut down. If the interval is set too short, the number of advertisement packets will increase. In most cases, H3C recommends that you use the default interval.
To set the interval to send Advertisement packets:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Set the interval to send Advertisement packets. |
dldp interval time |
Optional 5 seconds by default |
|
NOTE: · The interval for sending Advertisement packets applies to all DLDP-enabled ports. · To enable DLDP to operate properly, make sure the intervals for sending Advertisement packets on both sides of a link are the same. |
Setting the delaydown timer
On some ports, when the Tx line fails, the port goes down and then comes up again, causing optical signal jitters on the Rx line. When a port goes down due to a Tx failure, the switch transitions to the DelayDown state instead of the Inactive state to prevent the corresponding neighbor entries from being removed. At the same time, the switch triggers the DelayDown timer. If the port goes up before the timer expires, the switch restores the original state; if the port remains down when the timer expires, the switch transits to the Inactive state.
To set the DelayDown timer:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Set the DelayDown timer. |
dldp delaydown-timer time |
Optional 1 second by default |
|
NOTE: DelayDown timer setting applies to all DLDP-enabled ports. |
Setting the port shutdown mode
On detecting a unidirectional link, the ports can be shut down in one of the following two modes.
· Manual mode. This mode applies to low performance networks, where normal links may be treated as unidirectional links. It protects data traffic transmission against false unidirectional links. In this mode, DLDP only detects unidirectional links but does not automatically shut down unidirectional link ports. Instead, the DLDP state machine generates log and traps to prompt you to manually shut down unidirectional link ports with the shutdown command. H3C recommends that you do that as prompted. Then the DLDP state machine transitions to the Disable state.
· Auto mode. In this mode, when a unidirectional link is detected, DLDP transitions to Disable state, generates log and traps, and sets the port state to DLDP Down.
To set port shutdown mode:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Set port shutdown mode. |
dldp unidirectional-shutdown { auto | manual } |
Optional auto by default |
|
NOTE: · On a port with both remote OAM loopback and DLDP enabled, if the port shutdown mode is auto mode, the port will be shut down by DLDP when it receives a packet sent by itself, causing remote OAM loopback to operate improperly. Therefore, it is a good practice to set the port shutdown mode to manual mode. · If the switch is busy, or the CPU usage is high, normal links may be treated as unidirectional links. In this case, you can set the port shutdown mode to manual mode to alleviate the impact caused by false unidirectional link report. |
Configuring DLDP authentication
You can guard your network against attacks and malicious probes by configuring an appropriate DLDP authentication mode, which can be clear text authentication or MD5 authentication. If your network is safe, you can choose not to authenticate.
To configure DLDP authentication:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Configure DLDP authentication. |
dldp authentication-mode { md5 md5-password | none | simple simple-password } |
none by default |
|
NOTE: To enable DLDP to operate properly, make sure that DLDP authentication modes and passwords configured on both sides of a link are the same. |
Resetting DLDP state
After DLDP detects a unidirectional link on a port, the port enters Disable state. In this case, DLDP prompts you to shut down the port manually or shuts down the port automatically depending on the user-defined port shutdown mode. To enable the port to perform DLDP detect again, you can reset the DLDP state of the port by using one of the following methods:
· If the port is shut down with the shutdown command manually, run the undo shutdown command on the port.
· If the port is shut down by DLDP automatically, run the dldp reset command on the port, or you can wait for DLDP to automatically enable the port when it detects that the link has been restored to bidirectional. For how to reset DLDP state with the dldp reset command, see “Resetting DLDP state in system view” and “Resetting DLDP state in port view or port group view.”
Upon the DLDP state reset operation, the DLDP state that the port transitions to depends on its physical state. If the port is physically down, it transitions to Inactive state. If the port is physically up, it transitions to Active state.
Resetting DLDP state in system view
Resetting DLDP state in system view applies to all the ports shut down by DLDP.
To reset DLDP in system view:
Step |
Command |
1. Enter system view. |
system-view |
2. Reset DLDP state. |
dldp reset |
Resetting DLDP state in port view or port group view
Resetting DLDP state in port view or port group view applies to the current port or all the ports in the port group shut down by DLDP.
To reset DLDP state in port view/port group view:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter Ethernet port view or port group view. |
·
Enter Ethernet port view: ·
Enter port group view: |
Use either command. Configurations made in Ethernet port view apply to the current port only. Configurations made in port group view apply to all the ports in the port group. |
3. Reset DLDP state. |
dldp reset |
N/A |
Displaying and maintaining DLDP
Task |
Command |
Remarks |
Display the DLDP configuration of a port. |
display dldp [ interface-type interface-number ] [ | { begin | exclude | include } regular-expression ] |
Available in any view |
Display the statistics on DLDP packets passing through a port. |
display dldp statistics [ interface-type interface-number ] [ | { begin | exclude | include } regular-expression ] |
Available in any view |
Clear the statistics on DLDP packets passing through a port. |
reset dldp statistics [ interface-type interface-number ] |
Available in user view |
DLDP configuration examples
|
NOTE: By default, Ethernet, VLAN, and aggregate interfaces are in DOWN state. Before configuring these interfaces, use the undo shutdown command to bring them up. |
Automatically shutting down unidirectional links
Network requirements
As shown in Figure 3,
· Two switches, Device A and Device B, are connected with two fiber pairs.
· Configure DLDP to automatically shut down the faulty port upon detecting a unidirectional link, and automatically bring up the port after the fault is cleared.
Configuration procedure
1. Configure Device A:
# Enable DLDP globally.
<DeviceA> system-view
[DeviceA] dldp enable
# Configure Gigabitethernet 2/0/1 to operate in full duplex mode, configure the port rate as 1000 Mbps, and enable DLDP on the port.
[DeviceA] interface gigabitethernet 2/0/1
[DeviceA-Gigabitethernet2/0/1] duplex full
[DeviceA-Gigabitethernet2/0/1] speed 1000
[DeviceA-Gigabitethernet2/0/1] dldp enable
[DeviceA-Gigabitethernet2/0/1] quit
# Configure Gigabitethernet 2/0/2 to operate in full duplex mode, configure the port rate as 1000 Mbps, and enable DLDP on the port.
[DeviceA] interface gigabitethernet 2/0/2
[DeviceA-Gigabitethernet2/0/2] duplex full
[DeviceA-Gigabitethernet2/0/2] speed 1000
[DeviceA-Gigabitethernet2/0/2] dldp enable
[DeviceA-Gigabitethernet2/0/2] quit
# Set the DLDP mode to enhanced.
[DeviceA] dldp work-mode enhance
# Set the port shutdown mode to auto.
[DeviceA] dldp unidirectional-shutdown auto
2. Configure Device B:
# Enable DLDP globally, configure Gigabitethernet 2/0/1 and Gigabitethernet 2/0/2 to operate in full duplex mode, and then enable DLDP on the two ports.
<DeviceB> system-view
[DeviceB] dldp enable
[DeviceB] interface gigabitethernet 2/0/1
[DeviceB-Gigabitethernet2/0/1] duplex full
[DeviceB-Gigabitethernet2/0/1] speed 1000
[DeviceB-Gigabitethernet2/0/1] dldp enable
[DeviceB-Gigabitethernet2/0/1] quit
[DeviceB] interface gigabitethernet 2/0/2
[DeviceB-Gigabitethernet2/0/2] duplex full
[DeviceB-Gigabitethernet2/0/2] speed 1000
[DeviceB-Gigabitethernet2/0/2] dldp enable
[DeviceB-Gigabitethernet2/0/2] quit
# Set the DLDP mode to enhanced.
[DeviceB] dldp work-mode enhance
# Set the port shutdown mode to auto.
[DeviceB] dldp unidirectional-shutdown auto
3. Verify the configuration:
After the configurations are complete, you can use the display dldp command to display the DLDP configuration information on ports.
# Display the DLDP configuration information on all the DLDP-enabled ports of Device A.
[DeviceA] display dldp
DLDP global status : enable
DLDP interval : 5s
DLDP work-mode : enhance
DLDP authentication-mode : none
DLDP unidirectional-shutdown : auto
DLDP delaydown-timer : 1s
The number of enabled ports is 2.
Interface Gigabitethernet2/0/1
DLDP port state : advertisement
DLDP link state : up
The neighbor number of the port is 1.
Neighbor mac address : 0023-8956-3600
Neighbor port index : 59
Neighbor state : two way
Neighbor aged time : 11
Interface Gigabitethernet2/0/2
DLDP port state : advertisement
DLDP link state : up
The neighbor number of the port is 1.
Neighbor mac address : 0023-8956-3600
Neighbor port index : 60
Neighbor state : two way
Neighbor aged time : 12
The output shows that both Gigabitethernet 2/0/1 and Gigabitethernet 2/0/2 are in Advertisement state, which means both links are bidirectional.
# Enable system information monitoring on Device A, and enable the display of log and trap information.
[DeviceA] quit
<DeviceA> terminal monitor
<DeviceA> terminal logging
<DeviceA> terminal trapping
The following log and trap information is displayed on Device A:
<DeviceA>
#Jan 18 17:36:18:798 2010 DeviceA DLDP/1/TrapOfUnidirectional: -Slot=2; Trap 1.3.6.1.4.1.25506.2.43.2.1.1<hh3cDLDPUnidirectionalPort>: DLDP detects a unidirectional link in port 17825792.
%Jan 18 17:36:18:799 2010 DeviceA IFNET/3/LINK_UPDOWN: Gigabitethernet2/0/1 link status is DOWN.
%Jan 18 17:36:18:799 2010 DeviceA DLDP/3/DLDP_UNIDIRECTION_AUTO: -Slot=2; DLDP detects a unidirectional link on port Gigabitethernet2/0/1. The transceiver has malfunction in the Tx direction or cross-connected links exist between the local device and its neighbor. The shutdown mode is AUTO. DLDP shuts down the port.
#Jan 18 17:36:20:189 2010 DeviceA DLDP/1/TrapOfUnidirectional: -Slot=2; Trap 1.3.6.1.4.1.25506.2.43.2.1.1<hh3cDLDPUnidirectionalPort> : DLDP detects a unidirectional link in port 17825793.
%Jan 18 17:36:20:189 2010 DeviceA IFNET/3/LINK_UPDOWN: Gigabitethernet2/0/2 link status is DOWN.
%Jan 18 17:36:20:190 2010 DeviceA DLDP/3/DLDP_UNIDIRECTION_AUTO: -Slot=2; DLDP detects a unidirectional link on port Gigabitethernet2/0/2. The transceiver has malfunction in the Tx direction or cross-connected links exist between the local device and its neighbor. The shutdown mode is AUTO. DLDP shuts down the port.
%Jan 15 16:54:56:040 2010 DeviceA DLDP/3/DLDP_UNIDIRECTION_AUTO_ENHANCE: -Slot=2; In enhanced DLDP mode, port Gigabitethernet2/0/1 cannot detect its aged-out neighbor. The transceiver has malfunction in the Tx direction or cross-connected links exist between the local device and its neighbor. The shutdown mode is AUTO. DLDP shuts down the port.
The output shows that both Gigabitethernet 2/0/1 and Gigabitethernet 2/0/2 are down. DLDP has detected a unidirectional link on both ports, and has automatically shut them down.
Assume that in this example, the unidirectional links are caused by cross-connected fibers. Correct the fiber connections on detecting the unidirectional link problem. As a result, the ports shut down by DLDP automatically recover, and Device A displays the following log information:
%Jan 18 17:47:33:869 2010 DeviceA IFNET/3/LINK_UPDOWN: Gigabitethernet2/0/1 link status is UP.
%Jan 18 17:47:35:894 2010 DeviceA IFNET/3/LINK_UPDOWN: Gigabitethernet2/0/2 link status is UP.
The output shows that the link status of both Gigabitethernet 2/0/1 and Gigabitethernet 2/0/2 is now up.
Manually shutting down unidirectional links
Network requirements
As shown in Figure 4,
· Two switches, Device A and Device B, are connected with two fiber pairs.
· Make configuration so that DLDP, upon detecting a unidirectional link, reminds the network administrator to manually shut down the faulty port.
Configuration procedure
1. Configure Device A:
# Enable DLDP globally.
<DeviceA> system-view
[DeviceA] dldp enable
# Configure Gigabitethernet 2/0/1 to operate in full duplex mode, configure the port rate as 1000 Mbps, and enable DLDP on the port.
[DeviceA] interface gigabitethernet 2/0/1
[DeviceA-Gigabitethernet2/0/1] duplex full
[DeviceA-Gigabitethernet2/0/1] speed 1000
[DeviceA-Gigabitethernet2/0/1] dldp enable
[DeviceA-Gigabitethernet2/0/1] quit
# Configure Gigabitethernet 2/0/2 to operate in full duplex mode, configure the port rate as 1000 Mbps, and enable DLDP on the port.
[DeviceA] interface gigabitethernet 2/0/2
[DeviceA-Gigabitethernet2/0/2] duplex full
[DeviceA-Gigabitethernet2/0/2] speed 1000
[DeviceA-Gigabitethernet2/0/2] dldp enable
[DeviceA-Gigabitethernet2/0/2] quit
# Set the DLDP mode to enhanced.
[DeviceA] dldp work-mode enhance
# Set the port shutdown mode to manual.
[DeviceA] dldp unidirectional-shutdown manual
2. Configure Device B:
# Enable DLDP globally, configure Gigabitethernet 2/0/1 and Gigabitethernet 2/0/2 to operate in full duplex mode, and then enable DLDP on the two ports.
<DeviceB> system-view
[DeviceB] dldp enable
[DeviceB] interface gigabitethernet 2/0/1
[DeviceB-Gigabitethernet2/0/1] duplex full
[DeviceB-Gigabitethernet2/0/1] speed 1000
[DeviceB-Gigabitethernet2/0/1] dldp enable
[DeviceB-Gigabitethernet2/0/1] quit
[DeviceB] interface gigabitethernet 2/0/2
[DeviceB-Gigabitethernet2/0/2] duplex full
[DeviceB-Gigabitethernet2/0/2] speed 1000
[DeviceB-Gigabitethernet2/0/2] dldp enable
[DeviceB-Gigabitethernet2/0/2] quit
# Set the DLDP mode to enhanced.
[DeviceB] dldp work-mode enhance
# Set the port shutdown mode to manual.
[DeviceB] dldp unidirectional-shutdown manual
3. Verify the configuration:
After the configurations are complete, you can use the display dldp command to display the DLDP configuration information on ports.
# Display the DLDP configuration information on all the DLDP-enabled ports of Device A.
[DeviceA] display dldp
DLDP global status : enable
DLDP interval : 5s
DLDP work-mode : enhance
DLDP authentication-mode : none
DLDP unidirectional-shutdown : manual
DLDP delaydown-timer : 1s
The number of enabled ports is 2.
Interface Gigabitethernet2/0/1
DLDP port state : advertisement
DLDP link state : up
The neighbor number of the port is 1.
Neighbor mac address : 0023-8956-3600
Neighbor port index : 59
Neighbor state : two way
Neighbor aged time : 11
Interface Gigabitethernet2/0/2
DLDP port state : advertisement
DLDP link state : up
The neighbor number of the port is 1.
Neighbor mac address : 0023-8956-3600
Neighbor port index : 60
Neighbor state : two way
Neighbor aged time : 12
The output shows that both Gigabitethernet 2/0/1 and Gigabitethernet 2/0/2 are in Advertisement state, which means both links are bidirectional.
# Enable system information monitoring on Device A, and enable the display of log and trap information.
[DeviceA] quit
<DeviceA> terminal monitor
<DeviceA> terminal logging
<DeviceA> terminal trapping
The following log and trap information is displayed on Device A:
<DeviceA>
#Jan 18 18:10:38:481 2010 DeviceA DLDP/1/TrapOfUnidirectional: -Slot=2; Trap 1.3.6.1.4.1.25506.2.43.2.1.1<hh3cDLDPUnidirectionalPort> : DLDP detects a unidirectional link in port 17825792.
%Jan 18 18:10:38:481 2010 DeviceA DLDP/3/DLDP_UNIDIRECTION_MANUAL: -Slot=2; DLDP detects a unidirectional link on port Gigabitethernet2/0/1. The transceiver has malfunction in the Tx direction or cross-connected links exist between the local device and its neighbor. The shutdown mode is MANUAL. The port needs to be shut down by the user.
#Jan 18 18:10:38:618 2010 DeviceA DLDP/1/TrapOfUnidirectional: -Slot=2; 1.3.6.1.4.1.25506.2.43.2.1.1<hh3cDLDPUnidirectionalPort> : DLDP detects a unidirectional link in port 17825793.
%Jan 18 18:10:38:618 2010 DeviceA DLDP/3/DLDP_UNIDIRECTION_MANUAL: -Slot=2; DLDP detects a unidirectional link on port Gigabitethernet2/0/2. The transceiver has malfunction in the Tx direction or cross-connected links exist between the local device and its neighbor. The shutdown mode is MANUAL. The port needs to be shut down by the user.
The output shows that DLDP has detected a unidirectional link on both Gigabitethernet 2/0/1 and Gigabitethernet 2/0/2, and is asking you to shut down the faulty ports manually.
After you shut down Gigabitethernet 2/0/1 and Gigabitethernet 2/0/2, the following log information is displayed:
<DeviceA> system-view
[DeviceA] interface gigabitethernet 2/0/1
[DeviceA-Gigabitethernet2/0/1] shutdown
%Jan 18 18:16:12:044 2010 DeviceA IFNET/3/LINK_UPDOWN: Gigabitethernet2/0/1 link status is DOWN.
[DeviceA-Gigabitethernet2/0/1] quit
[DeviceA] interface gigabitethernet 2/0/2
[DeviceA-Gigabitethernet2/0/2] shutdown
%Jan 18 18:18:03:583 2010 DeviceA IFNET/3/LINK_UPDOWN: Gigabitethernet2/0/2 link status is DOWN.
The output shows that the link status of both Gigabitethernet 2/0/1 and Gigabitethernet 2/0/2 is down.
Assume that in this example, the unidirectional links are caused by cross-connected fibers. Correct the fiber connections, and then bring up the ports shut down earlier.
# On Device A, bring up Gigabitethernet 2/0/1 and Gigabitethernet 2/0/2:
[DeviceA-Gigabitethernet2/0/2] undo shutdown
[DeviceA-Gigabitethernet2/0/2]
%Jan 18 18:22:11:698 2010 DeviceA IFNET/3/LINK_UPDOWN: Gigabitethernet2/0/2 link status is UP.
[DeviceA-Gigabitethernet2/0/2] quit
[DeviceA] interface gigabitethernet 2/0/1
[DeviceA-Gigabitethernet2/0/1] undo shutdown
[DeviceA-Gigabitethernet2/0/1]
%Jan 18 18:22:46:065 2010 DeviceA IFNET/3/LINK_UPDOWN: Gigabitethernet2/0/1 link status is UP.
The output indicates that the link status of both Gigabitethernet 2/0/1 and Gigabitethernet 2/0/2 is now up.
Troubleshooting
Symptom
Two DLDP-enabled switches, Switch A and Switch B, are connected through two fiber pairs, in which two fibers are cross-connected. The unidirectional links cannot be detected. All the four ports involved are in Advertisement state.
Analysis
The problem can be caused by the following.
· The intervals for sending Advertisement packets on Switch A and Switch B are not the same.
· DLDP authentication modes/passwords on Switch A and Switch B are not the same.
Solution
Make sure the interval to send Advertisement packets, the authentication mode, and the password configured on Switch A and Switch B are the same.