Loop detection configuration

Loop detection configuration

Principle: detecting device detects the packet and sends it back loop if the machine (does not require the sending and receiving ports of the same port) to confirm whether there is a loop, if a port receives the loop detection packet sent by the apparatus, it is found that there is a loop where the link port.
Special Instructions: stp agreement will generally closed loops exist, and now Huawei China three devices enabled by default stp agreement.
FIG Topology:
Here Insert Picture Description
three switches Basic Configuration:
SWA Configuration:
[SWA] VLAN 100
[SWA-VLANs 100] quit
[SWA] Range of GigabitEthernet interface of GigabitEthernet 1/0/1 to 1/0/2
[SWA-IF-Range] Port Trunk-type Link
[SWA-IF-Range] the permit Trunk Port VLAN 100
[SWA-IF-Range] quit
SWA] Global Use the undo stp enable # stp Close

SWB配置:
[SWB]vlan 100
[SWB-vlan100]quit
[SWB]interface range GigabitEthernet 1/0/1 to GigabitEthernet 1/0/2
[SWB-if-range]port link-type trunk
[SWB-if-range]port trunk permit vlan 100
[SWB-if-range]quit
[SWB]undo stp global enable

SWC configuration:
[SWC] VLAN 100
[SWC-VLANs 100] quit
[SWC] Range of GigabitEthernet 1/0/1 to 1/0/2 interface of GigabitEthernet
[SWC-IF-Range] Trunk Port Link-type
[SWC-IF-Range ] the permit Trunk Port VLAN 100
[the SWC-IF-Range] quit
[the SWC] Use the undo STP Global enable
----------------------------- -----------------
# above configuration closed stp, already there is a loop.

Global Loop Detection:

[SWA] loopback-detection global enable vlan 100 # global loop detecting function for VLANs 100
[SWA] processing mode loopback-detection global action shutdown # global configuration for loop detection Shutdown Mode
[SWA] loopback-detection interval- time default 30S # 20
   # configured loop detection time interval of 20 seconds after the UP port automatic recovery time, then the loop detection will be closed

检测日志:
%Dec 12 21:32:16:550 2019 SWA LPDT/4/LPDT_LOOPED: Loopback exists on GigabitEthernet1/0/1.
%Dec 12 21:32:16:584 2019 SWA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/1 changed to down.
%Dec 12 21:32:16:587 2019 SWA IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/1 changed to down.
%Dec 12 21:32:16:609 2019 SWA LPDT/4/LPDT_VLAN_LOOPED: Loopback exists on GigabitEthernet1/0/1 in VLAN 100.
%Dec 12 21:32:16:611 2019 SWA LPDT/5/LPDT_VLAN_RECOVERED: Loopback on GigabitEthernet1/0/1 in VLAN 100 recovered.
%Dec 12 21:32:16:613 2019 SWA LPDT/5/LPDT_RECOVERED: Loopback on GigabitEthernet1/0/1 recovered.
%Dec 12 21:32:16:633 2019 SWA LPDT/4/LPDT_LOOPED: Loopback exists on GigabitEthernet1/0/2.
%Dec 12 21:32:16:698 2019 SWA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/2 changed to down.
%Dec 12 21:32:16:703 2019 SWA IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/2 changed to down.
%Dec 12 21:32:16:710 2019 SWA IFNET/3/PHY_UPDOWN: Physical state on the interface Vlan-interface100 changed to down.
%Dec 12 21:32:16:714 2019 SWA IFNET/5/LINK_UPDOWN: Line protocol state on the interface Vlan-interface100 changed to down.
%Dec 12 21:32:16:732 2019 SWA LPDT/4/LPDT_VLAN_LOOPED: Loopback exists on GigabitEthernet1/0/2 in VLAN 100.
%Dec 12 21:32:16:733 2019 SWA LPDT/5/LPDT_VLAN_RECOVERED: Loopback on GigabitEthernet1/0/2 in VLAN 100 recovered.
% Dec 12 21: 32: 16 : 733 2019 SWA LPDT / 5 / LPDT_RECOVERED:. Loopback on GigabitEthernet1 / 0/2 recovered


view port is closed off automatically because of the loop:
[SWA] the display interface of GigabitEthernet 1/0/1
GigabitEthernet / 0/1
Current State: DOWN (Loopback detection down)
Line protocol state: DOWN
IP packet frame type: Ethernet II, hardware address: 4871-d643-0100
Description: GigabitEthernet1/0/1 Interface
Bandwidth: 1000000 kbps
Loopback is not set
Unknown-speed mode, unknown-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
Maximum frame length: 9216

[SWA]display interface GigabitEthernet 1/0/2
GigabitEthernet1/0/2
Current state: DOWN(Loopback detection down)
Line protocol state: DOWN
IP packet frame type: Ethernet II, hardware address: 4871-d643-0100
Description: GigabitEthernet1/0/2 Interface
Bandwidth: 1000000 kbps
Loopback is not set
Unknown-speed mode, unknown-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
Maximum frame length: 9216


----------------------------------------------------------------------------------------------

Ethernet interface configuration loop detection:

[SWA]loopback-detection interval-time 20      #检测间隔30秒
[SWA]interface GigabitEthernet 1/0/1
[SWA-GigabitEthernet1/0/1]loopback-detection enable vlan 100
[SWA-GigabitEthernet1/0/1]loopback-detection action shutdown
[SWA-GigabitEthernet1/0/1]quit

[SWA]display loopback-detection
Loopback detection is enabled.
Loopback detection interval is 20 second(s).
Loopback is detected on following interfaces:
Interface Action mode
GigabitEthernet1/0/2 none
--------------------------------------------------------------------------------------

Published 57 original articles · won praise 8 · views 5541

Guess you like

Origin blog.csdn.net/zdl244/article/details/103517798