Junos Interface Flapping: Layer 1 Troubleshooting Checklist - 夜莺博客

Junos Interface Flapping: Layer 1 Troubleshooting Checklist

An interface that flaps — repeatedly toggling between up and down — is almost always a Layer 1 problem wearing a disguise. Juniper's interface troubleshooting methodology is blunt about this: if the logs show clean RPD_INTERFACE_DOWN and RPD_INTERFACE_UP transitions with no protocol errors in between, stop looking at configuration and start looking at cables, optics and signal. This article turns Juniper's official troubleshooting topics into a checklist you can run from the console.

Recognise the Symptom Pattern

Feb 15 10:00:02 router rpd[1234]: RPD_INTERFACE_DOWN: Interface ge-0/0/0.0 changed state to Down
Feb 15 10:00:03 router rpd[1234]: RPD_INTERFACE_UP: Interface ge-0/0/0.0 changed state to Up

Rapid up/down cycles with clean logs point to degraded optics, loose cables or marginal signal — not MTU mismatch, duplex or IP conflicts, which produce error counters and negotiation failures instead of link transitions. The JNCIA troubleshooting material sums it up as: "if the link dances but the logs are clean, suspect the SFP."

Check the Physical Link and Media State

user@router> show interfaces ge-0/0/1 media
user@router> show interfaces ge-0/0/1 terse

show interfaces media is the first diagnostic: it reports Physical link is Up/Down, the Active alarms and Active defects fields, SFP type, speed and auto-negotiation state. A physical link down with a Link defect means the interface is not receiving a valid signal — go check the cable and the far end. The terse view confirms whether the interface is administratively disabled.

Inspect Statistics for the Real Story

user@router> show interfaces ge-0/0/1 extensive

The extensive output shows input/output errors, the Last flapped timestamp, link-level statistics and any alarm state. Look for input errors, L2 channel errors and CRC errors — they indicate signal integrity problems that will eventually produce flaps even if the link currently looks up. Also check the system log around each flap to correlate with other events:

user@router> show log messages | match ge-0/0/1

Loopback and Cable Diagnostics

Isolate the fault to one side with a loopback test. For fiber interfaces, physically loop TX to RX and check whether the link comes up:

user@router> show interfaces ge-0/0/1 media
! with TX-RX loopback physically installed

If the interface stays down with the loopback in place, the fault is on the local port or optics; if it comes up, the problem is the cable or the far end. For copper interfaces, Junos provides TDR-based cable diagnostics (supported on copper only, not fiber) that report open and short conditions with distance estimates — useful for finding a damaged patch cable. Always remove the loopback configuration after testing. Verify light levels are within receiver/transmitter specification when fiber is involved — a marginal SFP will flap long before it fails outright.

Resolution Order

  • Reseat the optics and cable on both ends; swap in a known-good cable.
  • Match fiber types — single-mode cable to a single-mode interface, multimode to multimode.
  • Replace the SFP with a known-good unit and re-test before suspecting the switch port.
  • If the flap follows the SFP, the module is faulty; if it stays on the port, escalate with the extensive output collected.

For Junos gear beyond physical links, our SRX troubleshooting command cheat sheet and the Cisco vs Juniper command mapping cover the wider toolkit.

原文链接:https://www.juniper.net/documentation/us/en/software/junos/interfaces-fundamentals/topics/topic-map/troubleshooting-interfaces.html