12-15-2022 09:17 AM
On this article we will explore how to configure Loop Detection on an ICX. Specifically, Loose Mode.
By default, Loop Detection is disabled on an ICX device.
For the purposes of this guide, I will be using an ICX 7150-24P running version SPS08095h, but all the commands shown here should be available on other models/version as well
There are two types of Loop Detection: Strict Mode and Loose Mode. Strict mode is configured on an interface level, and it will be triggered if a packet is looped back to the same port.
Loose mode is configured on the VLAN of the receiving port, and it will be triggered if packets originate from any port or Vlan on the same device.
Configure Loose Loop Detection
To enable Loose Loop Detection, we need to follow the next steps:
1-Access the VLAN(s) where Loop detection needs to be configured
ICX7150-24P Switch#conf t
ICX7150-24P Switch(config)#vlan 10
ICX7150-24P Switch(config-vlan-10)#
2-Then enable loop-detection on this specific Vlan
ICX7150-24P Switch(config-vlan-10)#loop-detection
We can check if loop detection has been successfully enabled by running the following command:
ICX7150-24P Switch#show loop-detection status
loop detection packets interval: 10 (unit 0.1 sec)
index port/vlan status # errdis sent-pkts recv-pkts
1 vlan10 0 errdis port 0 121 0
Verify Loop Detection
If a Loop is present, all affected ports will be placed on err-disable status:
ICX7150-24P Switch(config)#Debug: Sep 18 13:42:59 Loop-detection: port 1/1/3 (vlan=10), put into errdisable state
To confirm the same, we have the following options
a) Show loop-detection status
ICX7150-24P Switch#show loop status
loop detection packets interval: 10 (unit 0.1 sec)
Number of err-disabled ports: 1
You can re-enable err-disable ports one by one by "disable" then "enable"
under interface config, re-enable all by "clear loop-detect", or
configure "errdisable recovery cause loop-detection" for automatic recovery
index port/vlan status # errdis sent-pkts recv-pkts
1 vlan10 1 errdis port 2 151 2
b)Show log
ICX7150-24P Switch#sh log
Syslog logging: enabled ( 0 messages dropped, 0 flushes, 12 overruns)
Buffer logging: level ACDMEINW, 4000 messages logged
level code: A=alert C=critical D=debugging M=emergency E=error
I=informational N=notification W=warning
Static Log Buffer:
Aug 26 01:20:38:I:System: Stack unit 1 POE PS 1, Internal Power supply with 370000 mwatts capacity is up
Dynamic Log Buffer (4000 lines):
Sep 18 13:44:31:I:Security: running-config was potentially changed by super from console
Sep 18 13:44:00:I:System: Interface ethernet 1/1/3, state down
Sep 18 13:44:00:I:LOOP DETECTION: VLAN 10, port 1/1/3 detect, putting into err-disable state
We can also filter the show log with the following command in case the output is flooded with any other unrelated logs
Show log | i err-disable
ICX7150-24P Switch#show log | i err-disable
Sep 18 13:44:00:I:LOOP DETECTION: VLAN 10, port 1/1/3 detect, putting into err-disable state
Sep 18 13:42:59:I:LOOP DETECTION: VLAN 10, port 1/1/3 detect, putting into err-disable state
Sep 18 13:41:24:I:LOOP DETECTION: VLAN 10, port 1/1/3 detect, putting into err-disable state
Sep 18 13:38:36:I:LOOP DETECTION: VLAN 10, port 1/1/2 detect, putting into err-disable state
Sep 18 13:38:36:I:LOOP DETECTION: VLAN 10, port 1/1/3 detect, putting into err-disable state
ICX7150-24P Switch#
c)Show interface brief
ICX7150-24P Switch#show interface brief
Port Link State Dupl Speed Trunk Tag Pvid Pri MAC Name
1/1/1 Up Forward Full 1G None No 10 0 609c.9fe5.a4a0
1/1/2 Up Forward Full 1G None No 10 0 609c.9fe5.a4a1
1/1/3 ERR-DIS None None None None No 10 0 609c.9fe5.a4a2
1/1/4 Up Forward Full 1G None Yes 1 0 609c.9fe5.a4a3
1/1/5 Down None None None None No 1 0 609c.9fe5.a4a4
Or it can be directly filtered like this
ICX7150-24P Switch#show interface brief | i ERR
1/1/3 ERR-DIS None None None None No 10 0 609c.9fe5.a4a2
Loop Detection Recovery
In order to recover a port that has been err-disabled, we have the following options
a) Manually disable and re-enable the port
ICX7150-24P Switch#conf t
ICX7150-24P Switch(config)#interface e 1/1/3
ICX7150-24P Switch(config-if-e1000-1/1/3)#disable
ICX7150-24P Switch(config-if-e1000-1/1/3)#enable
ICX7150-24P Switch(config-if-e1000-1/1/3)#sh int br e 1/1/3
Port Link State Dupl Speed Trunk Tag Pvid Pri MAC Name
1/1/3 Up Forward Full 1G None No 10 0 609c.9fe5.a4a2
b) Enter the command “clear loop-detection”
ICX7150-24P Switch(config)#clear loop-detection
All errdisable ports are enabled
c)Enable port recovery. This will automatically recover the port based on the parameters configured
Here are the basic commands to perform the same:
1-Set global loop detection interval
When loop detection is enabled, the loop detection time unit is 0.1 second, with a default of 10 (one second). The loop detection interval ranges from 1 (one tenth of a second) through 300 (30 seconds)
ICX7150-24P Switch(config)#loop-detection-interval 50
In this example, the interval has been set to 5 seconds
2-Configure the device to automatically recover the ports that has been disabled due to loop-detection
ICX7150-24P Switch(config)#errdisable recovery cause loop-detection
3-Specify the recovery time interval
By default, the device will wait for 300 seconds before re-enabling the ports. We can change this interval to a value from 10 through 65535 seconds
ICX7150-24P Switch(config)#errdisable recovery interval 60
As shown from the following show log output, and with the options currently configured, the affected ports will be automatically recovered after 1 minute
Sep 18 14:06:21:I:System: Interface ethernet 1/1/3, state up
Sep 18 14:06:21:I:System: Interface ethernet 1/1/2, state up
Sep 18 14:06:18:I:ERR_DISABLE: Interface ethernet 1/1/3, err-disable recovery timeout
Sep 18 14:06:18:I:ERR_DISABLE: Interface ethernet 1/1/2, err-disable recovery timeout
Sep 18 14:05:18:I:System: Interface ethernet 1/1/2, state down
Sep 18 14:05:18:I:LOOP DETECTION: VLAN 10, port 1/1/2 detect, putting into err-disable state
Sep 18 14:05:18:I:System: Interface ethernet 1/1/3, state down
Sep 18 14:05:18:I:LOOP DETECTION: VLAN 10, port 1/1/3 detect, putting into err-disable state
However, take into consideration that the port will be err-disabled again if the actual loop has not been fixed
Finally, there is also the option to only send an alert when a loop has been detected but without putting the affected ports on any ERR-DISABLED status.
This must be configured on an interface level
ICX7150-24P Switch(config-if-e1000-1/1/3)#loop-detection shutdown-disable
Sep 18 14:13:14:I:LOOP DETECTION: port 1/1/3 detect Loop, Ignoring shut down event in shutdown-disable mode
And those should be all the most important commands to configure and verify Loop detection on an ICX. I hope this has been useful for all of you
Marcel Guzman, Sr Technical Support Engineer
support.ruckuswireless.com/contact-us