Example: Configuring the manual port shutdown mode

Network configuration

As shown in Figure 11, Device A and Device B are connected through two fiber pairs.

Configure DLDP to detect unidirectional links. When a unidirectional link is detected, the administrator must manually shut down the port.

Figure 11: Network diagram

Procedure


[IMPORTANT: ]

IMPORTANT:

By default, interfaces on the device are disabled (in ADM or Administratively Down state). To have an interface operate, you must use the undo shutdown command to enable that interface.


  1. Configure Device A:

    # Enable DLDP globally.

    <DeviceA> system-view
    [DeviceA] dldp enable
    

    # Configure FortyGigE 1/0/1 to operate in full duplex mode and at 40000 Mbps, and enable DLDP on the port.

    [DeviceA] interface fortygige 1/0/1
    [DeviceA-FortyGigE1/0/1] duplex full
    [DeviceA-FortyGigE1/0/1] speed 40000
    [DeviceA-FortyGigE1/0/1] dldp enable
    [DeviceA-FortyGigE1/0/1] quit
    

    # Configure FortyGigE 1/0/2 to operate in full duplex mode and at 40000 Mbps, and enable DLDP on the port.

    [DeviceA] interface fortygige 1/0/2
    [DeviceA-FortyGigE1/0/2] duplex full
    [DeviceA-FortyGigE1/0/2] speed 40000
    [DeviceA-FortyGigE1/0/2] dldp enable
    [DeviceA-FortyGigE1/0/2] quit
    

    # Set the global port shutdown mode to manual.

    [DeviceA] dldp unidirectional-shutdown manual
    
  2. Configure Device B:

    # Enable DLDP globally.

    <DeviceB> system-view
    [DeviceB] dldp global enable
    

    # Configure FortyGigE 1/0/1 to operate in full duplex mode and at 40000 Mbps, and enable DLDP on it.

    [DeviceB] interface fortygige 1/0/1
    [DeviceB-] duplex full
    [DeviceB-FortyGigE1/0/1] speed 40000
    [DeviceB-FortyGigE1/0/1] dldp enable
    [DeviceB-FortyGigE1/0/1] quit
    

    # Configure FortyGigE 1/0/2 to operate in full duplex mode and at 40000 Mbps, and enable DLDP on it.

    [DeviceB] interface 
    [DeviceB-FortyGigE1/0/2] duplex full
    [DeviceB-FortyGigE1/0/2] speed 40000
    [DeviceB-] dldp enable
    [DeviceB-FortyGigE1/0/2] quit
    

    # Set the global port shutdown mode to manual.

    [DeviceB] dldp unidirectional-shutdown manual
    

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 FortyGigE1/0/1
 DLDP port state: Bidirectional
 DLDP port unidirectional-shutdown mode: None
 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 FortyGigE1/0/2
 DLDP port state: Bidirectional
 DLDP port unidirectional-shutdown mode: None
 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 FortyGigE 1/0/1 and FortyGigE 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>%Jul 12 08:29:17:786 2012 DeviceA IFNET/3/PHY_UPDOWN:  link status is DOWN.
%Jul 12 08:29:17:787 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface FortyGigE1/0/1 is DOWN.
%Jul 12 08:29:17:800 2012 DeviceA IFNET/3/PHY_UPDOWN: FortyGigE1/0/2 link status is DOWN.
%Jul 12 08:29:17:800 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface FortyGigE1/0/2 is DOWN.
%Jul 12 08:29:25:004 2012 DeviceA IFNET/3/PHY_UPDOWN: FortyGigE1/0/1 link status is UP.
%Jul 12 08:29:25:005 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface  is UP.
%Jul 12 08:29:25:893 2012 DeviceA IFNET/3/PHY_UPDOWN: FortyGigE1/0/2 link status is UP.
%Jul 12 08:29:25:894 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface FortyGigE1/0/2 is UP.

The output shows that the port status and link status of both FortyGigE 1/0/1 and FortyGigE 1/0/2 are down and then up.

# 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: Manual
 DLDP delaydown-timer value: 1s
 Number of enabled ports: 2

Interface FortyGigE1/0/1
 DLDP port state: Unidirectional
 DLDP port unidirectional-shutdown mode: None
 Number of the port’s neighbors: 0 (Maximum number ever detected: 1)

Interface FortyGigE1/0/2
 DLDP port state: Unidirectional
 DLDP port unidirectional-shutdown mode: None
 Number of the port’s neighbors: 0 (Maximum number ever detected: 1)

The output shows that the DLDP port status of both FortyGigE 1/0/1 and FortyGigE 1/0/2 is unidirectional. DLDP detects unidirectional links on the two ports but does not shut them down.

The unidirectional links are caused by cross-connected fibers. Manually shut down the two ports:

# Shut down FortyGigE 1/0/1.

<DeviceA> system-view
[DeviceA] interface fortygige 1/0/1
[DeviceA-FortyGigE1/0/1] shutdown

The following log information is displayed on Device A:

[DeviceA-FortyGigE1/0/1]%Jul 12 08:34:23:717 2012 DeviceA IFNET/3/PHY_UPDOWN: FortyGigE1/0/1 link status is DOWN.
%Jul 12 08:34:23:718 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface FortyGigE1/0/1 is DOWN.
%Jul 12 08:34:23:778 2012 DeviceA IFNET/3/PHY_UPDOWN: FortyGigE1/0/2 link status is DOWN.
%Jul 12 08:34:23:779 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface FortyGigE1/0/2 is DOWN.

The output shows that the port status and link status of both FortyGigE 1/0/1 and FortyGigE 1/0/2 are now down.

# Shut down FortyGigE 1/0/2.

[DeviceA-FortyGigE1/0/1] quit
[DeviceA] interface fortygige 1/0/2
[DeviceA-FortyGigE1/0/2] shutdown

Correct the fiber connections and bring up the two ports:

# Bring up FortyGigE 1/0/2.

[DeviceA-FortyGigE1/0/2] undo shutdown

The following log information is displayed on Device A:

[DeviceA-]%Jul 12 08:46:17:677 2012 DeviceA IFNET/3/PHY_UPDOWN: FortyGigE1/0/2 link status is UP.
%Jul 12 08:46:17:678 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface  is UP.
%Jul 12 08:46:17:959 2012 DeviceA DLDP/6/DLDP_NEIGHBOR_CONFIRMED: A neighbor was confirmed on interface FortyGigE1/0/2. The neighbor's system MAC is 0023-8956-3600, and the port index is 2.
%Jul 12 08:46:17:959 2012 DeviceA DLDP/6/DLDP_LINK_BIDIRECTIONAL: DLDP detected a bidirectional link on interface FortyGigE1/0/2.

The output shows that the port status and link status of FortyGigE 1/0/2 are now up and its DLDP neighbors are determined.

# Bring up FortyGigE 1/0/1.

[DeviceA-FortyGigE1/0/2] quit
[DeviceA] interface fortygige 1/0/1
[DeviceA-FortyGigE1/0/1] undo shutdown

The following log information is displayed on Device A:

[DeviceA-FortyGigE1/0/1]%Jul 12 08:48:25:952 2012 DeviceA IFNET/3/PHY_UPDOWN: FortyGigE1/0/1 link status is UP.
%Jul 12 08:48:25:952 2012 DeviceA DLDP/6/DLDP_NEIGHBOR_CONFIRMED: A neighbor was confirmed on interface FortyGigE1/0/1. The neighbor's system MAC is 0023-8956-3600, and the port index is 1.
%Jul 12 08:48:25:953 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface FortyGigE1/0/1 is UP.
%Jul 12 08:48:25:953 2012 DeviceA DLDP/6/DLDP_LINK_BIDIRECTIONAL: DLDP detected a bidirectional link on interface FortyGigE1/0/1.

The output shows that the port status and link status of FortyGigE 1/0/1 are now up and its DLDP neighbors are determined.