d51f2d62b6
Add a top-level README mapping the boxes and a full docs/ tree: topic pages (architecture, networking, deployment), per-site box pages for colony and home with containers nested under their hosts, remote and mobile boxes, the installer, and the home switch fabric reference (folded in from home-switches.md, with AGENTS.md and code comments retargeted to its new home). Box pages carry marked assignment tables that CI regenerates from nixos.allAssignments. AGENTS.md points at the new docs and keeps its terse agent version of the mechanics, referring to the topic pages for depth.
4.6 KiB
4.6 KiB
stream
The secondary home router. A physical Intel box, built from routing-common at index 1; its WAN
is a DHCP lease from the Virgin Media cable modem, and it is dual-homed to both switches.
- Source:
nixos/boxes/home/stream.nix(shared router config:routing-common, index 1) - Host: physical
Role
- Backup of the router pair:
routing-commonindex 1 → keepalived startsBACKUP(priority 254), kea serves the upper-half DHCP pools, the zone'sns2points here. Takes over all VIPs whenriveris down — see README.md. - Runs the same
routing-commonservices as river: keepalived/VRRP, PowerDNS recursor + authoritative, kea DHCP + DDNS, radvd, NAT/firewall, theas211024L2 mesh,iperf3,nginx. - Intel box (
kvm-intel,intel_iommu=on, microcode updates). octoprintandmjpg-streamer(3D-printer services) are defined but disabled (enable = false).my.deploy.node.hostnameis currently commented out (it was192.168.68.2).
Network assignments
| Name | Assignment | IPv4 | IPv6 | Domain | Notes |
|---|---|---|---|---|---|
| stream | as211024 | 10.100.50.3/24 |
2a0e:97c0:4df:0:1::2/64 gw 2a0e:97c0:4df:0:2::1 |
— | |
| stream-core | core | 192.168.64.2/24 |
— | h.nul.ie | |
| stream-hi | hi | 192.168.68.2/22 |
2a0e:97c0:4d0:1::2/64 |
h.nul.ie | |
| stream-lo | lo | 192.168.72.2/21 |
2a0e:97c0:4d0:2::2/64 |
h.nul.ie | |
| stream-ut | untrusted | 192.168.80.2/24 |
2a0e:97c0:4d0:3::2/64 |
h.nul.ie |
WAN (Virgin Media DHCP)
wanis a renamed igc NIC (00:f0:cb:ee:ca:dd) towards the cable modem. The modem segment is switch VLAN 130 — tagging is handled on the switch (jim), so the box interface itself is untagged. The fabric side is in switches.md.DHCP=ipv4pulls the public lease;dhcpV4Config.UseDNS=falseand the interface DNS points at the local recursor.IPv6AcceptRA=false— this is an IPv4-only WAN (public IPv6 arrives over the tunnel, not this link).- A static modem-management address (
192.168.0.100/24, host.100ofprefixes.modem.v4) sits onwanalongside the DHCP lease so the modem's web UI stays reachable; it has no gateway. wan-online.targetwiring:wan-wait-online.service(a oneshot) polls until the DHCP default route exists, and the targetrequires/afters it (wantedBy multi-user.target). The route — not networkd's wait-online — is the gate because the permanent static modem address would otherwise report "online" before the public lease arrives, lettingipsecstart unoriented (left=is the public IP) and never connect.- CAKE QoS: egress is shaped at the
wanroot qdisc (Bandwidth=48M); ingress is redirected bytc(mirred, installed by thenetworkd-dispatcherrule inrouting-common) into thewan-ifbIFB atBandwidth=490Mwith the DOCSIS overhead preset.
Modem specifics (de-shared from routing-common)
The modem's management subnet shares the wan interface, which routing-common itself knows
nothing about — it declares two per-box options
(routing-common/default.nix) that this
box sets:
my.homeRouter.dns.wanSkipBroadcasts = [ 192.168.0.255 ]— skip the modem subnet when auto-selecting the router's ownwanA record for the zone's LUA record.my.homeRouter.firewall.untrustedRejectV4 = [ 192.168.0.0/24 ]— reject untrusted clients from reaching the modem subnet (needed only because it shareswan; WAN egress is otherwise accepted).
Switching (STP)
stream is dual-homed to both switches: lan-jim (igc) and lan-dave (mlx4_en), both MTU 9000,
are enslaved to the lan bridge with STP=true. routing-common/mstpd.nix
runs a patched mstpd and forces RSTP on lan once it's routable, so exactly one uplink carries
traffic at a time. (The remaining NICs are renamed et2/et5 and left unconfigured.)
Notable config files
nixos/boxes/home/stream.nix— box config: DHCP WAN, modem management, CAKE,wan-online.targetgate, STP bridge.nixos/boxes/home/routing-common/default.nix— shared router definition (index 1).nixos/boxes/home/routing-common/mstpd.nix— RSTP on thelanbridge.