04-Layer 2 - LAN Switching Command Reference

HomeSupportRoutersCR16000-F SeriesReference GuidesCommand ReferencesH3C CR16000-F Routers Command References-Release795x-6W10004-Layer 2 - LAN Switching Command Reference
12-Loop detection commands
Title Size Download
12-Loop detection commands 51.69 KB

L2VPN loop detection commands

display loopback-detection

Use display loopback-detection to display the loop detection configuration and status.

Syntax

display loopback-detection

Views

Any view

Predefined user roles

network-admin

network-operator

Example

# Display the loop detection configuration and status.

<Sysname> display loopback-detection

Loop detection is enabled.

Loop detection interval is 30 second(s).

Loop is detected on following interfaces:

 Interface                Action mode

 GigabitEthernet3/1/3.1   None

Table 1 Command output

Field

Description

Action mode

Loop protection action:

·         Block—When a loop is detected on an interface, the device performs the following operations:

?  Generates a log.

?  Disables the interface from learning MAC addresses.

?  Blocks the interface.

·         None—When a loop is detected on an interface, the device generates a log but performs no action on the interface.

 

loopback-detection action

Use loopback-detection action to set the loop protection action on a per-interface basis.

Use undo loopback-detection action to restore the default.

Syntax

loopback-detection action block

undo loopback-detection action

Default

When the device detects a loop on an interface, it generates a log but performs no action on the interface.

Views

Layer 3 Ethernet subinterface view

Layer 3 aggregate subinterface view

Predefined user roles

network-admin

Parameters

block: Enables the block mode. If a loop is detected, the device performs the following operations:

·          Generates a log.

·          Disables MAC address learning.

·          Blocks the interface.

Example

# Set the loop protection action to block on GigabitEthernet 3/1/1.1.

<Sysname> system-view

[Sysname] interface gigabitethernet 3/1/1.1

[System-GigabitEthernet3/1/1.1] loopback-detection action block

Related commands

display loopback-detection

loopback-detection enable

Use loopback-detection enable to enable single-tagged loop detection on a subinterface.

Use undo loopback-detection enable to disable single-tagged loop detection on a subinterface.

Syntax

loopback-detection enable vlan { vlan-id-list | all }

undo loopback-detection enable vlan { vlan-id-list | all }

Default

Loop detection is disabled on interfaces.

Views

Layer 2 Ethernet subinterface view

Layer 2 aggregate subinterface view

Predefined user roles

network-admin

Parameters

vlan-id-list: Specifies a space-separated list of up to 10 VLAN items. Each item specifies a VLAN ID or a range of VLAN IDs in the form of vlan-id1 to vlan-id2. The value range for VLAN IDs is 1 to 4094. The value for vlan-id2 cannot be smaller than the value for vlan-id1.

all: Specifies all existing VLANs.

Usage guidelines

This command enables a subinterface to send loop detection frames with one layer of VLAN tags.

This command is mutually exclusive with the loopback-detection enable s-vid c-vid command. Do not use them together on a subinterface.

Example

# Enable single-tagged loop detection on GigabitEthernet 3/1/1.1 for VLAN 10 through VLAN 20.

<Sysname> system-view

[Sysname] interface gigabitethernet 3/1/1.1

[System-GigabitEthernet3/1/1.1] loopback-detection enable vlan 10 to 20

Related commands

display loopback-detection

loopback-detection enable s-vid c-vid

loopback-detection priority

loopback-detection enable s-vid c-vid

Use loopback-detection enable s-vid c-vid to enable double-tagged loop detection on a subinterface.

Use undo loopback-detection enable s-vid c-vid to disable double-tagged loop detection on a subinterface.

Syntax

loopback-detection enable s-vid vlan-id c-vid { vlan-id-list | all }

undo loopback-detection enable s-vid vlan-id c-vid { vlan-id-list | all }

Default

Loop detection is disabled on interfaces.

Views

Layer 2 Ethernet subinterface view

Layer 2 aggregate subinterface view

Predefined user roles

network-admin

Parameters

s-vid vlan-id: Specifies an SVLAN ID in the range of 1 to 4094.

c-vid { vlan-id-list | all }: Specifies CVLAN IDs.

·          vlan-id-list: Specifies a space-separated list of up to 10 VLAN items. Each item specifies a VLAN ID or a range of VLAN IDs in the form of vlan-id1 to vlan-id2. The value range for VLAN IDs is 1 to 4094. The value for vlan-id2 cannot be smaller than the value for vlan-id1.

·          all: Specifies all existing VLANs.

Usage guidelines

This command enables a subinterface to send loop detection frames with two layers of VLAN tags.

This command is mutually exclusive with the loopback-detection enable command. Do not use them together on a subinterface.

To modify the SVLAN ID, first use the undo loopback-detection enable s-vid c-vid command to delete the original SVLAN ID. You can execute the loopback-detection enable s-vid c-vid command multiple times to add CVLAN IDs.

Example

# Enable double-tagged loop detection on GigabitEthernet 3/1/1.10. Specify the SVLAN as VLAN 2 and CVLANs as VLANs 1 through 10.

<Sysname> system-view

[Sysname] interface gigabitethernet 3/1/1.10

[System-GigabitEthernet3/1/1.10] loopback-detection s-vid 2 c-vid 1 to 10

Related commands

display loopback-detection

loopback-detection enable

loopback-detection priority

loopback-detection interval-time

Use loopback-detection interval-time to set the loop detection interval.

Use undo loopback-detection interval-time to restore the default.

Syntax

loopback-detection interval-time interval

undo loopback-detection interval-time

Default

The loop detection interval is 30 seconds.

Views

System view

Predefined user roles

network-admin

Parameters

interval: Sets the loop detection interval in the range of 1 to 300 seconds.

Usage guidelines

With loop detection enabled, the device sends loop detection frames at the specified interval. A shorter interval offers more sensitive detection but consumes more resources. Consider the system performance and loop detection speed when you set the loop detection interval.

Example

# Set the loop detection interval to 10 seconds.

<Sysname> system-view

[Sysname] loopback-detection interval-time 10

Related commands

display loopback-detection

loopback-detection priority

Use loopback-detection priority to set the priority value in the loop detection priority on a subinterface.

Use undo loopback-detection priority to restore the default.

Syntax

loopback-detection priority priority

undo loopback-detection priority

Default

The priority value is 7 in the loop detection priority of an interface.

Views

Layer 2 Ethernet subinterface view

Layer 2 aggregate subinterface view

Predefined user roles

network-admin

Parameters

priority: Sets the priority value in the range of 1 to 7. The smaller the value, the higher the priority.

Usage guidelines

The loop detection frames sent by an interface carry the loop detection priority of the interface. The loop detection priority contains the priority value, the bridge MAC address, and the port ID. When an interface receives a loop detection frame, it compares its own loop detection priority with that in the frame to identify whether a loop exists. If the loop detection priority in the frame is higher, a loop exists in the L2VPN network. If the loop detection priority of the interface is higher, the interface drops the frame.

An interface uses the following procedure to compare its loop detection priority with that in an incoming loop detection frame:

1.        Compares the priority values. The smaller the value, the higher the priority.

2.        Compares the bridge MAC addresses if the priority values are the same. A lower bridge MAC address has a higher priority.

3.        Compares the port IDs if the bridge MAC addresses are the same, which indicates the loop detection frame is sent by another interface of the device. A smaller port ID has a higher priority.

Example

# Set the priority value in the loop detection priority to 1 on GigabitEthernet 3/1/1.10.

<Sysname> system-view

[Sysname] interface gigabitethernet 3/1/1.10

[Sysname-GigabitEthernet3/1/1.10] loopback-detection priority 1

Related commands

display loopback-detection

loopback-detection enable

loopback-detection enable s-vid c-vid

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网