H3C Campus Fixed-Port Switches CLI-Based Quick Start Configuration Guide-6W101

HomeSupportQuick StartH3C Campus Fixed-Port Switches CLI-Based Quick Start Configuration Guide-6W101
Table of Contents
Related Documents
12-Loop Detection Quick Start Configuration Guide

Loop Detection Quick Start Configuration Guide

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2022 New H3C Technologies Co., Ltd. All rights reserved.



Configuring loop detection

Introduction

The following information uses an example to describe the basic procedure for configuring loop detection.

Network configuration

As shown in Figure 1, configure loop detection on Device A to meet the following requirements:

·     Device A generates a log as a notification.

·     Device A automatically shuts down the port on which a loop is detected.

Figure 1 Network diagram

Procedure

Configuring Device A

# Create VLAN 100, and globally enable loop detection for the VLAN.

<DeviceA> system-view

[DeviceA] vlan 100

[DeviceA–vlan100] quit

[DeviceA] loopback-detection global enable vlan 100

# Configure GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 as trunk ports, and assign them to VLAN 100.

[DeviceA] interface gigabitethernet 1/0/1

[DeviceA-GigabitEthernet1/0/1] port link-type trunk

[DeviceA-GigabitEthernet1/0/1] port trunk permit vlan 100

[DeviceA-GigabitEthernet1/0/1] quit

[DeviceA] interface gigabitethernet 1/0/2

[DeviceA-GigabitEthernet1/0/2] port link-type trunk

[DeviceA-GigabitEthernet1/0/2] port trunk permit vlan 100

[DeviceA-GigabitEthernet1/0/2] quit

# Set the global loop protection action to shutdown.

[DeviceA] loopback-detection global action shutdown

# Set the loop detection interval to 35 seconds.

[DeviceA] loopback-detection interval-time 35

# Save the configuration.

[DeviceA] save force

Configuring Device B

# Create VLAN 100.

<DeviceB> system-view

[DeviceB] vlan 100

[DeviceB–vlan100] quit

# Configure GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 as trunk ports, and assign them to VLAN 100.

[DeviceB] interface gigabitethernet 1/0/1

[DeviceB-GigabitEthernet1/0/1] port link-type trunk

[DeviceB-GigabitEthernet1/0/1] port trunk permit vlan 100

[DeviceB-GigabitEthernet1/0/1] quit

[DeviceB] interface gigabitethernet 1/0/2

[DeviceB-GigabitEthernet1/0/2] port link-type trunk

[DeviceB-GigabitEthernet1/0/2] port trunk permit vlan 100

[DeviceB-GigabitEthernet1/0/2] quit

# Save the configuration.

[DeviceB] save force

Configuring Device C

# Create VLAN 100.

<DeviceC> system-view

[DeviceC] vlan 100

[DeviceC–vlan100] quit

# Configure GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 as trunk ports, and assign them to VLAN 100.

[DeviceC] interface gigabitethernet 1/0/1

[DeviceC-GigabitEthernet1/0/1] port link-type trunk

[DeviceC-GigabitEthernet1/0/1] port trunk permit vlan 100

[DeviceC-GigabitEthernet1/0/1] quit

[DeviceC] interface gigabitethernet 1/0/2

[DeviceC-GigabitEthernet1/0/2] port link-type trunk

[DeviceC-GigabitEthernet1/0/2] port trunk permit vlan 100

[DeviceC-GigabitEthernet1/0/2] quit

# Save the configuration.

[DeviceC] save force

Verifying the configuration

Verify the loop detection configuration on the devices. The following information uses Device A as an example.

# View the system logs.

<DeviceA> %Aug 26 19:17:29:760 2021 DeviceA IFNET/3/PHY_UPDOWN: -MDC=1; Physical state on the interface GigabitEthernet1/0/2 changed to up.

%Aug 26 19:17:29:760 2021 DeviceA IFNET/5/LINK_UPDOWN: -MDC=1; Line protocol state on the interface GigabitEthernet1/0/2 changed to up.

%Aug 26 19:17:30:356 2021 DeviceA IFNET/3/PHY_UPDOWN: -MDC=1; Physical state on the interface GigabitEthernet1/0/1 changed to up.

%Aug 26 19:17:30:356 2021 DeviceA IFNET/5/LINK_UPDOWN: -MDC=1; Line protocol state on the interface GigabitEthernet1/0/1 changed to up.

%Aug 26 19:17:33:985 2021 DeviceA LPDT/4/LPDT_LOOPED: -MDC=1; A loop was detected on GigabitEthernet1/0/1.

%Aug 26 19:17:34:005 2021 DeviceA IFNET/3/PHY_UPDOWN: -MDC=1; Physical state on the interface GigabitEthernet1/0/1 changed to down.

%Aug 26 19:17:34:006 2021 DeviceA IFNET/5/LINK_UPDOWN: -MDC=1; Line protocol state on the interface GigabitEthernet1/0/1 changed to down.

%Aug 26 19:17:34:018 2021 DeviceA LPDT/4/LPDT_VLAN_LOOPED: -MDC=1; A loop was detected on GigabitEthernet1/0/1 in VLAN 100.

%Aug 26 19:17:34:019 2021 DeviceA LPDT/4/LPDT_LOOPED: -MDC=1; A loop was detected on GigabitEthernet1/0/2.

%Aug 26 19:17:34:040 2021 DeviceA IFNET/3/PHY_UPDOWN: -MDC=1; Physical state on the interface GigabitEthernet1/0/2 changed to down.

%Aug 26 19:17:34:041 2021 DeviceA IFNET/5/LINK_UPDOWN: -MDC=1; Line protocol state on the interface GigabitEthernet1/0/2 changed to down.

%Aug 26 19:17:34:055 2021 DeviceA LPDT/4/LPDT_VLAN_LOOPED: -MDC=1; A loop was detected on GigabitEthernet1/0/2 in VLAN 100.

%Aug 26 19:17:34:055 2021 DeviceA LPDT/5/LPDT_VLAN_RECOVERED: -MDC=1; A loop was removed on GigabitEthernet1/0/1 in VLAN 100.

%Aug 26 19:17:34:055 2021 DeviceA LPDT/5/LPDT_RECOVERED: -MDC=1; All loops were removed on GigabitEthernet1/0/1.

%Aug 26 19:17:34:056 2021 DeviceA LPDT/5/LPDT_VLAN_RECOVERED: -MDC=1; A loop was removed on GigabitEthernet1/0/2 in VLAN 100.

%Aug 26 19:17:34:056 2021 DeviceA LPDT/5/LPDT_RECOVERED: -MDC=1; All loops were removed on GigabitEthernet1/0/2.

The output shows the following information:

·     Device A detected loops on GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 within a loop detection interval.

·     Loops on GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 were removed.

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

<DeviceA> display loopback-detection

Loop detection is enabled.

Global loop detection interval is 35 second(s).

Loop is detected on following interfaces:

  Interface                         Action mode     VLANs/VSI

  GigabitEthernet1/0/1              Shutdown        100

  GigabitEthernet1/0/2              Shutdown        100

The output shows that the device has removed the loops from GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 according to the shutdown action.

# Display the status of GigabitEthernet 1/0/1.

<DeviceA> display interface gigabitEthernet 1/0/1

GigabitEthernet1/0/1

Current state: DOWN (Loopback detection down)

The output shows that GigabitEthernet 1/0/1 is already shut down by the loop detection module.

# Display the status of GigabitEthernet 1/0/2.

<DeviceA>display interface gigabitEthernet 1/0/2

GigabitEthernet1/0/2

Current state: DOWN (Loopback detection down)

The output shows that GigabitEthernet 1/0/2 is already shut down by the loop detection module.

Configuration files

·     Device A:

#

 loopback-detection global enable vlan 100

 loopback-detection global action shutdown

 loopback-detection interval-time 35

#

vlan 100

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100

#

interface GigabitEthernet1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100

#

·     Device B:

#

vlan 100

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100

#

interface GigabitEthernet1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100

#

·     Device C:

#

vlan 100

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100

#

interface GigabitEthernet1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100

#

Related documentation

·     Loop detection configuration in the Layer 2—LAN switching configuration guide for the device.

·     Loop detection commands in the Layer 2—LAN switching command reference for the device.

  • 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
新华三官网