본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)280k · #366

network-interface-health

하는 일

이 도구는 케이블, 장비 포트, 잘못된 설정 같은 네트워크 연결 문제를 찾도록 돕습니다. 오류와 네트워크 인터페이스 성능을 분석해 속도 저하나 장애의 원인을 찾습니다.

사용하는 경우

  • ✓인터넷이 느리거나 자꾸 끊길 때.
  • ✓네트워크 장비(라우터, 스위치)에 오류가 많이 표시될 때.
  • ✓케이블이나 부품을 교체하기 전에, 그것이 문제인지 확실히 하고 싶을 때.

스킬 링크

https://github.com/affaan-m/ECC/blob/main/skills/network-interface-health/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/affaan-m/ECC/blob/main/skills/network-interface-health/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 연결에 문제가 있습니다. 네트워크 인터페이스 상태를 확인해 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 네트워크 트래픽 정보를 수집하고 시간에 따른 오류 횟수를 비교합니다. 또한 속도와 듀플렉스 같은 설정을 확인해서 불일치를 찾아냅니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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

…

자주 묻는 질문

'CRC errors'는 무엇인가요?

받은 데이터의 무결성 검사에서 나는 오류입니다. 보통 불량 케이블, 더러운 광섬유 연결, 또는 장비 문제로 생깁니다.

'flapping'은 무엇을 뜻하나요?

네트워크 연결이 반복적으로 끊겼다가 금방 다시 연결되는 현상으로, 불안정한 문제를 나타냅니다.

오류 카운터를 지워도 되나요?

현재 값을 기준선으로 기록해 둔 뒤에만 지우세요. 기록 없이 지우면 중요한 진단 정보를 잃을 수 있습니다.

상세 정보

작성자의 원본 설명

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.

repo: affaan-m/ECC

인기도

GitHub 스타
280k
순위
#366
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬