ansible/docs/guides/unifi-static-dhcp.md
ilia f0ff00a8dc
All checks were successful
CI / skip-ci-check (pull_request) Successful in 6s
CI / ansible-validation (pull_request) Successful in 46s
CI / lint-and-test (pull_request) Successful in 51s
CI / secret-scanning (pull_request) Successful in 6s
CI / dependency-scan (pull_request) Successful in 15s
CI / license-check (pull_request) Successful in 13s
CI / sast-scan (pull_request) Successful in 24s
CI / vault-check (pull_request) Successful in 11s
CI / container-scan (pull_request) Successful in 6s
CI / sonar-analysis (pull_request) Successful in 5s
CI / playbook-test (pull_request) Successful in 25s
CI / workflow-summary (pull_request) Successful in 4s
Add levkin.ca site, document git-ci-01 runner tuning
Inventory and Caddy playbook for levkin LXC 220; Makefile target
caddy-levkin. Document git-ci-01 disk (64G), capacity 2, prune cron,
and pve201 RAM limits in host_vars and homelab guides.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-22 22:38:56 -04:00

3.6 KiB
Raw Permalink Blame History

UniFi static DHCP (10.0.10.x homelab)

Controller: https://192.168.2.1/
Goal: Pin Proxmox VM MAC addresses to stable 10.0.10.x addresses so Caddy and Ansible inventory do not drift.

LXCs on pve10 (210, 215220) are already static via pct setno UniFi lease needed for those rows. This guide is for VMs (and pve201 guests) that still use DHCP.


Before you start

  1. Confirm guests get addresses on 10.0.10.0/24 (not only 192.168.2.x). In UniFi, open the network that faces Proxmox vmbr0.
  2. Gateway for homelab guests should be 10.0.10.1 (or your routers IP on that VLAN).
  3. Use the MAC table in vm-static-ip-router-reservations.md.

Method A — From a connected client (easiest)

  1. Open https://192.168.2.1/ and sign in.
  2. Go to Clients (or UniFi DevicesClients).
  3. Find the device (hostname like gitea, vaultwarden, or MAC from Proxmox qm config <vmid>).
  4. Click the client → Settings (gear) or .
  5. Enable Fixed IP / Use fixed IP address.
  6. Set IP to the target from the table (e.g. 10.0.10.169 for gitea).
  7. Apply / Save.
  8. On the VM: renew DHCP or reboot:
    sudo dhclient -r && sudo dhclient
    # or: reboot
    
  9. Verify: ip -4 addr show shows the reserved IP.

Method B — DHCP static mapping (manual MAC)

  1. SettingsNetworks.
  2. Open the LAN/VLAN that serves 10.0.10.x (name varies: Default, Homelab, 10.0.10).
  3. DHCP section → DHCP Static IP / Static leasesCreate new.
  4. Enter:
    • MAC address (from Proxmox, e.g. BC:24:11:E9:BD:E5)
    • IP address (e.g. 10.0.10.169)
    • Name (optional, e.g. giteaVM)
  5. Save. Repeat for each row in the reservations table.
  6. Renew DHCP on each VM or reboot.

Already static (skip UniFi DHCP)

VMID Name IP How
210 cal 10.0.10.228 pct set
215 caseware 10.0.10.105 pct set
216 auto 10.0.10.59 pct set
217 identity 10.0.10.21 pct set
218 monitoring 10.0.10.22 pct set
219 portfolio 10.0.10.106 pct set (iliadobkin.com)
220 levkin 10.0.10.60 pct set (levkin.ca)
106 caddy 10.0.10.50 static in /etc/network/interfaces

Priority order — UniFi reservations (VMs / pve201)

Order Guest IP MAC Notes
1 giteaVM 10.0.10.169 BC:24:11:E9:BD:E5
2 vaultwardenVM 10.0.10.142 BC:24:11:58:DB:DC
3 n8n (WRA) 10.0.10.154 BC:24:11:61:DE:7A
4 hermes 10.0.10.36 BC:24:11:51:1E:99
5 actual 10.0.10.158 BC:24:11:10:7B:64
6 jellyfin 10.0.10.232 BC:24:11:29:B8:84 stopped until NAS OK
7 listmonk (pve201 VM 113) 10.0.10.148 BC:24:11:11:53:9A
8 Mailcow (pve201) 10.0.10.132 BC:24:11:34:75:2D
9 TrueNAS 10.0.10.107 BC:24:11:14:DE:B5 optional pin
10 PVE.BU.SVR 10.0.10.200 BC:24:11:DA:95:3B lab VM

Full MAC table: vm-static-ip-router-reservations.md.


If you only see 192.168.2.x in UniFi

Your Mac may be on 192.168.2.0/24 while Proxmox guests use a separate 10.0.10.0/24 network. In that case:

  • Add or edit a UniFi network/VLAN for 10.0.10.0/24, or
  • Ensure the router bridges/routes between 192.168.2.x and 10.0.10.x, and
  • Put DHCP reservations on the network that actually serves the Proxmox bridge.

After reservations

Mark ✅ router in host-list.md for each guest.