Communitygithub.com

네트워크 설정 검증

라우터 및 스위치 설정의 배포 전 점검을 수행합니다. 위험 명령어, 중복 주소, 서브넷 중첩, 부실 참조, 관리 평면 위험, IOS 스타일 보안 위생을 검사하여 배포 전에 설정을 검토할 때 사용합니다.

네트워크 설정 검증란 무엇인가요?

이 스킬은 Cisco IOS/IOS-XE 스타일의 네트워크 설정을 배포 전에 검증하는 데 사용됩니다. 정규식 기반의 계층적 점검을 통해 위험 명령어(예: reload, erase), 중복 IP 주소 및 서브넷 중첩, 정의되지 않은 ACL/route-map/prefix-list 참조, 관리 평면 취약점(예: Telnet 허용, access-class 누락), NTP/타임스탬프/로깅/배너와 같은 운영 위생 문제를 사전에 발견합니다. Python 코드 스니펫을 포함하여 자동화된 사전 점검(pre-flight)을 구현할 수 있으며, Netmiko, NAPALM, Ansible 등 네트워크 자동화 도구와 결합하여 차단 게이트(blocking gate)로 활용할 수 있습니다. 정규식 검증을 완전한 파서로 오해하지 않도록 주의해야 하며, 최종 승인은 네트워크 엔지니어가 의도와 플랫폼 구문, 롤백 절차를 검토해야 합니다.

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

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

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

문서

네트워크 설정 검증은(는) 무엇을 하나요?

이 스킬은 변경 시간 전 또는 자동화 실행이 프로덕션 장비에 닿기 전에 네트워크 설정을 검토할 때 사용합니다.

사용 시기

  • Cisco IOS 또는 IOS-XE 스타일 스니펫을 배포 전에 검토할 때
  • 스크립트나 템플릿에서 생성된 설정을 감사할 때
  • 위험 명령어, 중복 IP 주소, 서브넷 중첩을 찾을 때
  • ACL, route-map, prefix-list, 라인 정책이 참조되었지만 정의되지 않았는지 확인할 때
  • 네트워크 자동화를 위한 경량 사전 점검(pre-flight) 스크립트를 구축할 때

작동 방식

설정 검증을 완전한 파서가 아닌 계층적 증거로 취급하십시오. 정규식 검사는 사전 점검 경고에 유용하지만, 최종 승인은 여전히 네트워크 엔지니어가 의도, 플랫폼 구문, 롤백 단계를 검토해야 합니다.

다음 순서로 검증하십시오:

  1. 파괴적 명령어
  2. 자격 증명 및 관리 평면 노출
  3. 중복 주소 및 중첩 서브넷
  4. ACL, route-map, prefix-list, 인터페이스에 대한 부실 참조
  5. NTP, 타임스탬프, 원격 로깅, 배너와 같은 운영 위생

위험 명령어 탐지

import re

DANGEROUS_PATTERNS: list[tuple[re.Pattern[str], str]] = [
    (re.compile(r"\breload\b", re.I), "reload는 다운타임을 유발합니다"),
    (re.compile(r"\berase\s+(startup|nvram|flash)", re.I), "영구 저장소를 삭제합니다"),
    (re.compile(r"\bformat\b", re.I), "장치 파일 시스템을 포맷합니다"),
    (re.compile(r"\bno\s+router\s+(bgp|ospf|eigrp)\b", re.I), "라우팅 프로세스를 제거합니다"),
    (re.compile(r"\bno\s+interface\s+\S+", re.I), "인터페이스 설정을 제거합니다"),
    (re.compile(r"\baaa\s+new-model\b", re.I), "인증 동작을 변경합니다"),
    (re.compile(r"\bcrypto\s+key\s+(zeroize|generate)\b", re.I), "장치 SSH 키를 변경합니다"),
]

def find_dangerous_commands(lines: list[str]) -> list[dict[str, str | int]]:
    findings = []
    for line_number, line in enumerate(lines, start=1):
        stripped = line.strip()
        for pattern, reason in DANGEROUS_PATTERNS:
            if pattern.search(stripped):
                findings.append({
                    "line": line_number,
                    "command": stripped,
                    "reason": reason,
                })
    return findings

중복 IP 및 서브넷 중첩

import ipaddress
import re
from collections import Counter

IP_ADDRESS_RE = re.compile(
    r"^\s*ip address\s+"
    r"(?P<ip>\d{1,3}(?:\.\d{1,3}){3})\s+"
    r"(?P<mask>\d{1,3}(?:\.\d{1,3}){3})\b",
    re.I | re.M,
)

def extract_interfaces(config: str) -> list[dict[str, str]]:
    results = []
    current = None
    for line in config.splitlines():
        if line.startswith("interface "):
            current = line.split(maxsplit=1)[1]
            continue
        match = IP_ADDRESS_RE.match(line)
        if current and match:
            ip = match.group("ip")
            mask = match.group("mask")
            network = ipaddress.ip_interface(f"{ip}/{mask}").network
            results.append({"interface": current, "ip": ip, "network": str(network)})
    return results

def find_duplicate_ips(config: str) -> list[str]:
    ips = [entry["ip"] for entry in extract_interfaces(config)]
    counts = Counter(ips)
    return sorted(ip for ip, count in counts.items() if count > 1)

def find_subnet_overlaps(config: str) -> list[tuple[str, str]]:
    networks = [ipaddress.ip_network(entry["network"]) for entry in extract_interfaces(config)]
    overlaps = []
    for index, left in enumerate(networks):
        for right in networks[index + 1:]:
            if left.overlaps(right):
                overlaps.append((str(left), str(right)))
    return overlaps

관리 평면 검사

VTY 블록을 섹션별로 파싱하여 access-class 검사가 관련 없는 라인으로 넘어가지 않도록 합니다.

import re

def iter_blocks(config: str, starts_with: str) -> list[str]:
    blocks = []
    current: list[str] = []
    for line in config.splitlines():
        if line.startswith(starts_with):
            if current:
                blocks.append("\n".join(current))
            current = [line]
            continue
        if current:
            if line and not line.startswith(" "):
                blocks.append("\n".join(current))
                current = []
            else:
                current.append(line)
    if current:
        blocks.append("\n".join(current))
    return blocks

def check_vty_blocks(config: str) -> list[str]:
    issues = []
    for block in iter_blocks(config, "line vty"):
        if re.search(r"transport\s+input\s+.*telnet", block, re.I):
            issues.append("VTY에서 Telnet을 허용합니다. SSH만 필요합니다.")
        if not re.search(r"\baccess-class\s+\S+\s+in\b", block, re.I):
            issues.append("VTY 블록에 인바운드 access-class 소스 제한이 없습니다.")
        if not re.search(r"\bexec-timeout\s+\d+\s+\d+\b", block, re.I):
            issues.append("VTY 블록에 명시적인 exec-timeout이 없습니다.")
    return issues

보안 위생 검사

SECURITY_PATTERNS = [
    (re.compile(r"\bsnmp-server community\s+(public|private)\b", re.I),
     "기본 SNMP 커뮤니티가 구성됨"),
    (re.compile(r"\bsnmp-server community\s+\S+", re.I),
     "SNMPv2 커뮤니티 문자열이 구성됨. SNMPv3 authPriv 권장"),
    (re.compile(r"\bip ssh version 1\b", re.I),
     "SSH 버전 1 활성화됨"),
    (re.compile(r"\benable password\b", re.I),
     "enable password가 존재함. enable secret 사용"),
    (re.compile(r"\busername\s+\S+\s+password\b", re.I),
     "로컬 사용자가 secret 대신 password 사용"),
]

BEST_PRACTICE_PATTERNS = [
    (re.compile(r"\bntp server\b", re.I), "NTP 서버"),
    (re.compile(r"\bservice timestamps\b", re.I), "로그 타임스탬프"),
    (re.compile(r"\blogging\s+\S+", re.I), "로깅 대상 또는 버퍼"),
    (re.compile(r"\bsnmp-server group\s+\S+\s+v3\s+priv\b", re.I), "SNMPv3 authPriv 그룹"),
    (re.compile(r"\bbanner\s+(login|motd)\b", re.I), "로그인 배너"),
]

def check_security(config: str) -> list[str]:
    return [message for pattern, message in SECURITY_PATTERNS if pattern.search(config)]

def check_missing_hygiene(config: str) -> list[str]:
    return [
        f"누락됨: {description}"
        for pattern, description in BEST_PRACTICE_PATTERNS
        if not pattern.search(config)
    ]

예제

변경 시간 사전 점검

  1. 붙여넣을 정확한 스니펫에 대해 위험 명령어 검사를 실행합니다.
  2. 전체 후보 설정에 대해 중복 IP 및 서브넷 중첩 검사를 실행합니다.
  3. 참조된 모든 ACL, route-map, prefix-list가 존재하는지 확인합니다.
  4. 관리 평면 변경 전에 롤백 명령어 및 대역 외 접근을 확인합니다.

자동화 사전 점검

Netmiko, NAPALM, Ansible 또는 공급업체 API 자동화가 생성된 설정을 푸시하기 전에 검증을 차단 게이트로 사용하십시오. 위험 명령어와 자격 증명에 대해서는 실패(차단) 처리하십시오. 변경 범위 밖의 모범 사례 격차에 대해서는 경고 처리하십시오.

안티 패턴

  • 정규식 검증을 장치 파서로 취급하는 것
  • dry-run diff 없이 생성된 설정을 적용하는 것
  • 모니터링 요구사항으로 SNMPv2 커뮤니티 문자열을 권장하는 것
  • 의도치 않게 관련 없는 섹션으로 넘어갈 수 있는 정규식으로 VTY 블록을 검사하는 것
  • 카운터/로그를 읽는 대신 ACL을 비활성화하여 방화벽 동작을 테스트하는 것

참고 항목

  • 에이전트: network-config-reviewer
  • 에이전트: network-troubleshooter
  • 스킬: network-interface-health

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.

관련 스킬