Catalog
affaan-m/network-interface-health

affaan-m

network-interface-health

Diagnose interface errors, drops, CRCs, duplex mismatches, flapping, speed negotiation issues, and counter trends on routers, switches, and Linux hosts. Use when an interface shows errors, drops, CRCs, flapping, or a duplex or speed mismatch.

NewUpdated Sep 9, 2026

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

  1. Confirm counters are incrementing, not just historical.
  2. 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.
  3. Replace patch cable or clean/replace fiber and optics.
  4. Confirm speed/duplex settings match on both sides.
  5. Check logs for flap events around the same timestamp.

Drops

  1. Separate input drops from output drops.
  2. Compare interface rate against capacity.
  3. Check QoS policy, queue counters, and whether the link is an oversubscribed uplink.
  4. 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

  1. Capture counters on the local port.
  2. Capture counters on the connected remote port.
  3. Replace the cable or optic before changing routing or firewall rules.
  4. Clear counters only after recording the baseline.
  5. Recheck after a fixed interval.

Internet Slow But LAN Is Fine

  1. Check WAN interface drops/errors.
  2. Check LAN uplink utilization and output drops.
  3. Check gateway CPU if the WAN link is clean but throughput is still low.
  4. 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
Files1
1 files · 1.0 KB

Select a file to preview

Overall Score

88/100

Grade

A

Excellent

Grades are signals, not a certification. Always review a skill yourself before use.

Safety

95

Quality

87

Clarity

86

Completeness

82

Summary

This skill teaches network administrators and agents how to diagnose physical link and interface health issues on routers, switches, and Linux hosts. It provides a structured approach to capturing interface counters, interpreting errors and drops, identifying duplex/speed mismatches, and troubleshooting flapping links through before/after measurement baselines.

Detected Capabilities

Shell command execution (show interfaces, ip commands, ethtool)Text parsing and regex pattern matchingInterface counter analysis and trend comparisonLog file reading (show logging)Read-only diagnostics (no configuration changes or data writes)

Trigger Keywords

Phrases that agents use to match this skill to user intent.

interface crc errorsnetwork link flappingduplex mismatch troubleshootingpacket drop diagnosisswitch port health check

Use Cases

  • Diagnose intermittent packet loss and latency spikes on network links
  • Investigate rising CRC and input error counters on switch/router interfaces
  • Determine if packet drops are caused by congestion or hardware failure
  • Compare interface health on both ends of a link before replacing cables or optics
  • Establish baseline interface counters before a maintenance window for before/after comparison
  • Troubleshoot interface flapping and speed/duplex negotiation mismatches
  • Parse and extract interface counter trends from show commands on Cisco IOS or Linux ethtool

Quality Notes

  • Well-structured skill with clear use cases and diagnostic flow
  • Includes practical Python parser example for safe counter extraction without arbitrary character windows
  • Counter reference table is comprehensive and explains root causes
  • Anti-patterns section explicitly calls out common mistakes (mixing auto-negotiation, clearing counters prematurely)
  • Examples are concrete and domain-specific (CRCs on switch ports, internet vs LAN troubleshooting)
  • Skill is read-only — no file writes, no privilege escalation, no destructive operations
  • Safe parsing guidance prevents counter misalignment and missed data
  • Clearly documents what evidence to collect (baseline → wait → compare increments)
  • Scope is tightly focused on physical layer diagnostics, avoiding higher-layer confusion
Model: claude-haiku-4-5-20251001Analyzed: Sep 9, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Version History

  1. v2.0

    Contract changed: description

    ✦ AIClarifies activation guidance: adds explicit instruction to use skill when interface shows errors, drops, CRCs, flapping, or mismatches.

    triggering2026-09-09

    LATEST
  2. v1.1

    Content updated

    ✦ AINo behavioral changes detected.

    2026-07-14

    View This Version
  3. v1.0

    2026-05-15

    View This VersionInitial version

Use affaan-m/network-interface-health in your dev environment

Command Palette

Search for a command to run...