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

None.

Default Configuration

Loopback Detection is disabled.

Command Mode

Global Configuration mode

User Guidelines

Use the loopback-detection enable command to globally enable loopback detection protocol. Use the no form of this command to disabled it.

You can verify your setting by entering the show loopback-detection Privileged EXEC command.

Example

The following example shows how to enable loopback-detection:

switchxxxxxx(config)#loopback-detection enable
switchxxxxxx(config)# do show loopback-detection
Loopback detection: Enabled
Loopback detection interval : 30
Interface Loopback Detection Loopback Detection
          Admin State        Operational Status
--------- ------------------ ------------------
fa1       disabled           inactive
fa2       disabled           inactive
fa3       disabled           inactive

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

None.

Default Configuration

Loopback Detection is enabled on an interface.

Command Mode

Interface Configuration mode

User Guidelines

Use the loopback-detection enable command to globally enable loopback detection protocol on ports. Use the no form of this command to disabled it.

You can verify your setting by entering the show loopback-detection Privileged EXEC command.

Example

The following example shows how to enable loopback-detection:

switchxxxxxx(config)#interface fa1
switchxxxxxx(config-if)#loopback-detection enable
switchxxxxxx(config-if)# do show loopback-detection interfaces fa1
Loopback detection: Enabled
Loopback detection interval : 30
Interface Loopback Detection Loopback Detection
          Admin State        Operational Status
--------- ------------------ ------------------
fa1       enabled           inactive

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: 1—60 seconds.)

Default Configuration

The default time interval between LBD packets is 30 seconds.

Command Mode

Global Configuration mode

User Guidelines

Use the loopback-detection interval command to change broadcasting interval. Use the no form of this command to restore to default.

You can verify your setting by entering the show loopback-detection Privileged EXEC command.

Example

The following example shows how to enable loopback-detection:

switchxxxxxx(config)#loopback-detection interval 40
switchxxxxxx(config)# do show loopback-detection
Loopback detection: Enabled
Loopback detection interval : 40
Interface Loopback Detection Loopback Detection
          Admin State        Operational Status
--------- ------------------ ------------------
fa1       disabled           inactive
fa2       disabled           inactive
fa3       disabled           inactive

show loopback-detection

To show loopback-detection status, use the show loopback-detection Privileged EXEC mode command.

Syntax

show loopback-detection [interfaces interface-id]

Parameters

interfaces interface-id—Specifies an interface ID or a list of interface IDs.

Default Configuration

N/A

Command Mode

Privileged EXEC mode

User Guidelines

Operational status of Active indicates that the following conditions are met:

  • 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, (that is, the Active status conditions are not meet).

Example

This example shows how to show loopback-detection configuration:

switchxxxxxx(config)# loopback-detection enable
switchxxxxxx(config)# do show loopback-detection
Loopback detection: Enabled
Loopback detection interval : 30
Interface Loopback Detection Loopback Detection
          Admin State        Operational Status
--------- ------------------ ------------------
fa1       disabled           inactive
fa2       disabled           loopDetected
fa3       disabled           inactive