Identify and Resolve Link Failures
Learn how to find and resolve link failures on your MX204, MX301, MX304, MX10004, or MX10008 router.
To identify and resolve link failures on a Juniper MX204, MX301, MX304, MX10004, or MX10008
router, check physical cabling, interface status (show interfaces
terse), and detailed statistics (show interfaces extensive)
for errors. Key troubleshooting commands include checking for packet drops (show
pf statistics traffic) and verifying Link Aggregation Control Protocol
(LACP) status (show lacp interfaces).
Resolve Physical Link Degragation
If the link does not experience a hard signal loss, configure mechanisms to isolate a faulty link before it degrades traffic. Use this approach when isolating the link is preferable to operating in a degraded state and when sufficient capacity or alternate paths are available for rerouted traffic.
Configure optical thresholds to isolate the link when the signal crosses the low warning level. To view optical thresholds, use the following command:
show interfaces diagnostics optics et-0/0/8
Physical interface: et-0/0/8
Module temperature : 30 degrees C / 87 degrees F
Module voltage : 3.2980 V
Module max power : 3.50 W
Module temperature high alarm : Off
Module temperature low alarm : Off
Module temperature high warning : Off
Module temperature low warning : Off
Module voltage high alarm : Off
Module voltage low alarm : Off
Module voltage high warning : Off
Module voltage low warning : Off
Module temperature high alarm threshold : 74 degrees C / 165 degrees F
Module temperature low alarm threshold : -4 degrees C / 25 degrees F
Module temperature high warning threshold : 70 degrees C / 158 degrees F
Module temperature low warning threshold : 0 degrees C / 32 degrees F
Module voltage high alarm threshold : 3.6300 V
Module voltage low alarm threshold : 2.9700 V
Module voltage high warning threshold : 3.4640 V
Module voltage low warning threshold : 3.1340 V
Laser bias current high alarm threshold : 120.000 mA
Laser bias current low alarm threshold : 20.000 mA
Laser bias current high warning threshold : 110.000 mA
Laser bias current low warning threshold : 30.000 mA
Laser output power high alarm threshold : 5.6234 mW / 7.50 dBm
Laser output power low alarm threshold : 0.1862 mW / -7.30 dBm
Laser output power high warning threshold : 2.8184 mW / 4.50 dBm
Laser output power low warning threshold : 0.2344 mW / -6.30 dBm
Laser rx power high alarm threshold : 3.5481 mW / 5.50 dBm
Laser rx power low alarm threshold : 0.0436 mW / -13.61 dBm
Laser rx power high warning threshold : 2.8183 mW / 4.50 dBm
Laser rx power low warning threshold : 0.0871 mW / -10.60 dBm
Laser temperature high alarm threshold : 74 degrees C / 165 degrees F
Laser temperature low alarm threshold : -4 degrees C / 25 degrees F
Laser temperature high warning threshold : 70 degrees C / 158 degrees F
Laser temperature low warning threshold : 0 degrees C / 32 degrees F
Lane 0
Laser bias current : 58.993 mA
Laser output power : 1.584 mW / 2.00 dBm
Laser receiver power : 0.846 mW / -0.72 dBm
[...]
To trigger a link-down when the optical level crossed the low threshold, apply this configuration:
set interfaces et-0/0/8 optics-options warning low-light-warning link-down
Use link‑degrade monitoring to track link quality without shutting down the interface when it crosses a warning threshold. Use this feature when you want to monitor degradation in real time and take action only after it reaches an unacceptable level.
link-degrade-monitor tracks physical link quality on high‑speed
Ethernet interfaces by monitoring error rates such as FEC, CRC, and symbol errors.
When error rates exceed configured thresholds, the system can generate alarms,
syslog messages, or shut down the interface to prevent traffic loss.
Packet loss can occur at relatively low bit error rates (BER), especially for real‑time applications such as video. Traditional protocols (BFD, OAM, LACP) and Ethernet Local Fault Signaling (LFS) might not detect these conditions early enough. Use link‑degrade monitoring to detect and address these issues sooner.
The system monitors physical‑layer errors by using a sliding window algorithm that tracks:
- PCS block errors and BER
- MAC FCS errors
- FEC errors
- BIP‑8 or B1, B2, B3 counters
When BER crosses configured thresholds, the system generates notifications and can shut down the local and remote link by using LFS.
Configuration options include:
link-degrade-monitor-enable—Enable monitoringno-link-degrade-monitor-enable—Disable monitoringactions media-based—Apply media-based actions (bring down the link locally and remotely)recovery { auto | manual }—Configure automatic or manual recoveryrecovery timer <seconds>—Specify the recovery intervalthresholds { set | clear | warning-set | warning-clear } <value>—Define BER thresholdsthresholds interval <seconds>—Specify the monitoring interval
The following example shows a basic configuration without automatic recovery:
groups MONITOR-BER {
interfaces {
xe-* {
link-degrade-monitor {
actions {
media-based;
}
recovery {
manual;
}
thresholds {
set 1e-3;
warning-set 1e-6;
warning-clear 1e-9;
interval 100;
}
}
}
et-* {
link-degrade-monitor {
actions {
media-based;
}
recovery {
manual;
}
thresholds {
set 1e-3;
warning-set 1e-6;
warning-clear 1e-9;
interval 100;
}
}
}
}
}
The configuration implements the following behavior:
- Normal: BER < 1e‑9—No action
- Warning: BER > 1e‑6—Generate syslog messages and alarms only
- Critical: BER > 1e‑3—Shut down the interface after 100 consecutive link‑degrade events (adjust this value as needed)
- Clear: Require manual clearing of the link‑degrade condition
To restore the interface, manually issue the appropriate request
command.
request interface link-degrade-recover et-x/x/x
The MX304 router does not support link-degrade-monitor due to the PHY hardware limitation.
Resolve Unidirectional Logical Degradation
A failure can be asymmetric, occurring in only one direction. Use BER monitoring to detect Layer 1 degradation when supported. If the hardware or peer device does not support this feature, use sub‑second detection protocols to respond quickly.
Do not rely on IGP adjacency timeouts because they use longer detection intervals. LACP provides a minimum detection time of 3 seconds in fast mode, which might not be sufficient.
Use the following point‑to‑point protocols for sub‑second detection of unidirectional link failures:
- BFD and micro‑BFD (for LAG)
- OAM LFM
These protocols operate in a distributed manner. Line card CPUs handle packet transmission and reception, while the Routing Engine processes only state changes.
BFD is protocol‑dependent and supports single‑hop and multi‑hop operation. For link degradation detection, configure single‑hop BFD and associate it with the IGP (IS‑IS or OSPF). The IGP maintains standard keepalive timers, while BFD uses sub‑second intervals for faster detection.
The following example shows BFD configuration for IS‑IS (family inet) with 100‑ms intervals:
set protocols isis interface et-x/x/x.0 family inet bfd-liveness-detection minimum-interval 100 set protocols isis interface et-x/x/x.0 family inet bfd-liveness-detection multiplier 3 set protocols isis interface et-x/x/x.0 family inet bfd-liveness-detection no-adaptation set protocols isis interface et-x/x/x.0 strict-bfd
BFD uses UDP port 3784.
For LAG interfaces, micro-BFD is used. It automatically creates a single-hop BFD session for each member link and operates in parallel with LACP PDUs:
set interfaces aeX aggregated-ether-options bfd-liveness-detection minimum-interval 100 set interfaces aeX aggregated-ether-options bfd-liveness-detection multiplier 3
micro-BFD uses UDP port 6784.
You can check the state of BFD and micro-BFD sessions with the following command:
show bfd session [extensive]
BFD is a routed protocol that uses UDP transport and relies on IPv4 or IPv6. It is typically tied to a routing protocol. If you need a protocol-agnostic solution to detect non-clean failures or degradation, you can use OAM LFM. This standardized protocol operates directly at the Ethernet layer (agnotics to any families configured) and can be enabled on all Ethernet interfaces, including LAG.
To configure the routing protocol parameters, apply the settings from the following template. Detailed parameter explanations follow the configuration snippet:
[edit protocols oam]
ethernet {
link-fault-management {
action-profile OAM_DOWN {
event {
link-adjacency-loss;
}
action {
syslog;
link-down;
}
}
interface ae0 {
apply-action-profile OAM_DOWN;
pdu-interval 100;
link-discovery active;
pdu-threshold 3;
}
interface et-0/0/23 {
apply-action-profile OAM_DOWN;
pdu-interval 100;
link-discovery active;
pdu-threshold 3;
}
}
}
OAM LFM configuration includes two components. The first component defines an action
profile (for example, OAM_DOWN) that specifies tracked events, such
as loss of OAM adjacency, and actions, such as generating a syslog message or
setting the interface operational state to down.
The second component applies the configuration to interfaces. Configure the keepalive interval, threshold (multiplier), and reference the action profile. When you apply this configuration to a LAG interface, OAM LFM automatically creates a session for each member link.
To monitor OAM LFM session state, use the following command:
show oam ethernet link-fault-management [interface-name] [detail]