We had a problem with one of our edge Cisco switches where the port linked into our service provider wouldn't recover after they performed upgrades on the Provider Edge (PE) routers. To get around this issue, we will need to enable auto recovery on our PE switch.
So looking through our logs, we saw the following lines that happened at the time of the upgrade. We also noticed that the interface stayed down longer than the provided outage window.
#show logging
Apr 5 14:21:03.250: %LINEPROTO-5-UPDOWN: Line protocol on Interface TenGigabitEthernet1/1/1, changed state to down
Apr 5 14:21:04.251: %LINK-3-UPDOWN: Interface TenGigabitEthernet1/1/1, changed state to down
Apr 5 14:24:25.368: %PM-4-ERR_DISABLE: link-flap error detected on Te1/1/1, putting Te1/1/1 in err-disable state
#show interface TenGigabitEthernet1/1/1
TenGigabitEthernet1/1/1 is down, line protocol is down(err-disabled)
Hardware is Ten Gigabit Ethernet, address is e8eb.342c.b59d (bia e8eb.342c.b59d)
Description: Vocus DFAS circuit
MTU 9198 bytes, BW 10000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 5/255, rxload 4/255
Encapsulation ARPA, loopback not set
Keepalive not set
Full-duplex, 10Gb/s, link type is auto, media type is SFP-10GBase-LR
input flow-control is on, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output 00:00:00, output hang never
Last clearing of "show interface" counters never
Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
Check if auto recovery is enabled for any of the features on the switch, in this example you can see they are not
#show errdisable recovery
ErrDisable Reason Timer Status
----------------- --------------
arp-inspection Disabled
bpduguard Disabled
channel-misconfig Disabled
dhcp-rate-limit Disabled
dtp-flap Disabled
evpn-mh-core-isolation Disabled
gbic-invalid Disabled
inline-power Disabled
l2ptguard Disabled
link-flap Disabled
mac-limit Disabled
link-monitor-failure Disabled
loopback Disabled
oam-remote-failure Disabled
pagp-flap Disabled
port-mode-failure Disabled
pppoe-ia-rate-limit Disabled
psecure-violation Disabled
security-violation Disabled
sfp-config-mismatch Disabled
storm-control Disabled
udld Disabled
psp Disabled
dual-active-recovery Disabled
evc-lite input mapping fa Disabled
mrp-miscabling Disabled
Timer interval: 300 seconds
In this example, we only want to enable the auto recovery feature for the link-flap detection feature, to do this do the following config
#conf t
#errdisable recovery cause link-flap
Note: You can use the command "errdisable recovery cause all" to enable auto recovery for all causes
Check that the auto recovery has been enabled for link-flap and save the config
#show errdisable recovery
ErrDisable Reason Timer Status
----------------- --------------
arp-inspection Disabled
bpduguard Disabled
channel-misconfig Disabled
dhcp-rate-limit Disabled
dtp-flap Disabled
evpn-mh-core-isolation Disabled
gbic-invalid Disabled
inline-power Disabled
l2ptguard Disabled
link-flap Enabled
mac-limit Disabled
link-monitor-failure Disabled
loopback Disabled
oam-remote-failure Disabled
pagp-flap Disabled
port-mode-failure Disabled
pppoe-ia-rate-limit Disabled
psecure-violation Disabled
security-violation Disabled
sfp-config-mismatch Disabled
storm-control Disabled
udld Disabled
psp Disabled
dual-active-recovery Disabled
evc-lite input mapping fa Disabled
mrp-miscabling Disabled
Timer interval: 300 seconds