Communitygithub.com

네트워크 인터페이스 상태 진단

라우터, 스위치, Linux 호스트에서 인터페이스 오류, 드롭, CRC, 듀플렉스 불일치, 플래핑, 속도 협상 문제 및 카운터 추세를 진단합니다. 인터페이스에 오류, 드롭, CRC, 플래핑 또는 듀플렉스/속도 불일치가 나타날 때 사용하세요.

네트워크 인터페이스 상태 진단란 무엇인가요?

이 스킬은 물리적 링크, 스위치 포트, 케이블, 트랜시버, 듀플렉스 설정 또는 인터페이스 혼잡으로 인한 네트워크 증상을 진단하는 데 사용됩니다. CRC 오류, 입력/출력 드롭, runt, giant, 리셋, 충돌 등 주요 인터페이스 카운터의 의미를 설명하고, 추세 기반 진단 방법을 제시합니다. 양쪽 링크 엔드 비교, 케이블 교체 전후 증거 확보, 속도/듀플렉스 자동 협상 권장 등 실무 모범 사례를 포함합니다. Cisco IOS 기반 show 명령어와 Linux의 ip/ethtool 명령어를 지원하며, 안전한 파싱을 위한 Python 코드 예제도 제공합니다. 카운터를 지우기 전 베이스라인 저장, 한쪽 링크만 확인, 이력 CRC를 모두 활성 문제로 간주하는 등의 안티패턴을 경고합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/network-interface-health

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

네트워크 인터페이스 상태 진단은(는) 무엇을 하나요?

네트워크 증상이 물리적 링크, 스위치 포트, 케이블, 트랜시버, 듀플렉스 설정 또는 혼잡한 인터페이스로 인해 발생할 수 있을 때 이 스킬을 사용하세요.

사용 시기

  • 호스트 또는 VLAN에 패킷 손실, 지연 스파이크 또는 간헐적 연결 문제가 있는 경우
  • 스위치 또는 라우터 인터페이스에 CRC, runt, giant, 드롭, 리셋 또는 플랩이 표시되는 경우
  • 하드웨어를 교체하기 전에 링크 양쪽 끝을 비교해야 하는 경우
  • 변경 작업 전후로 인터페이스 카운터 증거가 필요한 경우
  • 모니터링에서 ifInErrors, ifOutErrors 또는 ifOutDiscards 증가가 보고되는 경우

작동 방식

인터페이스 카운터는 증거이지만, 절대값보다 추세가 더 중요합니다. 베이스라인을 캡처하고, 측정 간격을 기다린 후 다시 캡처하여 증가분을 비교합니다.

show interfaces <interface>
show interfaces <interface> status
show logging | include <interface>|changed state|line protocol

Linux 호스트:

ip -s link show <interface>
ethtool <interface>
ethtool -S <interface>

카운터 참조

카운터의미일반적인 원인
CRC수신 프레임 체크섬 실패케이블 불량, 더티 파이버, 불량 광트랜시버, 듀플렉스 불일치
input errors수신 측 오류 집계결론 내리기 전에 하위 카운터 확인
runts최소 이더넷 크기 미만의 프레임듀플렉스 불일치, 충돌 도메인, NIC 결함
giants예상 MTU보다 큰 프레임MTU 불일치 또는 점보 프레임 경계
input drops장치가 인바운드 패킷을 수락하지 못함버스트, 과도한 구독, CPU 경로, 큐 압력
output drops송신 큐에서 패킷 폐기혼잡, QoS 정책, 작은 업링크
resets인터페이스 하드웨어 리셋플래핑, 킵얼라이브, 드라이버, 광트랜시버, 전원
collisions이더넷 충돌 카운터반이중 또는 협상 불일치

진단 흐름

CRC 또는 입력 오류

  1. 카운터가 증가 중인지 확인하세요. 단순한 이력이 아니어야 합니다.
  2. 링크 양쪽 끝을 확인하세요. 수신 측 오류는 일반적으로 해당 측에 도착하는 신호를 가리키며, 오류를 보고하는 포트 자체가 원인은 아닙니다.
  3. 패치 케이블을 교체하거나 파이버와 광트랜시버를 청소/교체하세요.
  4. 양쪽의 속도/듀플렉스 설정이 일치하는지 확인하세요.
  5. 동일한 타임스탬프 주변의 플랩 이벤트에 대한 로그를 확인하세요.

드롭

  1. 입력 드롭과 출력 드롭을 구분하세요.
  2. 인터페이스 속도를 용량과 비교하세요.
  3. QoS 정책, 큐 카운터 및 링크가 과도하게 구독된 업링크인지 확인하세요.
  4. 큐 튜닝은 보조 수단으로 간주하세요. 먼저 링크가 혼잡한지 입증하세요.

듀플렉스 및 속도

양쪽이 지원하는 경우 최신 이더넷 링크에서는 자동 협상을 선호합니다. 한쪽을 고정해야 한다면 양쪽을 명시적으로 설정하고 그 이유를 문서화하세요. 한쪽에 고정 속도/듀플렉스를 설정하고 다른 쪽에 자동 협상을 절대 혼용하지 마세요.

show interfaces <interface> | include duplex|speed

안전한 파서 예제

각 인터페이스 블록을 한 헤더에서 다음 헤더까지 슬라이스하세요. 임의의 문자 창을 사용하지 마십시오. 큰 인터페이스 블록은 카운터가 누락되거나 잘못된 포트에 할당될 수 있습니다.

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

예제

단일 스위치 포트의 CRC

  1. 로컬 포트의 카운터를 캡처하세요.
  2. 연결된 원격 포트의 카운터를 캡처하세요.
  3. 라우팅 또는 방화벽 규칙을 변경하기 전에 케이블 또는 광트랜시버를 교체하세요.
  4. 베이스라인을 기록한 후에만 카운터를 지우세요.
  5. 고정된 간격 후에 다시 확인하세요.

인터넷은 느리지만 LAN은 정상

  1. WAN 인터페이스 드롭/오류를 확인하세요.
  2. LAN 업링크 사용률 및 출력 드롭을 확인하세요.
  3. WAN 링크가 깨끗하지만 처리량이 여전히 낮은 경우 게이트웨이 CPU를 확인하세요.
  4. 업스트림 서비스를 비난하기 전에 유선 및 무선 테스트를 비교하세요.

안티패턴

  • 베이스라인을 저장하기 전에 카운터를 지우는 행위
  • 링크의 한쪽만 확인하는 행위
  • 시간 창 없이 모든 이력 CRC를 활성 문제로 가정하는 행위
  • 한쪽에 자동 협상을 설정하고 다른 쪽에 고정 속도/듀플렉스를 혼용하는 행위
  • 혼잡을 확인하기 전에 출력 드롭을 케이블 문제로 처리하는 행위

참고

  • 에이전트: network-troubleshooter
  • 스킬: network-config-validation
  • 스킬: homelab-network-setup

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

관련 스킬