Communitygithub.com

家庭實驗室網路設定

實用的家庭與實驗室網路規劃,涵蓋閘道器、交換器、存取點、IP 範圍、DHCP 保留、DNS、佈線以及常見新手錯誤。在規劃或修復家庭/實驗室網路時使用。

家庭實驗室網路設定 是什麼?

此技能提供了一套結構化方法,用於設計可隨需求成長的家庭或小型實驗室網路,避免常見的陷阱(如雙重 NAT、不穩定的 Wi-Fi、動態伺服器位址)。它首先通過分離閘道器、交換器、存取點、伺服器和用戶端等裝置角色,建立清晰的網路拓撲。該技能引導使用者為其閘道器選擇合適的作業系統或硬體(如 UniFi、OPNsense、MikroTik),並提供一個實用的 IP 計畫,建議使用非重疊的 /24 子網(例如,用於受信任用戶端的 192.168.10.0/24)以及保留的「home.arpa」網域名稱,以避免 VPN 衝突和 DNS 問題。DHCP 和 DNS 配置建議對所有服務(如 NAS、Pi-hole)使用保留,並在準備好之前使用閘道器作為 DNS。此外,它還涵蓋了佈線最佳實踐(優先使用有線回傳的 PoE)和 UPS 保護。該技能適用於 Claude Code、Cursor 以及其他支援技能檔案的 AI 代理平台,通過提供從初學者升級到 VLAN 就緒計畫的具體範例,來幫助使用者規劃一個穩定、可擴展且安全的網路,同時明確標出常見的反模式。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/homelab-network-setup

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Homelab 網路設定

使用此技能來設計一個可隨需求成長的家庭或小型實驗室網路,而無需全面重建。

使用時機

  • 規劃新的家庭網路或重新設計僅有 ISP 路由器的設定。
  • 選擇閘道器、交換器和存取點的角色。
  • 設計 IP 範圍、DHCP 範圍、靜態保留和 DNS。
  • 為未來的 VLAN、Pi-hole、NAS、實驗室伺服器或 VPN 存取做準備。
  • 排除具有雙重 NAT、不穩定 Wi-Fi 或伺服器位址變動的新網路問題。

運作方式

首先分離裝置角色:

網際網路
  |
數據機或 ONT
  |
閘道器或路由器      NAT、防火牆、DHCP、DNS、VLAN 間路由
  |
受管交換器         有線客戶端、AP 上行鏈路、可選 VLAN 中繼
  |
存取點            僅 Wi-Fi;理想情況下使用有線回傳
伺服器和 NAS       固定位址、DNS 名稱、監控
客戶端和 IoT       DHCP 池,若可使用 VLAN,則稍後隔離

選擇一個符合營運商需求的閘道器,而不僅僅是功能清單:

選項最佳適用場景備註
ISP 路由器僅基本網際網路控制有限,通常 VLAN 支援較差
UniFi 閘道器受管家庭網路良好的 UI,生態系統鎖定
OPNsense 或 pfSense靈活的實驗室強大的 VLAN、防火牆、VPN 和 DNS 控制
MikroTik進階網路使用者功能強大,但容易錯誤配置
Linux 路由器喜歡自行調試者在使用為主要閘道器之前,請記錄回滾方案

IP 計畫

當你預計使用 VPN 時,避免最常見的預設值 192.168.1.0/24。它經常與旅館、辦公室和 ISP 路由器衝突。

小型實驗室計畫範例:

192.168.10.0/24  受信任客戶端
192.168.20.0/24  IoT 和多媒體裝置
192.168.30.0/24  伺服器和 NAS
192.168.40.0/24  訪客 Wi-Fi
192.168.99.0/24  網路管理

閘道器慣例:.1
基礎設施保留:.2 到 .49
動態 DHCP 池:.50 到 .240
備用空間:.241 到 .254

使用 home.arpa 作為本地名稱。它是保留給家庭網路使用的,避免了像 home.lan 這類臨時名稱的洩漏/衝突問題。

nas.home.arpa
pihole.home.arpa
gateway.home.arpa
switch-01.home.arpa

DHCP 和 DNS

  • 對於任何你透過 SSH 連線、加入書籤、監控或作為服務曝光的裝置,使用 DHCP 保留。
  • 在有意部署本地解析器之前,將閘道器作為 DNS 分配。
  • 如果使用 Pi-hole 或其他 DNS 過濾器,請先為其設定保留,然後將 DHCP DNS 選項指向該位址。
  • 每個子網保留一個小的靜態/保留範圍,以便更換裝置時不會與動態租約衝突。

佈線和 Wi-Fi

  • 在可以佈建乙太網路時,優先使用有線 AP 回傳而非網狀網路。
  • 如果預算允許,為 AP 和攝影機使用 PoE 交換器。
  • 在每條電纜的兩端貼上標籤,並保持簡單的連接埠對應表。
  • 如果停電常見,請將閘道器、交換器、DNS 伺服器和 NAS 連接到 UPS 電源。

範例

初學者升級

目標:保留 ISP 路由器,但穩定小型實驗室。

  1. 為 NAS、Pi 和任何 SSH 主機設定 DHCP 保留。
  2. 將本地名稱轉移到 home.arpa。
  3. 在次要路由器或 AP 上停用重複的 DHCP 伺服器。
  4. 將主要 AP 改為有線連接,而非依賴無線回傳。

VLAN 就緒計畫

目標:為未來的分段做好準備,但暫不立即啟用。

  1. 為受信任、IoT、伺服器、訪客和管理選擇非重疊的 /24 範圍。
  2. 在每個子網上為閘道器保留 .1,為基礎設施保留 .2-.49。
  3. 購買支援 VLAN 和 VLAN 間防火牆規則的閘道器和交換器。
  4. 記錄哪些 SSID 和交換器連接埠最終將對應到哪個網路。

反模式

  • 沒有理由或文件說明的雙重 NAT。
  • 在計畫使用 VPN 時使用 192.168.1.0/24。
  • 為 NAS、Pi-hole、Home Assistant 或其他服務主機使用動態位址。
  • 將消費級路由器重新用作 AP,但其 DHCP 伺服器仍處於啟用狀態。
  • 扁平網路,其中攝影機、智慧插頭、筆記型電腦和伺服器共享相同的信任邊界。

參見

  • 技能:network-interface-health
  • 技能:network-config-validation

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.

相關技能