跳到正文
Skillpedia
部署与云(DevOps)280k · #332

homelab-network-setup

它能做什么

帮助你规划和组织家庭或小型实验室网络。内容包括选购设备(路由器、交换机、Wi-Fi)、如何规划 IP 地址和名称,以及如何把各个设备连接起来。

适用场景

  • ✓搭建新的家庭网络时。
  • ✓想通过接入更多设备来升级现有网络时。
  • ✓遇到网络或 Wi-Fi 问题时。

技能链接

https://github.com/affaan-m/ECC/blob/main/skills/homelab-network-setup/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/affaan-m/ECC/blob/main/skills/homelab-network-setup/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我想搭建一个家庭网络。我已经有运营商提供的光猫,还想添置一台更好的路由器、一台交换机和两个 Wi-Fi 接入点。我应该如何规划 IP 地址?哪些设备比较合适?”

每周 5 个新技能,1 分钟读完。

工作原理

AI 会建议按功能划分设备(路由器、交换机、Wi-Fi),并帮你选择合适的类型。它还会提供一份 IP 地址规划方案,避免地址冲突,并让设备井然有序。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Homelab Network Setup

Use this skill to design a home or small-lab network that can grow without needing a full rebuild.

When to Use

  • Planning a new home network or redesigning an ISP-router-only setup.
  • Choosing gateway, switch, and access point roles.
  • Designing IP ranges, DHCP scopes, static reservations, and DNS.
  • Preparing for future VLANs, Pi-hole, NAS, lab servers, or VPN access.
  • Troubleshooting a new network that has double NAT, unstable Wi-Fi, or changing server addresses.

How It Works

Start by separating device roles:

Internet
  |
Modem or ONT
  |
Gateway or router      NAT, firewall, DHCP, DNS, inter-VLAN routing
  |
Managed switch         wired clients, AP uplinks, optional VLAN trunks
  |
Access points          Wi-Fi only; ideally wired backhaul
Servers and NAS        stable addresses, DNS names, monitoring
Clients and IoT        DHCP pools, isolated later if VLANs are available

Pick a gateway that matches the operator, not just the feature checklist:

Option Best fit Notes
ISP router Basic internet only Limited control and often poor VLAN support
UniFi gateway Managed home network Good UI, ecosystem lock-in
OPNsense or pfSense Flexible homelab Strong VLAN, firewall, VPN, and DNS control
MikroTik Advanced network users Powerful, but easy to misconfigure
Linux router Tinkerers Document rollback before using as primary gateway

IP Plan

Avoid the most common default, 192.168.1.0/24, when you expect to use VPNs. It often conflicts with hotels, offices, and ISP routers.

Example small homelab plan:

192.168.10.0/24  trusted clients
192.168.20.0/24  IoT and media devices
192.168.30.0/24  servers and NAS
192.168.40.0/24  guest Wi-Fi
192.168.99.0/24  network management

Gateway convention: .1
Infrastructure reservations: .2 through .49
Dynamic DHCP pool: .50 through .240
Spare room: .241 through .254

Use home.arpa for local names. It is reserved for home networks and avoids the leakage/conflict problems of ad hoc names like home.lan.

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

DHCP And DNS

  • Use DHCP reservations for anything you SSH into, bookmark, monitor, or expose as a service.
  • Hand out the gateway as DNS until a local resolver is intentionally deployed.
  • If using Pi-hole or another DNS filter, give it a reservation first, then point DHCP DNS options at that address.
  • Keep a small static/reserved range per subnet so replacements do not collide with dynamic leases.

Cabling And Wi-Fi

  • Prefer wired AP backhaul over mesh when you can run Ethernet.
  • Use a PoE switch for APs and cameras if the budget allows it.
  • Label both ends of each cable and keep a simple port map.
  • Put the gateway, switch, DNS server, and NAS on UPS power if outages are common.

Examples

Beginner Upgrade

Goal: Keep the ISP router but stabilize a small lab.

  1. Set DHCP reservations for NAS, Pi, and any SSH hosts.
  2. Move local names to home.arpa.
  3. Disable duplicate DHCP servers on secondary routers or APs.
  4. Wire the main AP instead of relying on wireless backhaul.

VLAN-Ready Plan

Goal: Prepare for future segmentation without enabling it immediately.

  1. Choose non-overlapping /24 ranges for trusted, IoT, servers, guest, and management.
  2. Reserve .1 for the gateway and .2-.49 for infrastructure on every subnet.
  3. Buy a gateway and switch that support VLANs and inter-VLAN firewall rules.
  4. Document which SSIDs and switch ports will eventually map to each network.

Anti-Patterns

  • Double NAT without a reason or documentation.
  • Using 192.168.1.0/24 when VPN access is planned.
  • Dynamic addresses for NAS, Pi-hole, Home Assistant, or other service hosts.
  • Consumer routers repurposed as APs while their DHCP servers are still enabled.
  • Flat networks with cameras, smart plugs, laptops, and servers all sharing the same trust boundary.

See Also

  • Skill: network-interface-health
  • Skill: network-config-validation
常见问题

为什么不使用默认的 IP 段 192.168.1.0/24?

这是非常常见的地址段,许多路由器和公共场所都在使用。如果你连接其他网络(比如酒店或公司网络),尤其是在使用 VPN 时,就可能发生冲突。

什么是“DHCP 预留”(DHCP reservations)?

就是为网络中的某个特定设备分配一个固定的 IP 地址。这对于需要每次都能在同一位置找到的设备很有用,比如服务器或安防系统。

什么是 VLAN?

VLAN 是把网络划分为多个较小且相互独立部分的一种方式。比如,你可以把安防设备放在一个 VLAN 中,把电脑放在另一个 VLAN 中,从而提升安全性。

详情

作者的原始描述

Practical home and homelab network planning for gateways, switches, access points, IP ranges, DHCP reservations, DNS, cabling, and common beginner mistakes. Use when planning or fixing a home or homelab network — gateway, switch, AP, IP ranges, DHCP, DNS, or cabling.

repo: affaan-m/ECC

热度

GitHub 星标
280k
排名
#332
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能