Communitygithub.com

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

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

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

이 스킬은 물리적 링크, 스위치 포트, 케이블, 트랜시버, 듀플렉스 설정 또는 인터페이스 혼잡으로 인한 네트워크 증상을 진단하는 데 사용됩니다. 지원 플랫폼은 Cisco IOS/IOS-XE 스위치/라우터, Arista EOS, Juniper JunOS, Linux 호스트(ip, ethtool 사용)를 포함합니다. SKILL.md는 CRC, 입력 오류, 런트, 자이언트, 드롭, 리셋, 충돌과 같은 주요 카운터의 의미와 일반적인 원인을 설명하는 카운터 참조 테이블을 제공합니다. 진단 흐름은 CRC/입력 오류, 드롭 및 듀플렉스/속도 문제를 해결하는 단계별 절차를 안내합니다. 또한 보다 안전한 파싱을 위해 정규 표현식 기반의 Python 예제와 시간 경과에 따른 카운터 증분 비교의 중요성을 강조합니다. 일반적인 안티 패턴(예: 기준선 저장 전 카운터 초기화, 링크의 한쪽만 확인, 시간 창 없이 모든 과거 CRC를 활성 문제로 가정)도 다룹니다. 이 스킬은 물리 계층 문제와 소프트웨어/구성 문제를 구분하는 데 도움이 되며, 'network-troubleshooter' 에이전트 및 'network-config-validation' 및 'homelab-network-setup' 스킬과 함께 사용하도록 설계되었습니다.

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

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

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

문서

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

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

사용 시기

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

작동 방식

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

show interfaces <인터페이스>
show interfaces <인터페이스> status
show logging | include <인터페이스>|changed state|line protocol

Linux 호스트:

ip -s link show <인터페이스>
ethtool <인터페이스>
ethtool -S <인터페이스>

카운터 참조

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

진단 흐름

CRC 또는 입력 오류

  1. 카운터가 증가 중인지 확인합니다(단순히 과거 기록이 아님).
  2. 링크의 양쪽 끝을 모두 확인합니다. 수신 측 오류는 일반적으로 오류를 보고하는 포트 자체가 아니라 해당 측에 도착하는 신호의 문제를 가리킵니다.
  3. 패치 케이블을 교체하거나 광섬유와 광트랜시버를 청소/교체합니다.
  4. 양쪽의 속도/듀플렉스 설정이 일치하는지 확인합니다.
  5. 동일한 타임스탬프 주변의 플랩 이벤트에 대한 로그를 확인합니다.

드롭

  1. 입력 드롭과 출력 드롭을 분리합니다.
  2. 인터페이스 속도를 용량과 비교합니다.
  3. QoS 정책, 큐 카운터 및 링크가 과도 구독된 업링크인지 확인합니다.
  4. 큐 튜닝을 부차적인 것으로 간주합니다. 먼저 링크가 혼잡한지 입증합니다.

듀플렉스 및 속도

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

show interfaces <인터페이스> | 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/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

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.

관련 스킬