Loop Protection Commands

Use these commands to configure loop protection.

Loop protection detects physical and logical loops between Ethernet ports on a device. You must enable loop protection globally before you can enable it at the interface level.

keepalive

M4250

M4350

This command enables loop protection globally on the switch. As an option, you can configure the time in seconds between the transmission of keep-alive packets (that is, the transmit interval argument) and the maximum number of keep-alive packets (that is, the packet-count argument) that the switch can receive before an action is taken.

Default

Disabled

Interval is 5 seconds

Packet count is 1

Format keepalive [interval] [packet-count]
Mode Global Config

no keepalive

This command disables loop protection globally on the switch. This command also sets the transmit interval and packet count to the default value.

Format no keepalive
Mode Global Config

keepalive action

M4250

M4350

This command configures the action that must follow when a loop is detected on a port.

Default Disable
Format keepalive action {log | disable | both}
Mode Interface Config
Parameter Description
log The message is logged to a buffer log but the interface is not brought down.
disable The interface is brought down but the message is not logged.
both The interface is brought down and the message is logged.

no keepalive action

This command returns the command to the default action of disabling an interface when a loop is detected.

Format no keepalive action
Mode Interface Config

keepalive tag

M4250

M4350

This command configures the VLAN to be used when generating the VLAN tag of the loop protection PDUs. The tag protocol identifier (TPID) is dot1q.

Default Disabled
Format keepalive tag dot1q vlan-id
Mode Interface Config
Parameter Description
dot1q Uses a TPID of 0x8100.
dot1ad Uses a TPID of 0x88A8.
vlan-id The ID of the VLAN that must be used when generating the VLAN.

no keepalive tag

This command removes the VLAN-based loop protection and resets the port to port-based loop protection only.

Format no keepalive tag
Mode Interface Config

errdisable recovery cause keepalive

M4250

M4350

This command enables the autorecovery of interfaces on which a loop was detected.

Format errdisable recovery cause keepalive
Mode Global Config

no errdisable recovery cause keepalive

This command disables the autorecovery of interfaces on which a loop was detected.

Format no errdisable recovery cause keepalive
Mode Global Config

show keepalive

M4250

M4350

This command displays the global keep-alive configuration.

As an option, to display details, use the detail keyword followed by either a specific interface or the all keyword.

To specify an actual interface or port, do the following:

  • For an M4250 series switch, use the argument slot/port.
  • For an M4350 series switch, use the argument unit/slot/port, as shown in the command format.

For the unit/slot/port argument, you can also use commas to separate interfaces or use a hyphen for a range of interfaces.

Format show keepalive [detail {unit/slot/port | all}]
Mode Privileged EXEC

Command example:

CODE
(NETGEAR Switch) #show keepalive
Keepalive...................................... Enabled
Transmit interval.............................. 1
Max PDU Receive................................ 1

show keepalive statistics

M4250

M4350

This command displays the keep-alive statistics for a specific interface or for all interfaces.

To specify an actual interface or port, do the following:

  • For an M4250 series switch, use the argument slot/port.
  • For an M4350 series switch, use the argument unit/slot/port, as shown in the command format.
Format show keepalive statistics {unit/slot/port | all}
Mode Privileged EXEC

Command example:

CODE
(NETGEAR Switch) #show  keepalive statistics all
       Keep      Loop        Loop     Time Since     Rx           Port
Port   Alive     Detected    Count    Last Loop     Action        Status
------ --------- ----------- -------- ------------- ------------- --------
0/1    Yes       Yes         1        85            shut-down     D-Disable
0/3    Yes       No                                 log-shutdown  Enable

clear counters keepalive

M4250

M4350

This command clears keep-alive statistics that are associated with the interfaces, such as the number of transmitted packets, the number of received packets, and the number of loop packets.

Format clear counters keepalive
Mode Privileged EXEC