Configuring uni-directional link detection

Syntax

[ no ]interface <PORT-LIST> link-keepalive

Enables UDLD on a port or range of ports.

To disable this feature, enter the no form of the command.

Default: UDLD disabled

Syntax

link-keepalive interval interval

Determines the time interval to send UDLD control packets. The interval parameter specifies how often the ports send a UDLD packet. You can specify from 10 to 100, in 100-ms increments, where 10 is 1 second, 11 is 1.1 seconds, and so on.

Default: 50 (5 seconds)

Syntax

link-keepalive retries num

Determines the maximum number of retries to send UDLD control packets. The num parameter specifies the maximum number of times the port will try the health check. You can specify a value from 3 to 10.

Default: 5

Syntax

[ no ]interface <PORT-LIST> link-keepalive vlan vid

Assigns a VLAN ID to a UDLD-enabled port for sending tagged UDLD control packets.Under default settings, untagged UDLD packets can still be transmitted and received on tagged only ports; however, a warning message is logged.

The no form of the command disables UDLD on the specified ports.

Default: UDLD packets are untagged; tagged-only ports transmit and receive untagged UDLD control packets

Enabling UDLD

UDLD is enabled on a per-port basis.

Example

To enable UDLD on port a1, enter:

(HP_Switch_name#) interface al link-keepalive

To enable the feature on a trunk group, enter the appropriate port range. For example:

(HP_Switch_name#)interface al-a4 link-keepalive

[NOTE: ]

NOTE: When at least one port is UDLD-enabled, the switch will forward out UDLD packets that arrive on non-UDLD-configured ports out of all other non-UDLDconfigured ports in the same vlan. That is, UDLD control packets will “pass through” a port that is not configured for UDLD. However, UDLD packets will be dropped on any blocked ports that are not configured for UDLD.


Changing the keepalive interval

By default, ports enabled for UDLD send a link health-check packet once every 5 seconds. You can change the interval to a value from 10 to 100 deciseconds, where 10 is 1 second, 11 is 1.1 seconds, and so on.

Example

To change the packet interval to seven seconds, enter the following command at the global configuration level:

(HP_Switch_name#) link-keepalive interval 70

Changing the keepalive retries

By default, a port waits 5 seconds to receive a health-check reply packet from the port at the other end of the link. If the port does not receive a reply, the port tries four more times by sending up to four more health-check packets. If the port still does not receive a reply after the maximum number of retries, the port goes down.

You can change the maximum number of keepalive attempts to a value from 3 to 10.

Example

To change the maximum number of attempts to four, enter the following command at the global configuration level:

(HP_Switch_name#) link-keepalive retries 4

Configuring UDLD for tagged ports

The default implementation of UDLD sends the UDLD control packets untagged, even across tagged ports. If an untagged UDLD packet is received by a non-HP switch, that switch may reject the packet. To avoid such an occurrence, you can configure ports to send out UDLD control packets that are tagged with a specified VLAN.

To enable ports to receive and send UDLD control packets tagged with a specific VLAN ID, enter a command such as the following at the interface configuration level:

( HP_Switch_name#) interface llink-keepalive vlan 22

[NOTE: ]

NOTE:

  • You must configure the same VLANs that will be used for UDLD on all devices across the network; otherwise, the UDLD link cannot be maintained.

  • If a VLAN ID is not specified, UDLD control packets are sent out of the port as untagged packets.

  • To re-assign a VLAN ID, re-enter the command with the new VLAN ID number. The new command overwrites the previous command setting.

  • When configuring UDLD for tagged ports, you may receive a warning message if there are any inconsistencies with the VLAN configuration of the port. See Status and parameters for each port type for potential problems.




Viewing UDLD information

Syntax

show link-keepalive

Displays all the ports that are enabled for link-keepalive.

Syntax

show link-keepalive statistics

Displays detailed statistics for the UDLD-enabled ports on the switch.

Syntax

clear link-keepalive statistics

Clears UDLD statistics. This command clears the packets sent, packets received, and transitions counters in the show link-keepalive statistics display.

Viewing summary information on all UDLD-enabled ports

Enter the show link-keepalive command.

Example

show link-keepalive command

show link-keepalive command

Viewing detailed UDLD information for specific ports

Enter the show link-keepalive statistics command.

Example

show link-keepalive statistics command

show link-keepalive statistics command

Clearing UDLD statistics

Syntax

clear link-keepalive statistics

This command clears the packets sent, packets received, and transitions counters in the show link keepalive statistics display.