- Table of Contents
-
- H3C Campus Fixed-Port Switches CLI-Based Quick Start Configuration Guide-6W101
- 01-H3C Devices CLI Reference
- 02-Login Management Quick Start Configuration Guide
- 03-Configuration File Management Quick Start Configruation Guide
- 04-Software Upgrade Quick Start Configuration Guide
- 05-Device Management Quick Start Configuration Guide
- 06-NTP Quick Start Configuration Guide
- 07-RBAC Quick Start Configuration Guide
- 08-IRF Quick Start Configuration Guide
- 09-Ethernet Interface Quick Start Configuration Guide
- 10-VLAN Quick Start Configuration Guide
- 11-Port Isolation Quick Start Configuration Guide
- 12-Loop Detection Quick Start Configuration Guide
- 13-QinQ Quick Start Configuration Guide
- 14-MAC Address Table Quick Start Configuration Guide
- 15-Ethernet Link Aggregation Quick Start Configuration Guide
- 16-Spanning Tree Quick Start Configuration Guide
- 17-DHCP Quick Start Configuration Guide
- 18-OSPF Quick Start Configuration Guide
- 19-Static Routing Quick Start Configuration Guide
- 20-Basic RIP Quick Start Configuration Guide
- 21-PBR Quick Start Configuration Guide
- 22-IGMP Snooping Quick Start Configuration Guide
- 23-Packet Filtering Quick Start Configuration Guide
- 24-QoS Quick Start Configuration Guide
- 25-IP Source Guard Quick Start Configuration Guide
- 26-SSH Quick Start Configuration Guide
- 27-Port Security Quick Start Configuration Guide
- 28-VRRP Quick Start Configuration Guide
- 29-PoE Quick Start Configuration Guide
- 30-Mirroring Quick Start Configuration Guide
- 31-Information Center Quick Start Configuration Guide
- 32-SNMP Quick Start Configuration Guide
- 33-LAN Networks Quick Start Configuration Guide
- Related Documents
-
Title | Size | Download |
---|---|---|
12-Loop Detection Quick Start Configuration Guide | 82.96 KB |
Loop Detection Quick Start Configuration Guide
Copyright © 2022 New H3C Technologies Co., Ltd. All rights reserved.
No part of this manual may be reproduced or transmitted in any form or by any means without prior written consent of New H3C Technologies Co., Ltd.
Except for the trademarks of New H3C Technologies Co., Ltd., any trademarks that may be mentioned in this document are the property of their respective owners.
The information in this document is subject to change without notice.
Contents
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.
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.