Loopback Detection Commands

This chapter contains the following sections:

loopback-detection enable (Global)

To enable the Loopback Detection (LBD) feature globally, use the loopback-detection enable Global Configuration mode command. To disable the Loopback Detection feature, use the no form of this command.

Syntax

loopback-detection enable

no loopback-detection enable

Parameters

This command has no arguments or keywords.

Default Configuration

Loopback Detection is disabled.

Command Mode

Global Configuration mode

User Guidelines

This command enables the Loopback Detection feature globally. Use the loopback-detection enable Interface Configuration mode command to enable Loopback Detection on an interface.

Example

The following example enables the Loopback Detection feature on the device.

switchxxxxxx(config)#  loopback-detection enable

loopback-detection enable (Interface)

To enable the Loopback Detection (LBD) feature on an interface, use the loopback-detection enable Interface (Ethernet, Port Channel) Configuration mode command. To disable the Loopback Detection feature on the interface, use the no form of this command.

Syntax

loopback-detection enable

no loopback-detection enable

Parameters

This command has no arguments or keywords.

Default Configuration

Loopback Detection is enabled on an interface.

Command Mode

Interface (Ethernet, Port Channel) Configuration mode

User Guidelines

This command enables Loopback Detection on an interface. Use the loopback-detection enable Global Configuration command to enable Loopback Detection globally.

Example

The following example enables the Loopback Detection feature on port gi1/0/4.

switchxxxxxx(config)#  interface gi1/0/4
switchxxxxxx(config-if)#  loopback-detection enable

loopback-detection interval

To set the time interval between LBD packets, use the loopback-detection interval Global Configuration mode command. To restore the default configuration, use the no form of this command.

Syntax

loopback-detection interval seconds

no loopback-detection interval

Parameters

seconds—Specifies the time interval in seconds between LBD packets. (Range: 10–60 seconds)

Default Configuration

The default time interval between LBD packets is 30 seconds.

Command Mode

Global Configuration mode

Example

The following example sets the time interval between LBD packets to 45 seconds.

switchxxxxxx(config)#  loopback-detection interval 45

show loopback-detection

To display information about Loopback Detection, use the show loopback-detection Privileged EXEC mode command.

Syntax

show loopback-detection [interface-id | detailed]

Parameters

  • interface-id—(Optional) Specifies an interface ID. The interface ID can be one of the following types: Ethernet port or Port-channel.

  • detailed—(Optional) Displays information for non-present ports in addition to present ports. If this is not set, the default is to display all present ports.

Default Configuration

All ports are displayed. If detailed is not used, only present ports are displayed.

Command Mode

Privileged EXEC mode

User Guidelines

Operational status of Active indicates the following conditions are meet:

  • Loopback is globally enabled.

  • Loopback is enabled on the interface.

  • Interface operational state of the interface is up.

  • Interface STP state is Forwarding or STP state is disabled.

Operational status of LoopDetected indicates that the interface entered errDisabled state.

Operational status of Inactive indicates that loopback detection is not actively attempting to detect loops, i.e. the Active status conditions are not meet.

Example

The following example displays information about the status of Loopback Detection.

Console# show loopback-detection
Loopback detection: Enabled
LBD packets interval: 30 Seconds
Interface
---------
gi1/0/1
gi1/0/2
gi1/0/3
gi1/0/4
Loopback Detection
Admin State
------------------
Enabled
Enabled
Enabled
Disabled
Loopback Detection
Operational State
------------------
Active
LoopDetected
Inactive
Inactive