Packet Path/

Link Flapping Explained: Why a Port Keeps Going Up and Down

A link that keeps going up and down is flapping, and the switch logs every cycle as a pair: %LINK-3-UPDOWN for the physical change and %LINEPROTO-5-UPDOWN for the line protocol following it. One pair is a footnote; the same port repeating is a fault with a pattern — and the pattern separates the causes: a failing cable or optic, a loose connector, a dying port, a far end losing power, a negotiation fight on copper, or a flap that is only a symptom of something upstream. This guide reads the pattern first, works the causes in senior order, and fixes them in a production-safe order.

Switching · Intermediate · 10 min · November 29, 2026

Editorial illustration on a dark teal background: a navy network switch with a single central Ethernet port, an amber cable plugged in at an angle, and above the port a round link light lit on one half and dark on the other, ringed by radiating amber dashes.

The short answer

Why does an interface keep going up and down? Because the physical connection itself keeps being lost and remade: the cable, optic, connector, or port is failing, the far end keeps restarting or losing power, or something upstream keeps forcing the port down and letting it recover. The switch logs each cycle as a pair — %LINK-3-UPDOWN for the physical change, %LINEPROTO-5-UPDOWN for the line protocol following. One pair can be a genuine one-off; the same port repeating it is flapping, and the pattern of the repeats is the diagnosis.

Picture a phone charger with a worn connector: the light comes on, goes off when the cable shifts, comes back when it settles. A flapping port is the same fault at network speed: everything above the port keeps reacting to a light that will not stay on.

In plain EnglishFlapping: a link repeatedly going down and up. Physical layer: the actual signal on the cable or fibre — present, or not. Line protocol: the port's readiness to carry traffic, up only while the physical layer is up. Optic / SFP: the plug-in module turning electricity into light on a fibre port. CRC error: a frame whose checksum fails — the bits were damaged on the way. DOM: digital optical monitoring — the optic reporting its light levels. Err-disable: the switch shutting a port itself over a detected fault.

How to read the log pair

%LINK-3-UPDOWN: Interface GigabitEthernet1/0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/1, changed state to down

The two lines travel together, each reporting a different layer. %LINK-3-UPDOWN is the physical layer: the switch lost the port's signal, then saw it again. %LINEPROTO-5-UPDOWN is the line protocol following it — readiness to pass traffic, down because the physical layer is down. The decoder entry walks through %LINK-3-UPDOWN line by line.

Then read the pattern, not just the lines. Frequency: twice a day is a nuisance; twice a minute is an outage in instalments — every cycle can trigger spanning-tree and routing reactions beyond the port. Interval regularity: perfectly regular gaps suggest something with a clock — a reboot, a timer, a scheduled job; random gaps suggest something physical degrading. Time of day: business-hours flaps suggest a person or a disturbed cable; 3 a.m. flaps suggest hardware failing alone.

Pattern in the logWhat it points atFirst move
Random intervals, any hourFailing hardware — cable, optic, or port.Read the error counters.
Perfectly regular intervalsA far-end reboot, a recovery timer, a scheduled job.Check the far end's uptime.
Business hours onlyA person or a moving cable.Reseat the connector.
One port, three flap patternsRandomirregular gaps — failing hardwareRegulareven gaps — a reboot, a timer, a scheduled jobWork hourssteady at night, clustered by day — a disturbed cable

The shape of the repeats is evidence — each pattern indicts a different cause.

The causes, in working order

1. A failing cable, optic, or DAC. The commonest cause: the path degrades, the signal drops below what the receiver can read, the link falls, then recovers enough to retrain. Evidence: CRC and input errors climbing between flaps.

2. A loose or dirty connector. A fibre connector not fully seated, a dirty ferrule, or a strained patch lead makes contact that comes and goes with rack doors and vibration — the business-hours pattern. Copper leads fail the same way when a latch stops clicking.

3. A failing port, on either end. Switch ports and server NICs (network interface cards) die slowly too; a port that still flaps with a known-good cable, optic, and far end has indicted itself.

4. The far end rebooting or losing power. A far end that reboots, loses power, or has its own failing port looks identical from here: signal gone, signal back. Its uptime resetting with every flap gives it away.

5. Negotiation instability on copper. Speed, duplex, and auto-negotiation disagreements can make a copper link retrain repeatedly, especially where one end is hard-set and the other negotiates — see Duplex Mismatch Explained.

6. The flap as a symptom, not the fault. Sometimes the port is cycled by something else: spanning-tree reconvergence reacting to an event elsewhere, UDLD or err-disable recovery shutting and retrying it on a timer, or an upstream device restarting — the family UDLD Explained covers. Find the driver before replacing parts: new hardware flaps like the old.

How the log sequence separates the causes

Lay the flap times next to two other records and the causes fall apart. Error counters climbing between flaps mean a degrading path — physical and local, cause one or two. Clean counters with regular timing mean the path works until it vanishes whole: the far end or its power, cause four — a dying cable rarely fails that tidily. Flaps coinciding with spanning-tree topology changes mean the port is reacting to the network: cause six; look upstream. Many ports flapping together points at a shared cause — a line card, a power feed; one port alone points at its own path.

Isolate by changing one thing at a timeReplace the cableor patch leadMove to a spare portsame cable, new portSwap the opticknown-good SFPAddress the far endits port, power, rebootsflap gone: the pathfollows cable: beyond portstays: the portflap gone: the opticall local parts clearedEach swap splits the fault in two — change two at once and you learn nothing.

Four swaps, in order, corner the fault.

Checks in order

  1. Pull the log for this interface only. show logging | include GigabitEthernet1/0/1 — count the pairs, note gaps and hours. Rules in a true flap, not a single event.
  2. Read the error counters, twice. show interfaces GigabitEthernet1/0/1 counters errors, minutes apart. CRC and input errors climbing rule in a degrading path; still counters push toward the far end or a driver.
  3. Check the port state on both ends. show interfaces GigabitEthernet1/0/1 status and the full show interfaces: speed, duplex, any err-disabled state. Rules negotiation instability and a self-shut port in or out.
  4. On fibre, read the light levels. show interfaces GigabitEthernet1/0/1 transceiver detail, where supported, shows transmit and receive power. Low receive power rules in a dirty connector or failing optic; healthy levels move suspicion on.
  5. Ask the far end what it saw. Its log for the matching port, and its uptime. Uptime resetting with each flap rules in reboots or power; a far end that saw nothing points at a one-direction path fault.
  6. Correlate with spanning tree. show spanning-tree detail reports recent topology changes and their source port. Changes stamped at flap times rule in a symptom flap.
  7. Check whether a feature is cycling the port. show errdisable recovery lists which causes auto-recover a shut port, and the timer. A recovery-cycled port flaps on a schedule no cable swap fixes.

Fixes and prevention, in a production-safe order

Production impact first: every step below interrupts the link it touches. On a production uplink, a flap fix belongs in a maintenance window, not on the spot. Protect the evidence too: never clear counters mid-incident without noting the values first, and never bounce a critical port just to see, unrecorded — the next engineer reads your test as another flap.

Reseat, then replace, the cable or patch lead — reseating fixes the loose connector, a known-good lead the damaged one. On fibre, clean or replace the optic and patch lead as a pair: a dirty connector can soil the optic it mates with, so swapping one can carry the fault onto the new part. Move the connection to a spare port: if the flap follows the cable, the port is innocent; if it stays behind, the port has failed. Swap the optic once the path is cleared. Address the far end last, when the evidence sends you there. Verify: the link stays up past every previous failure interval, counters sit still, the log pair stops.

Prevention is watching. Trend optical levels where DOM is supported: falling receive power is a flap announced in advance. Review logs for repeated up/down pairs before users report them, and swap suspect leads whenever a rack is open.

Try it yourselfPaste the switch log into the free L2 Instability Log Analyzer — it groups the flaps by port, so one bad interface stands out. Then run both ends' configuration through the free Network Config Verifier to compare interface settings.

Fact-check sources: %LINK-3-UPDOWN and %LINEPROTO-5-UPDOWN meanings, interface state behaviour, the show interfaces, counters, status, and transceiver commands, and err-disable recovery — Cisco IOS Interface and Hardware Component Configuration Guide and Cisco IOS system message documentation.

Related guides

Key takeaways

Keep reading