Communitygithub.com

homelab-network-setup

ゲートウェイ、スイッチ、アクセスポイント、IPレンジ、DHCP予約、DNS、ケーブリング、およびよくある初心者のミスについて実践的なホーム・ホームラボネットワーク計画を提供します。ネットワークの計画や修正(ゲートウェイ、スイッチ、AP、IPレンジ、DHCP、DNS、ケーブリング)を行う際に使用します。

homelab-network-setup とは?

このスキルは、ホームネットワークまたは小規模ラボネットワークを設計・トラブルシューティングするための実践的なガイドです。ユーザーは、ゲートウェイ、スイッチ、アクセスポイントの役割を分離し、適切なIP範囲(例:192.168.10.0/24などVPNとの競合を避ける非デフォルトサブネット)を選択し、DHCP予約とDNSを設定し、将来のVLANやPi-hole、NASなどのサービスに備えることができます。さらに、二重NAT、デフォルトIPレンジの誤用、APのDHCPサーバー重複といったアンチパターンを回避するための具体的なアドバイスを提供します。このスキルは、Claude CodeやCursorなどのAIエージェントから直接利用可能で、初心者から中級者までのホームラボネットワーク設計の決定を支援します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/tree/main/skills/homelab-network-setup

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

ホームラボネットワークセットアップ

このスキルを使用して、完全な再構築を必要とせずに拡張可能なホームまたは小規模ラボネットワークを設計します。

使用するタイミング

  • 新しいホームネットワークを計画する、または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/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.

関連スキル