13-DLDP Command

Download


Chapter 1  DLDP Configuration Commands

1.1  DLDP Configuration Commands

1.1.1  display dldp

Syntax

display dldp [ interface-type interface-number ]

View

Any view

Parameter

interface-type: Port type.

interface-number: Port number.

Description

Use the display dldp command to display the configuration information, status information and neighbor tables of the DLDP-enabled port.

l           The configuration information of the DLDP-enabled port includes interval, authentication mode, password, DLDP operating mode, and DLDP handling mode after a unidirectional link is detected.

l           The status information includes neighbor status, local port status and link status.

l           The neighbor table includes the MAC address item, the port ID item, the neighbor status item and the aging time item.

Example

# Display the information about all the DLDP-enabled ports.

<H3C> display dldp

dldp interval 10

     dldp work-mode enhance

     dldp authentication-mode none

     dldp unidirectional-shutdown manual

 

     The port number with DLDP is 2.

 

interface GigabitEthernet2/0/1

     dldp port state : inactive

     dldp link state : down

     The neighbor number of the port is 0.

interface GigabitEthernet2/0/2

     dldp port state : advertisement

     dldp link state : up

     The neighbor number of the port is 1.

         neighbor mac address : 000f-e20f-750d

         neighbor port index : 98

         neighbor state : two way

         neighbor aged time : 24

1.1.2  dldp

Syntax

dldp { enable | disable }

View

System view, Ethernet port view

Parameter

None

Description

In system view:

Use the dldp enable command to enable DLDP globally on all optical ports of the switch.

Use the dldp disable command to disable DLDP globally on all optical ports of the switch.

In Ethernet port view:

Use the dldp enable command to enable DLDP on the current port.

Use the dldp disable command to disable DLDP on the current port.

The commands apply to both non-optical ports and optical ports.

By default, DLDP is disabled.

 

&  Note:

When you use the dldp enable/dldp disable commands in system view to enable/disable DLDP globally on all optical ports of the switch, these commands are only valid for the existing optical ports on the device, however, they are invalid for those optical ports added subsequently.

 

Example

# Enable DLDP globally on all optical ports of the switch.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] dldp enable

 DLDP is enabled on all fiber ports.

1.1.3  dldp authentication-mode

Syntax

dldp authentication-mode { none | simple simple-password | md5 md5-password }

undo dldp authentication-mode

View

System view

Parameter

none: Performs no authentication with the peer port.

simple: Sets the authentication mode with the peer port to plain text.

simple-password: Password for authentication with the peer port, a plaintext string of 1 character to 16 characters.

md5: Sets the authentication mode with the peer port to MD5.

md5-password: Password for MD5 authentication with the peer port. This argument can be a plaintext string of 1 character to 16 characters or a 24-bit ciphertext string.

Description

Use the dldp authentication-mode command to set the DLDP authentication mode and the corresponding password for the local ports and the ports of neighboring devices.

Use the undo dldp authentication-mode to cancel the DLDP authentication mode and the corresponding password for the local ports of the ports of neighboring devices.

By default, the authentication mode is none, that is, authentication is not performed.

Note that:

When configuring the DLDP authentication mode and the corresponding authentication password, make sure the same DLDP authentication mode and the corresponding password are set for the ports connecting the local device and the peer device. Otherwise, DLDP authentication fails. DLDP cannot work if DLDP authentication fails.

Example

# Enable DLDP on the ports connecting two devices. Plaintext authentication is performed with the password password1.

l           Configure H3C A:

<H3CA> system-view

System View: return to User View with Ctrl+Z.

[H3CA] dldp authentication-mode simple password1

l           Configure H3C B:

<H3CB> system-view

System View: return to User View with Ctrl+Z.

[H3CB] dldp authentication-mode simple password1

1.1.4  dldp interval

Syntax

dldp interval integer

undo dldp interval

View

System view

Parameter

integer: Interval of sending DLDP packets, in the range of 5 seconds to 100 seconds. This argument is 10 seconds by default.

Description

Use the dldp interval command to set the interval of sending advertisement packets for all the DLDP-enabled ports in the Advertisement status.

Use the undo dldp interval command to restore the interval to the default value.

By default, the interval of sending advertisement packets is 10 seconds.

Note that:

l           The interval set through this command is applicable to all DLDP-enabled ports.

l           The interval must be shorter than one-third of the STP convergence time. If too long an interval is set, an STP loop may occur before DLDP shuts down unidirectional links. On the contrary, if too short an interval is set, network traffic increases, and port bandwidth is reduced. Normally, the STP convergence time is 30 seconds.

Example

# Set the interval of sending advertisement packets to 20 seconds for all the DLDP-enabled ports.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] dldp interval 20

1.1.5  dldp reset

Syntax

dldp reset

View

System view, Ethernet port view

Parameter

None

Description

In system view:

Use the dldp reset command to reset the DLDP status of all the ports disabled by DLDP.

In Ethernet port view:

Use the dldp reset command to reset the DLDP status of the current port disabled by DLDP.

After the dldp reset command is executed, the DLDP status of a port changes from disable to active and DLDP restarts to probe the link status of the fiber cables or copper twisted pairs.

Related command: dldp, and dldp unidirectional-shutdown.

Example

# Reset the DLDP status of all the ports disabled by DLDP.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] dldp reset

1.1.6  dldp unidirectional-shutdown

Syntax

dldp unidirectional-shutdown { auto | manual }

undo dldp unidirectional-shutdown

View

System view

Parameter

auto: Disables the corresponding port automatically when DLDP detects a unidirectional link.

manual: Prompts the user to disable the corresponding port manually instead of disabling the port automatically when DLDP detects an unidirectional link. DLDP packet sending/receiving stops on the port when DLDP prompts the user to disable the port.

Description

Use the dldp unidirectional-shutdown command to set the handling mode when DLDP detects a unidirectional link.

Use the dldp unidirectional-shutdown command to restore the default setting.

By default, the handling mode after DLDP detects a unidirectional link is auto.

Related command: dldp work-mode.

Example

# Configure DLDP to automatically disable the corresponding port when DLDP detects a unidirectional link.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] dldp unidirectional-shutdown auto

1.1.7  dldp work-mode

Syntax

dldp work-mode { enhance | normal }

undo dldp work-mode

View

System view

Parameter

enhance: Configures DLDP to work in enhanced mode. In this mode, DLDP probes actively whether neighbors exist when DLDP ages the neighbor tables.

normal: Configures DLDP to work in normal mode. In this mode, DLDP does not probe actively whether neighbors exist when DLDP ages the neighbor tables.

Description

Use the dldp work-mode command to set the DLDP operating mode.

Use the undo dldp work-mode command to restore the default DLDP operating mode.

By default, DLDP works in normal mode.

Example

# Configure DLDP to work in enhanced mode.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] dldp work-mode enhance