DLDP commands -- display dldp

Use display dldp to display DLDP configuration.

Syntax

display dldp [ interface interface-type interface-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Parameters

interface interface-type interface-number: Specifies an interface by its type and number. If you do not specify this option, the command displays global and port-specific DLDP configuration.

Examples

# Display global and port-specific DLDP configuration.

<Sysname> display dldp

DLDP global status: Enabled

DLDP advertisement interval: 5s

DLDP authentication-mode: Simple

DLDP authentication-password: ******

DLDP unidirectional-shutdown mode: Auto

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: 79

Neighbor state: Confirmed

Neighbor aged time: 13s

Interface GigabitEthernet1/0/2

DLDP port state: Inactive

Number of the port’s neighbors: 0 (Maximum number ever detected: 1)

# Display the DLDP configuration of GigabitEthernet 1/0/1.

<Sysname> display dldp interface gigabitethernet 1/0/1

Interface GigabitEthernet1/0/1

DLDP port state: Bidirectional

Number of the port’s neighbors: 1

Neighbor MAC address: 0023-8956-3600

Neighbor port index: 79

Neighbor state: Confirmed

Neighbor aged time: 13s

Table 1 Command output

Field | Description
DLDP global status | Global DLDP state (Enabled or Disabled).
DLDP advertisement interval | Interval for sending Advertisement packets (in seconds) to maintain neighbor relations.
DLDP authentication-mode | DLDP authentication mode (None, Simple, or MD5).
DLDP authentication-password | Password for DLDP authentication: · ******—The password has been configured. · Not configured—The authentication mode has been configured but no password is configured.
DLDP unidirectional-shutdown mode | Port shutdown mode (auto, manual, or hybrid) after unidirectional links are detected.
DLDP delaydown-timer value | Setting of the DelayDown timer, in seconds.
Number of enabled ports | Number of the DLDP-enabled ports.
Interface | Index of a DLDP-enabled port.
DLDP port state | DLDP state on a port: · Bidirectional. · Inactive. · Initial. · Unidirectional.
Number of the port’s neighbors | Current number of neighbors.
Maximum number ever detected | Maximum number of neighbors once detected on the port. This field appears only when the current number of neighbors is different from the maximum number of neighbors once detected.
Neighbor MAC address | MAC address of the neighbor.
Neighbor port index | Neighbor port index.
Neighbor state | Neighbor state (Confirmed or Unconfirmed).
Neighbor aged time | Neighbor aging time.

DLDP commands -- display dldp statistics

Use display dldp statistics to display DLDP packet statistics.

Syntax

display dldp statistics [ interface interface-type interface-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Parameters

interface interface-type interface-number: Specifies an interface by its type and number. If you do not specify this option, the command displays DLDP packet statistics for all interfaces.

Examples

# Display DLDP packet statistics for all interfaces.

<Sysname> display dldp statistics

Interface GigabitEthernet1/0/1

Packets sent: 6

Packets received: 5

Invalid packets received: 2

Loopback packets received: 0

Authentication-failed packets received: 0

Valid packets received: 3

Interface GigabitEthernet1/0/2

Packets sent: 7

Packets received: 7

Invalid packets received: 3

Loopback packets received: 0

Authentication-failed packets received: 0

Valid packets received: 4

Table 2 Command output

Field | Description
Interface | Port index.
Packets sent | Total number of DLDP packets sent.
Packets received | Total number of DLDP packets received.
Invalid packets received | Number of the invalid packets received.
Loop packets received | Number of the loopback packets received.
Authentication failed packets received | Number of the received packets that failed to pass the authentication.
Valid packets received | Number of the valid packets received.

Related commands

reset dldp statistics

DLDP commands -- dldp authentication-mode

Use dldp authentication-mode to configure DLDP authentication.

Use undo dldp authentication-mode to restore the default.

Syntax

dldp authentication-mode { md5 | none | simple }

undo dldp authentication-mode

Default

DLDP authentication mode is none.

Views

System view

Predefined user roles

network-admin

mdc-admin

Parameters

md5: Specifies the MD5 authentication mode.

none: Specifies not to perform authentication.

simple: Specifies the plaintext authentication mode.

Usage guidelines

To enable DLDP to operate correctly, make sure the DLDP authentication modes and the passwords configured on the two ends of a link are the same.

If you do not configure the authentication password after you configure the authentication mode, the authentication mode is none no matter which authentication mode you configure.

Examples

# Configure to perform plaintext authentication and set the password to abc (assuming that Device A and Device B are connected by a DLDP link).

· Configure Device A:

<DeviceA> system-view

[DeviceA] dldp authentication-mode simple

[DeviceA] dldp authentication-password simple abc

· Configure Device B:

<DeviceB> system-view

[DeviceB] dldp authentication-mode simple

[DeviceB] dldp authentication-password simple abc

Related commands

display dldp

dldp authentication-password

DLDP commands -- dldp authentication-password

Use dldp authentication-password to configure the password for DLDP authentication.

Use undo dldp authentication-password to restore the default.

Syntax

dldp authentication-password { cipher | simple } string

undo dldp authentication-password

Default

No DLDP authentication password is configured.

Views

System view

Predefined user roles

network-admin

mdc-admin

Parameters

cipher: Specifies a password in encrypted form.

simple: Specifies a password in plaintext form. For security purposes, the password specified in plaintext form will be stored in encrypted form.

string: Specifies the password. Its plaintext form is a case-sensitive string of 1 to 16 characters. Its encrypted form is a case-sensitive string of 1 to 53 characters.

Usage guidelines

To enable DLDP to operate correctly, make sure the DLDP authentication modes and the passwords configured on the two ends of a link are the same.

If you do not configure the authentication password after you configure the authentication mode, the authentication mode is none no matter which authentication mode you configure.

Examples

# Configure to perform plaintext authentication and set the password to abc (assuming that Device A and Device B are connected by a DLDP link).

· Configure Device A:

<DeviceA> system-view

[DeviceA] dldp authentication-mode simple

[DeviceA] dldp authentication-password simple abc

· Configure Device B:

<DeviceB> system-view

[DeviceB] dldp authentication-mode simple

[DeviceB] dldp authentication-password simple abc

Related commands

display dldp

dldp authentication-mode

DLDP commands -- dldp delaydown-timer

Use dldp delaydown-timer to set the DelayDown timer.

Use undo dldp delaydown-timer to restore the default.

Syntax

dldp delaydown-timer time

undo dldp delaydown-timer

Default

The setting of the DelayDown timer is 1 second.

Views

System view

Predefined user roles

network-admin

mdc-admin

Parameters

time: Specifies the DelayDown timer in the range of 1 to 5 seconds.

Usage guidelines

The DelayDown timer configured by using this command applies to all DLDP-enabled ports.

Examples

# Set the DelayDown timer to 2 seconds.

<Sysname> system-view

[Sysname] dldp delaydown-timer 2

Related commands

display dldp

DLDP commands -- dldp enable

Use dldp enable to enable DLDP on a port.

Use undo dldp enable to disable DLDP on a port.

Syntax

dldp enable

undo dldp enable

Default

DLDP is disabled on a port.

Views

Layer 2 Ethernet interface view

Layer 3 Ethernet interface view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

DLDP can take effect only after you enable it globally and on a port.

Examples

# Enable DLDP globally, and then enable DLDP on GigabitEthernet 1/0/1.

<Sysname> system-view

[Sysname] dldp global enable

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] dldp enable

Related commands

display dldp

dldp global enable

DLDP commands -- dldp global enable

Use dldp global enable to enable DLDP globally.

Use undo dldp global enable to disable DLDP globally.

Syntax

dldp global enable

undo dldp global enable

Default

DLDP is disabled globally.

Views

System view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

DLDP can take effect only after you enable it globally and on a port.

Examples

# Enable DLDP globally.

<Sysname> system-view

[Sysname] dldp global enable

Related commands

display dldp

dldp enable

DLDP commands -- dldp interval

Use dldp interval to set the interval for sending Advertisement packets.

Use undo dldp interval to restore the default.

Syntax

dldp interval interval

undo dldp interval

Default

The interval for sending Advertisement packets is 5 seconds.

Views

System view

Predefined user roles

network-admin

mdc-admin

Parameters

interval: Specifies Advertisement packets sending interval in the range of 1 to 100 seconds.

Usage guidelines

This command applies to all DLDP-enabled ports.

To enable DLDP to operate correctly, make sure the intervals for sending Advertisement packets configured on the two ends of a link are the same.

Examples

# Set the interval for sending Advertisement packets to 20 seconds.

<Sysname> system-view

[Sysname] dldp interval 20

Related commands

display dldp

DLDP commands -- dldp unidirectional-shutdown

Use dldp unidirectional-shutdown to set the port shutdown mode.

Use undo dldp unidirectional-shutdown to restore the default.

Syntax

dldp unidirectional-shutdown { auto | hybrid | manual }

undo dldp unidirectional-shutdown

Default

The port shutdown mode is auto mode.

Views

System view

Predefined user roles

network-admin

mdc-admin

Parameters

auto: Specifies the auto mode. In this mode, when DLDP detects a unidirectional link, it shuts down the unidirectional port. When the link becomes bidirectional, DLDP brings up the port that was shut down.

hybrid: Specifies the hybrid mode. In this mode, when DLDP detects a unidirectional link, it shuts down the unidirectional port and stops link detection. To verify the link status, use the undo shutdown command to bring up the port. If the link becomes bidirectional, the port becomes bidirectional.

manual: Specifies the manual mode. In this mode, when DLDP detects a unidirectional link, it does not shut down the involved port. You must manually shut it down. When the link becomes bidirectional, you must manually bring up the port.

Examples

# Set the port shutdown mode to manual mode.

<Sysname> system-view

[Sysname] dldp unidirectional-shutdown manual

Related commands

display dldp

DLDP commands -- reset dldp statistics

Use reset dldp statistics to clear DLDP packet statistics.

Syntax

reset dldp statistics [ interface interface-type interface-number ]

Views

User view

Predefined user roles

network-admin

mdc-admin

Parameters

interface interface-type interface-number: Specifies an interface by its type and number. If you do not specify this option, the command clears DLDP packet statistics for all interfaces.

Examples

# Clear DLDP packet statistics for all interfaces.

<Sysname> reset dldp statistics

Related commands

display dldp statistics