Network Interface Health
Use this skill when a network symptom might be caused by a physical link, switch
port, cable, transceiver, duplex setting, or congested interface.
When to Use
- A host or VLAN has packet loss, latency spikes, or intermittent reachability.
- A switch or router interface shows CRCs, runts, giants, drops, resets, or flaps.
- You need to compare both ends of a link before replacing hardware.
- A change window needs before/after interface counter evidence.
- Monitoring reports rising
ifInErrors, ifOutErrors, or ifOutDiscards.
How It Works
Interface counters are evidence, but the trend matters more than the absolute
number. Capture a baseline, wait a measurement interval, capture again, then
compare increments.
show interfaces <interface>
show interfaces <interface> status
show logging | include <interface>|changed state|line protocol
On Linux hosts:
ip -s link show <interface>
ethtool <interface>
ethtool -S <interface>
Counter Reference
| Counter |
Meaning |
Common cause |
| CRC |
Received frame checksum failed |
Bad cable, dirty fiber, bad optic, duplex mismatch |
| input errors |
Aggregate receive-side errors |
Check sub-counters before concluding |
| runts |
Frames below minimum Ethernet size |
Duplex mismatch, collision domain, faulty NIC |
| giants |
Frames larger than expected MTU |
MTU mismatch or jumbo-frame boundary |
| input drops |
Device could not accept inbound packets |
Burst, oversubscription, CPU path, queue pressure |
| output drops |
Egress queue discarded packets |
Congestion, QoS policy, undersized uplink |
| resets |
Interface hardware reset |
Flapping, keepalive, driver, optic, power |
| collisions |
Ethernet collision counter |
Half duplex or negotiation mismatch |
Diagnosis Flow
CRCs Or Input Errors
- Confirm counters are incrementing, not just historical.
- Check both ends of the link. Receive-side errors usually point to the signal
arriving on that side, not necessarily the port reporting the error.
- Replace patch cable or clean/replace fiber and optics.
- Confirm speed/duplex settings match on both sides.
- Check logs for flap events around the same timestamp.
Drops
- Separate input drops from output drops.
- Compare interface rate against capacity.
- Check QoS policy, queue counters, and whether the link is an oversubscribed
uplink.
- Treat queue tuning as secondary. First prove whether the link is congested.
Duplex And Speed
Prefer auto-negotiation on modern Ethernet links when both sides support it. If
one side must be fixed, configure both sides explicitly and document why. Never
mix fixed speed/duplex on one side with auto on the other.
show interfaces <interface> | include duplex|speed
Safe Parser Example
Slice each interface block from one header to the next. Do not use an arbitrary
character window; large interface blocks can cause counters to be missed or
assigned to the wrong port.
import re
from typing import Any
HEADER_RE = re.compile(
r"^(?P<name>\S+) is (?P<status>(?:administratively )?down|up), "
r"line protocol is (?P<protocol>up|down)",
re.I | re.M,
)
ERROR_RE = re.compile(r"(?P<input>\d+) input errors, (?P<crc>\d+) CRC", re.I)
DROP_RE = re.compile(r"(?P<output>\d+) output errors", re.I)
DUPLEX_RE = re.compile(r"(?P<duplex>Full|Half|Auto)-duplex,\s+(?P<speed>[^,]+)", re.I)
def parse_show_interfaces(raw: str) -> list[dict[str, Any]]:
headers = list(HEADER_RE.finditer(raw))
interfaces = []
for index, header in enumerate(headers):
end = headers[index + 1].start() if index + 1 < len(headers) else len(raw)
block = raw[header.start():end]
errors = ERROR_RE.search(block)
drops = DROP_RE.search(block)
duplex = DUPLEX_RE.search(block)
interfaces.append({
"name": header.group("name"),
"status": header.group("status"),
"protocol": header.group("protocol"),
"duplex": duplex.group("duplex") if duplex else "unknown",
"speed": duplex.group("speed").strip() if duplex else "unknown",
"input_errors": int(errors.group("input")) if errors else 0,
"crc_errors": int(errors.group("crc")) if errors else 0,
"output_errors": int(drops.group("output")) if drops else 0,
})
return interfaces
Examples
CRCs On One Switch Port
- Capture counters on the local port.
- Capture counters on the connected remote port.
- Replace the cable or optic before changing routing or firewall rules.
- Clear counters only after recording the baseline.
- Recheck after a fixed interval.
Internet Slow But LAN Is Fine
- Check WAN interface drops/errors.
- Check LAN uplink utilization and output drops.
- Check gateway CPU if the WAN link is clean but throughput is still low.
- Compare wired and wireless tests before blaming upstream service.
Anti-Patterns
- Clearing counters before saving a baseline.
- Looking at only one side of a link.
- Assuming all historical CRCs are active problems without a time window.
- Mixing auto-negotiation on one side with fixed speed/duplex on the other.
- Treating output drops as a cable problem before checking congestion.
See Also
- Agent:
network-troubleshooter
- Skill:
network-config-validation
- Skill:
homelab-network-setup
1---
2name: network-interface-health
3description: Diagnose interface errors, drops, CRCs, duplex mismatches, flapping, speed negotiation issues, and counter trends on routers, switches, and Linux hosts.
4metadata:
5 source: https://skillmd.com/skills/rajanthar/network-interface-health
6---
7
8# Network Interface Health
9
10Use this skill when a network symptom might be caused by a physical link, switch
11port, cable, transceiver, duplex setting, or congested interface.
12
13## When to Use
14
15- A host or VLAN has packet loss, latency spikes, or intermittent reachability.
16- A switch or router interface shows CRCs, runts, giants, drops, resets, or flaps.
17- You need to compare both ends of a link before replacing hardware.
18- A change window needs before/after interface counter evidence.
19- Monitoring reports rising `ifInErrors`, `ifOutErrors`, or `ifOutDiscards`.
20
21## How It Works
22
23Interface counters are evidence, but the trend matters more than the absolute
24number. Capture a baseline, wait a measurement interval, capture again, then
25compare increments.
26
27```text
28show interfaces <interface>
29show interfaces <interface> status
30show logging | include <interface>|changed state|line protocol
31```
32
33On Linux hosts:
34
35```text
36ip -s link show <interface>
37ethtool <interface>
38ethtool -S <interface>
39```
40
41## Counter Reference
42
43| Counter | Meaning | Common cause |
44| --- | --- | --- |
45| CRC | Received frame checksum failed | Bad cable, dirty fiber, bad optic, duplex mismatch |
46| input errors | Aggregate receive-side errors | Check sub-counters before concluding |
47| runts | Frames below minimum Ethernet size | Duplex mismatch, collision domain, faulty NIC |
48| giants | Frames larger than expected MTU | MTU mismatch or jumbo-frame boundary |
49| input drops | Device could not accept inbound packets | Burst, oversubscription, CPU path, queue pressure |
50| output drops | Egress queue discarded packets | Congestion, QoS policy, undersized uplink |
51| resets | Interface hardware reset | Flapping, keepalive, driver, optic, power |
52| collisions | Ethernet collision counter | Half duplex or negotiation mismatch |
53
54## Diagnosis Flow
55
56### CRCs Or Input Errors
57
581. Confirm counters are incrementing, not just historical.
592. Check both ends of the link. Receive-side errors usually point to the signal
60 arriving on that side, not necessarily the port reporting the error.
613. Replace patch cable or clean/replace fiber and optics.
624. Confirm speed/duplex settings match on both sides.
635. Check logs for flap events around the same timestamp.
64
65### Drops
66
671. Separate input drops from output drops.
682. Compare interface rate against capacity.
693. Check QoS policy, queue counters, and whether the link is an oversubscribed
70 uplink.
714. Treat queue tuning as secondary. First prove whether the link is congested.
72
73### Duplex And Speed
74
75Prefer auto-negotiation on modern Ethernet links when both sides support it. If
76one side must be fixed, configure both sides explicitly and document why. Never
77mix fixed speed/duplex on one side with auto on the other.
78
79```text
80show interfaces <interface> | include duplex|speed
81```
82
83## Safe Parser Example
84
85Slice each interface block from one header to the next. Do not use an arbitrary
86character window; large interface blocks can cause counters to be missed or
87assigned to the wrong port.
88
89```python
90import re
91from typing import Any
92
93HEADER_RE = re.compile(
94 r"^(?P<name>\S+) is (?P<status>(?:administratively )?down|up), "
95 r"line protocol is (?P<protocol>up|down)",
96 re.I | re.M,
97)
98ERROR_RE = re.compile(r"(?P<input>\d+) input errors, (?P<crc>\d+) CRC", re.I)
99DROP_RE = re.compile(r"(?P<output>\d+) output errors", re.I)
100DUPLEX_RE = re.compile(r"(?P<duplex>Full|Half|Auto)-duplex,\s+(?P<speed>[^,]+)", re.I)
101
102def parse_show_interfaces(raw: str) -> list[dict[str, Any]]:
103 headers = list(HEADER_RE.finditer(raw))
104 interfaces = []
105 for index, header in enumerate(headers):
106 end = headers[index + 1].start() if index + 1 < len(headers) else len(raw)
107 block = raw[header.start():end]
108 errors = ERROR_RE.search(block)
109 drops = DROP_RE.search(block)
110 duplex = DUPLEX_RE.search(block)
111 interfaces.append({
112 "name": header.group("name"),
113 "status": header.group("status"),
114 "protocol": header.group("protocol"),
115 "duplex": duplex.group("duplex") if duplex else "unknown",
116 "speed": duplex.group("speed").strip() if duplex else "unknown",
117 "input_errors": int(errors.group("input")) if errors else 0,
118 "crc_errors": int(errors.group("crc")) if errors else 0,
119 "output_errors": int(drops.group("output")) if drops else 0,
120 })
121 return interfaces
122```
123
124## Examples
125
126### CRCs On One Switch Port
127
1281. Capture counters on the local port.
1292. Capture counters on the connected remote port.
1303. Replace the cable or optic before changing routing or firewall rules.
1314. Clear counters only after recording the baseline.
1325. Recheck after a fixed interval.
133
134### Internet Slow But LAN Is Fine
135
1361. Check WAN interface drops/errors.
1372. Check LAN uplink utilization and output drops.
1383. Check gateway CPU if the WAN link is clean but throughput is still low.
1394. Compare wired and wireless tests before blaming upstream service.
140
141## Anti-Patterns
142
143- Clearing counters before saving a baseline.
144- Looking at only one side of a link.
145- Assuming all historical CRCs are active problems without a time window.
146- Mixing auto-negotiation on one side with fixed speed/duplex on the other.
147- Treating output drops as a cable problem before checking congestion.
148
149## See Also
150
151- Agent: `network-troubleshooter`
152- Skill: `network-config-validation`
153- Skill: `homelab-network-setup`