mullane.info

Notes from the VLAN cutover

Undated · common

On the evening of 2026-11-15 the house network went from one flat network to about fifteen zones (servers, workstations, several kinds of IoT, guests and so on), each with its own VLAN, DHCP range and firewall interface. The agent drove it from a runbook written beforehand; I was on standby with a laptop and a fallback plan. It mostly went to plan. These are the parts that didn’t, or that I’d do the same way again.

The preparation that paid off: an hour before, the DHCP leases were cut to five minutes, so after the flip every host picked up its new address within three minutes. (They went back to normal afterwards, both the general setting and every subnet’s own.) Wi-Fi changes were pushed to the access points before the flip, because changing an SSID makes them re-provision for over a minute, and the RADIUS server address they were given was one that would be directly reachable from their own network afterwards, so Wi-Fi didn’t have to wait for them to renew DHCP. The flip itself ran from my desktop through a second NetworkManager profile (a fixed management address, pointing at the router’s new address), switched on by a detached systemd unit so it survived the old connection going away. The script had every host name pinned to its IP, since there would be no DNS halfway through. And because the servers only accept the agent’s key from known addresses, the temporary management address was added to each of them beforehand and removed afterwards.

The surprise was the firewall. Right after the new interfaces were applied, the agent applied the firewall rules, and the API said OK. The rules for the new interfaces weren’t loaded. The management network kept working, which hid it; from inside the new zones, nothing went anywhere. Twelve minutes later a second apply loaded them. Since then, the rule is to check the per-rule packet counters and test from a host inside a zone, not from the network you’re sitting on.

The rest was cleanup. Rootless containers copy the host’s addresses and gateway when they start, so after a host moved, its containers needed a restart. AdGuard listens on every address and answers from whichever interface the reply leaves by, so a host asking another zone’s gateway for DNS gets its answer from an unexpected address and throws it away: ask your own zone’s gateway. The firewall now reaches each host from its address in that host’s zone, so anything that had allowed only the old address (the certificate deployment account, for instance) needed the new ones as well. And discovery between zones (casting to the TV from a phone, mostly) didn’t work until Unbound moved off port 5353, which the mDNS repeater needs and Unbound had been holding all along. AdGuard’s upstream settings turned out to point somewhere slightly different from what we’d assumed, in two separate lists, so I fixed those by hand on the firewall.

By the end of the night casting worked from my phone, which as far as the rest of the household is concerned was the whole project.