Configuring the hybrid port shutdown mode
Network requirements
As shown in Figure 12, Device A and Device B are connected through two fiber pairs.
Configure DLDP to detect unidirectional links. When a unidirectional link is detected, DLDP automatically shuts down the unidirectional port. The administrator needs to bring up the port after clearing the fault.
Figure 12: Network diagram
Configuration procedure
Configure Device A:
# Enable DLDP globally.
<DeviceA> system-view [DeviceA] dldp enable
# Configure GigabitEthernet 1/0/1 to operate in full duplex mode and at 1000 Mbps, and enable DLDP on the port.
[DeviceA] interface gigabitethernet 1/0/1 [DeviceA-GigabitEthernet1/0/1] duplex full [DeviceA-GigabitEthernet1/0/1] speed 1000 [DeviceA-GigabitEthernet1/0/1] dldp enable [DeviceA-GigabitEthernet1/0/1] quit
# Configure GigabitEthernet 1/0/2 to operate in full duplex mode and at 1000 Mbps, and enable DLDP on the port.
[DeviceA] interface gigabitethernet 1/0/2 [DeviceA-GigabitEthernet1/0/2] duplex full [DeviceA-GigabitEthernet1/0/2] speed 1000 [DeviceA-GigabitEthernet1/0/2] dldp enable [DeviceA-GigabitEthernet1/0/2] quit
# Set the port shutdown mode to hybrid.
[DeviceA] dldp unidirectional-shutdown hybrid
Configure Device B:
# Enable DLDP globally.
<DeviceB> system-view [DeviceB] dldp global enable
# Configure GigabitEthernet 1/0/1 to operate in full duplex mode and at 1000 Mbps, and enable DLDP on it.
[DeviceB] interface gigabitethernet 1/0/1 [DeviceB-GigabitEthernet1/0/1] duplex full [DeviceB-GigabitEthernet1/0/1] speed 1000 [DeviceB-GigabitEthernet1/0/1] dldp enable [DeviceB-GigabitEthernet1/0/1] quit
# Configure GigabitEthernet 1/0/2 to operate in full duplex mode and at 1000 Mbps, and enable DLDP on it.
[DeviceB] interface gigabitethernet 1/0/2 [DeviceB-GigabitEthernet1/0/2] duplex full [DeviceB-GigabitEthernet1/0/2] speed 1000 [DeviceB-GigabitEthernet1/0/2] dldp enable [DeviceB-GigabitEthernet1/0/2] quit
# Set the port shutdown mode to hybrid.
[DeviceB] dldp unidirectional-shutdown hybrid
Verifying the configuration
# Display the DLDP configuration globally and on all the DLDP-enabled ports of Device A.
[DeviceA] display dldp DLDP global status: Enabled DLDP advertisement interval: 5s DLDP authentication-mode: None DLDP unidirectional-shutdown mode: Manual DLDP delaydown-timer value: 1s Number of enabled ports: 2 Interface GigabitEthernet1/0/1 DLDP port state: Bidirectional Number of the port’s neighbors: 1 Neighbor MAC address: 0023-8956-3600 Neighbor port index: 1 Neighbor state: Confirmed Neighbor aged time: 11s Interface GigabitEthernet1/0/2 DLDP port state: Bidirectional Number of the port’s neighbors: 1 Neighbor MAC address: 0023-8956-3600 Neighbor port index: 2 Neighbor state: Confirmed Neighbor aged time: 12s
The output shows that both GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 are in Bidirectional state, which means both links are bidirectional.
# Enable the monitoring of logs on the current terminal on Device A. Set the lowest level of the logs that can be output to the current terminal to 6.
[DeviceA] quit <DeviceA> terminal monitor <DeviceA> terminal logging level 6
The following log information is displayed on Device A:
<DeviceA>%Jan 4 07:16:06:556 2011 DeviceA DLDP/5/DLDP_NEIGHBOR_AGED: A neighbor on interface GigabitEthernet1/0/1 was deleted because the neighbor was aged. The neighbor's system MAC is 0023-8956-3600, and the port index is 162. %Jan 4 07:16:06:560 2011 DeviceA DLDP/5/DLDP_NEIGHBOR_AGED: A neighbor on interface GigabitEthernet1/0/2 was deleted because the neighbor was aged. The neighbor's system MAC is 0023-8956-3600, and the port index is 165. %Jan 4 07:16:06:724 2011 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/1 changed to down. %Jan 4 07:16:06:730 2011 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/2 changed to down. %Jan 4 07:16:06:736 2011 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/1 changed to down. %Jan 4 07:16:06:738 2011 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/2 changed to down. %Jan 4 07:16:07:152 2011 DeviceA DLDP/3/DLDP_LINK_UNIDIRECTIONAL: DLDP detected a unidirectional link on interface GigabitEthernet1/0/1. DLDP automatically shut down the interface. Please manually bring up the interface. %Jan 4 07:16:07:156 2011 DeviceA DLDP/3/DLDP_LINK_UNIDIRECTIONAL: DLDP detected a unidirectional link on interface GigabitEthernet1/0/2. DLDP automatically shut down the interface. Please manually bring up the interface.
The output shows that the port status and link status of both GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 are down.
# Display the DLDP configuration globally and of all the DLDP-enabled ports.
<DeviceA> display dldp DLDP global status: Enabled DLDP advertisement interval: 5s DLDP authentication-mode: None DLDP unidirectional-shutdown mode: Hybrid DLDP delaydown-timer value: 1s Number of enabled ports: 2 Interface GigabitEthernet1/0/1 DLDP port state: Inactive Number of the port's neighbors: 0 (Maximum number ever detected: 1) Interface GigabitEthernet1/0/2 DLDP port state: Inactive Number of the port's neighbors: 0 (Maximum number ever detected: 1)
The output shows that DLDP detects a unidirectional link and shuts down GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2.
The unidirectional links are caused by cross-connected fibers. Bring up the two ports after correct the fiber connection:
# Bring up GigabitEthernet 1/0/1.
<DeviceA> system-view [DeviceA] interface gigabitethernet 1/0/1 [DeviceA-GigabitEthernet1/0/1] undo shutdown
The following log information is displayed on Device A:
[DeviceA-GigabitEthernet1/0/1]%Jan 4 07:33:26:574 2011 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/1 changed to up. %Jan 4 07:33:57:562 2011 DeviceA DLDP/6/DLDP_NEIGHBOR_CONFIRMED: A neighbor was confirmed on interface GigabitEthernet1/0/1. The neighbor's system MAC is 0023-8956-3600, and the port index is 162. %Jan 4 07:33:57:563 2011 DeviceA DLDP/6/DLDP_LINK_BIDIRECTIONAL: DLDP detected a bidirectional link on interface GigabitEthernet1/0/1. %Jan 4 07:33:57:590 2011 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/1 changed to up. %Jan 4 07:33:57:609 2011 DeviceA STP/6/STP_DETECTED_TC: Instance 0's port GigabitEthernet1/0/1 detected a topology change.
The output shows that the port status and link status of GigabitEthernet 1/0/1 are now up and its DLDP neighbors are determined.
# Bring up GigabitEthernet 1/0/2.
[DeviceA-GigabitEthernet1/0/1] quit [DeviceA] interface gigabitethernet 1/0/2 [DeviceA-GigabitEthernet1/0/2] undo shutdown
The following log information is displayed on Device A:
[DeviceA-GigabitEthernet1/0/2]%Jan 4 07:35:26:574 2011 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/2 changed to up. %Jan 4 07:35:57:562 2011 DeviceA DLDP/6/DLDP_NEIGHBOR_CONFIRMED: A neighbor was confirmed on interface GigabitEthernet1/0/2. The neighbor's system MAC is 0023-8956-3600, and the port index is 162. %Jan 4 07:35:57:563 2011 DeviceA DLDP/6/DLDP_LINK_BIDIRECTIONAL: DLDP detected a bidirectional link on interface GigabitEthernet1/0/2. %Jan 4 07:35:57:590 2011 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/2 changed to up. %Jan 4 07:35:57:609 2011 DeviceA STP/6/STP_DETECTED_TC: Instance 0's port GigabitEthernet1/0/2 detected a topology change.
The output shows that the port status and link status of GigabitEthernet 1/0/2 are now up and its DLDP neighbors are determined.