Lesson 3 of 9 · 27m
Self-Hosted DNS, DHCP, and Time Without Circular Dependencies
Run core network services with clear authority, redundancy, bootstrap paths, and an understanding of what breaks when they fail.
The first time your DNS server is a VM running on a hypervisor whose hostname must be resolved through DNS, you learn what a circular dependency feels like. Core network services are boring because they are supposed to be invisible. That means failure feels total: everything is up, but nothing works. Treat DNS, DHCP, and time as foundational control planes, not applications.
Separate authority, recursion, and filtering
Home labs often mash these roles together, but the mental model matters:
authoritative DNS answers for your internal zones
recursive DNS resolves public names for clients
filtering DNS policy layer such as Pi-hole or AdGuard Home
DHCP leases addresses and distributes network options
NTP keeps authentication, TLS, logs, and scheduling coherentA common design is an authoritative server for lab.internal plus a resolver that forwards public lookups upstream. Filtering can sit in front of recursion, but understand which component answers first when troubleshooting.
Example: Unbound recursion plus local zones
server:
interface: 10.10.30.10
access-control: 10.10.0.0/16 allow
local-zone: "lab.internal." static
local-data: "nas.lab.internal. A 10.10.30.15"
local-data-ptr: "10.10.30.15 nas.lab.internal"One resolver is one failure domain. Two resolvers on the same hypervisor are also one failure domain wearing a costume.
DHCP is policy distribution
A lease is not just an IP. It tells clients who the gateway is, which DNS servers to use, what domain suffix to try, and sometimes where to boot or provision from:
subnet 10.10.30.0 netmask 255.255.255.0 {
range 10.10.30.100 10.10.30.199;
option routers 10.10.30.1;
option domain-name-servers 10.10.30.10, 10.10.30.11;
option domain-search "lab.internal";
max-lease-time 86400;
}Static reservations are better than hand-configured addresses for most infrastructure because the network remains the source of truth. Reserve by MAC address and document the device owner.
Do not create bootstrap paradoxes
Ask what happens from power-on:
- Switch boots.
- Firewall boots.
- Hypervisor boots.
- DHCP and DNS start.
- Storage and applications start.
If the hypervisor needs a hostname to mount storage, either that name must resolve locally or the mount must use an address. If the firewall VM depends on a cluster that depends on the firewall VM, your recovery sequence is theatrical. Keep core services small, close to the metal, or redundant across independent failure domains.
Time is a security dependency
TLS validation, Kerberos, TOTP, logs, metrics correlation, certificate rotation, and distributed systems all assume sane clocks. Use a reliable upstream and monitor drift:
chronyc tracking
chronyc sources -v
timedatectl statusA lab that reboots after a power outage can come back with wildly wrong time if a battery or RTC is failing. That failure then masquerades as expired certificates and broken authentication.
Split horizon without self-deception
Internal DNS can return private addresses for public service names, avoiding hairpin NAT and keeping traffic local:
public answer: files.example.net -> 203.0.113.20
internal answer: files.example.net -> 10.10.40.10This is useful, but document it. During incident response you need to know whether a client resolved the private edge, the public edge, or a cached answer from a network you no longer control.
Field notes
- Never distribute only one DNS server through DHCP unless you enjoy planned total outages.
- Do not use a domain you do not control for internal names.
.localbelongs to mDNS and causes exactly the weird intermittent behavior you would expect. - Test resolution from every VLAN. Different DHCP scopes often drift apart after the first network redesign.
- Make the firewall/router independently operable. If you cannot administer the network when the VM cluster is down, recovery becomes physical improvisation.
Was this lesson helpful?