c1 dual-stack: cluster-internal ULA IPv6, reachable from the LAN #27

Open
opened 2026-11-12 17:12:17 +00:00 by ginjiruu · 5 comments
Owner

Follow-up to #14 (c1 came up IPv4-only).

Goal

Cluster-internal IPv6 on c1 (ULA), reachable from the LAN, for learning/experimenting. No ISP prefix: Bell residential gives no IPv6 delegation (Rogers does; that would be the global entry point if ever switched).

Facts

  • k3s: dual-stack "must be configured when the cluster is first created" (docs.k3s.io basic-network-options). Needs a c1 rebuild; scripts/k3s-reset.sh makes that cheap. Ceph/LINSTOR data is wiped by the reset, so do it before data lands.
  • Inside the cluster no router is needed: static ULA per node from machine-configs, ULA cluster-cidr/service-cidr, Cilium native routing with autoDirectNodeRoutes (same L2).
  • LAN reachability needs the router, not the ISP: RAs for a ULA /64 on the LAN, plus routes to the pod/service ULA ranges (static routes, or Cilium BGP to the MikroTik). Check whether Cilium L2 announcements do IPv6/NDP in our version before relying on it.

Plan

  • ULA plan (LAN /64, pod /56, service /112), recorded in machine-configs
  • router: ULA RA + routes (router-as-code / iac#44)
  • prove dual-stack on test-01 (Cilium dual-stack, k3s cidrs)
  • rebuild c1 dual-stack, verify a LAN host reaches a pod and a Service over v6
Follow-up to #14 (c1 came up IPv4-only). ## Goal Cluster-internal IPv6 on c1 (ULA), reachable from the LAN, for learning/experimenting. No ISP prefix: Bell residential gives no IPv6 delegation (Rogers does; that would be the global entry point if ever switched). ## Facts - k3s: dual-stack "must be configured when the cluster is first created" (docs.k3s.io basic-network-options). Needs a c1 rebuild; scripts/k3s-reset.sh makes that cheap. Ceph/LINSTOR data is wiped by the reset, so do it before data lands. - Inside the cluster no router is needed: static ULA per node from machine-configs, ULA cluster-cidr/service-cidr, Cilium native routing with autoDirectNodeRoutes (same L2). - LAN reachability needs the router, not the ISP: RAs for a ULA /64 on the LAN, plus routes to the pod/service ULA ranges (static routes, or Cilium BGP to the MikroTik). Check whether Cilium L2 announcements do IPv6/NDP in our version before relying on it. ## Plan - [ ] ULA plan (LAN /64, pod /56, service /112), recorded in machine-configs - [ ] router: ULA RA + routes (router-as-code / iac#44) - [ ] prove dual-stack on test-01 (Cilium dual-stack, k3s cidrs) - [ ] rebuild c1 dual-stack, verify a LAN host reaches a pod and a Service over v6
Author
Owner

Addressing plan (2026-11-12)

Lab ULA /48: fdd5:c8ef:2fa0::/48 (40 random bits, generated once, RFC 4193). Written P below. One /48 for the whole lab, never per ISP.

Layout of the 16-bit subnet ID

The top nibble is the site (ADR-0005), so each site is a /52 with 4096 /64s and summarizes to one route over VPN or BGP.

Site Range
caosh P:0000::/52
catny P:1000::/52
cagvh P:2000::/52
cator P:3000::/52
spare P:4000:: and up

Inside caosh (P:0xxx):

Use Prefix Mirrors v4
VLAN n P:0nnn::/64 (VLAN number read as decimal, e.g. VLAN 15 = P:15::/64) 10.n.x.x
c1 pods P:0400::/56 (one /64 per node) 10.44
c1 services P:0500::/112 10.45
c1 LB pool (ULA) P:0600::/64 10.10.6
next cluster P:0700::/56, P:0800::/112, P:0900::/64

The decimal-read mapping only works for VLANs 1-399. From 400 up it runs into the cluster blocks, and 1000 and up spill into the next site's nibble: VLAN 1000 would land on catny. Such VLANs (the 1000 management VLAN) get an explicit slot instead, for example P:0f00::/64. The alternative is to move the cluster blocks higher (P:0c00 and up). Decide this before the first rebuild, because pod and service CIDRs are fixed at cluster creation.

Rules:

  • Every LAN is a /64, point-to-point links included.
  • Ranges sit on nibble boundaries (/52, /56, /60, /64, /112) so reverse DNS (ip6.arpa) stays clean.
  • Servers get static readable interface IDs that match the v4 last octet: 10.15.1.170 becomes P:15::170. Clients use SLAAC with privacy addresses.
  • No hex words.

Cilium (fixes from the old mini attempt, flux-clusters/clusters/mini/cilium)

  • ipv6.enabled: true (it was commented out, so v6 never worked)
  • ipv6NativeRoutingCIDR: fdd5:c8ef:2fa0::/48 (the old fd00::/100 covered neither nodes nor pods)
  • clusterPoolIPv6PodCIDRList: P:0400::/56, mask 64 (the old 2001:cafe:: is someone else's public space)
  • k3s cluster-cidr and service-cidr set to the same ULA ranges
  • LB pools: a ULA pool now; a separate GUA pool only when public v6 exists, selected per Service
  • BGP: a separate IPv6 session between node ULA and router ULA, carrying the ipv6 family only, so the next hop is IPv6. Advertise PodCIDR plus LB IPs, same as v4.

Router

  • ULA /64 on each LAN, with RA for clients
  • IPv6 BGP neighbor per node
  • Default-deny inbound IPv6 that keeps the ICMPv6 NDP and PMTUD types open
  • Later: a DHCPv6-PD client on the WAN, plus either a GUA LB pool or NPTv6 (ULA to ISP prefix). Either way the ISP prefix only appears on the router and in the GUA pool, so changing ISP never touches the cluster.

DNS

  • AAAA records and reverse ip6.arpa records generated from machine-configs host data (#16, iac#50), not entered by hand
  • external-dns for LoadBalancer Services
## Addressing plan (2026-11-12) **Lab ULA /48: `fdd5:c8ef:2fa0::/48`** (40 random bits, generated once, RFC 4193). Written `P` below. One /48 for the whole lab, never per ISP. ### Layout of the 16-bit subnet ID The top nibble is the site (ADR-0005), so each site is a /52 with 4096 /64s and summarizes to one route over VPN or BGP. | Site | Range | |---|---| | caosh | `P:0000::/52` | | catny | `P:1000::/52` | | cagvh | `P:2000::/52` | | cator | `P:3000::/52` | | spare | `P:4000::` and up | Inside caosh (`P:0xxx`): | Use | Prefix | Mirrors v4 | |---|---|---| | VLAN n | `P:0nnn::/64` (VLAN number read as decimal, e.g. VLAN 15 = `P:15::/64`) | `10.n.x.x` | | c1 pods | `P:0400::/56` (one /64 per node) | 10.44 | | c1 services | `P:0500::/112` | 10.45 | | c1 LB pool (ULA) | `P:0600::/64` | 10.10.6 | | next cluster | `P:0700::/56`, `P:0800::/112`, `P:0900::/64` | | The decimal-read mapping only works for VLANs 1-399. From 400 up it runs into the cluster blocks, and 1000 and up spill into the next site's nibble: VLAN 1000 would land on catny. Such VLANs (the 1000 management VLAN) get an explicit slot instead, for example `P:0f00::/64`. The alternative is to move the cluster blocks higher (`P:0c00` and up). Decide this before the first rebuild, because pod and service CIDRs are fixed at cluster creation. Rules: - Every LAN is a /64, point-to-point links included. - Ranges sit on nibble boundaries (/52, /56, /60, /64, /112) so reverse DNS (ip6.arpa) stays clean. - Servers get static readable interface IDs that match the v4 last octet: `10.15.1.170` becomes `P:15::170`. Clients use SLAAC with privacy addresses. - No hex words. ### Cilium (fixes from the old mini attempt, flux-clusters/clusters/mini/cilium) - `ipv6.enabled: true` (it was commented out, so v6 never worked) - `ipv6NativeRoutingCIDR: fdd5:c8ef:2fa0::/48` (the old `fd00::/100` covered neither nodes nor pods) - `clusterPoolIPv6PodCIDRList: P:0400::/56`, mask 64 (the old `2001:cafe::` is someone else's public space) - k3s `cluster-cidr` and `service-cidr` set to the same ULA ranges - LB pools: a ULA pool now; a separate GUA pool only when public v6 exists, selected per Service - BGP: a separate IPv6 session between node ULA and router ULA, carrying the ipv6 family only, so the next hop is IPv6. Advertise PodCIDR plus LB IPs, same as v4. ### Router - ULA /64 on each LAN, with RA for clients - IPv6 BGP neighbor per node - Default-deny inbound IPv6 that keeps the ICMPv6 NDP and PMTUD types open - Later: a DHCPv6-PD client on the WAN, plus either a GUA LB pool or NPTv6 (ULA to ISP prefix). Either way the ISP prefix only appears on the router and in the GUA pool, so changing ISP never touches the cluster. ### DNS - AAAA records and reverse `ip6.arpa` records generated from machine-configs host data (#16, iac#50), not entered by hand - external-dns for LoadBalancer Services
Author
Owner

Update 2026-11-13: aligned with iac ADR-0008 (lab/iac PR #82)

  • VLAN ID = IPv4 third octet = IPv6 subnet ID. VLANs are renumbered below 400 (10 mgmt, 20 servers, 21 storage, 30 trusted, 40 IoT, 50 guest), so the "VLAN 1000 lands on catny" problem goes away, and so do the special slots like P:0f00.
  • IPv4 for caosh is 10.30.0.0/16, drawn at random, so 10.30.20.21 = P:20::21.
  • LB pool moves from P:0600::/64 to P:100::/64 to match IPv4 10.30.100.0/24. The pod /56 (P:0400::) and service /112 (P:0500::) stay as they are.
  • c1 IPv4 pods and services move to 10.30.128.0/18 and 10.30.192.0/20 at the dual-stack rebuild. Both families get renumbered in the same rebuild window.
  • Native WireGuard links get P:200::/64 and 10.30.200.0/24. Router loopbacks get P:0::/64 and 10.30.0.0/24.
## Update 2026-11-13: aligned with iac ADR-0008 (lab/iac PR #82) - **VLAN ID = IPv4 third octet = IPv6 subnet ID.** VLANs are renumbered below 400 (10 mgmt, 20 servers, 21 storage, 30 trusted, 40 IoT, 50 guest), so the "VLAN 1000 lands on catny" problem goes away, and so do the special slots like `P:0f00`. - IPv4 for caosh is `10.30.0.0/16`, drawn at random, so `10.30.20.21` = `P:20::21`. - LB pool moves from `P:0600::/64` to **`P:100::/64`** to match IPv4 `10.30.100.0/24`. The pod `/56` (`P:0400::`) and service `/112` (`P:0500::`) stay as they are. - c1 IPv4 pods and services move to `10.30.128.0/18` and `10.30.192.0/20` at the dual-stack rebuild. Both families get renumbered in the same rebuild window. - Native WireGuard links get `P:200::/64` and `10.30.200.0/24`. Router loopbacks get `P:0::/64` and `10.30.0.0/24`.
Author
Owner

Rook goes onto host networking as part of this rebuild, from day one, instead of being converted on the running cluster.

Plan

  • Ceph runs on VLAN 21 (lab/iac ADR-0008): 10.30.21.0/24 and fdd5:c8ef:2fa0:21::/64, never routed. Host numbers match the servers VLAN, so think-01 is .21 / ::21.
  • Public and cluster networks share that one subnet. Ceph calls a separate cluster network optional, and splitting it adds a failure mode: OSDs flap when the cluster network is down but the public one is up.
  • MTU 1500. The Pi 4 mons can't go higher (bcmgenet maxmtu 1500, checked on pi-01), and jumbo frames gain about 1.5% at 1 Gbit. Reasoning is in ADR-0008.
  • Host networking, not Multus. Rook's Multus mode still needs a host interface and route on every node, because the CSI plugin runs on the host.
  • Encryption: host networking bypasses Cilium's WireGuard, so the Rook values carry:
network:
  provider: host
  dualStack: true
  addressRanges:
    public:  ["10.30.21.0/24", "fdd5:c8ef:2fa0:21::/64"]
    cluster: ["10.30.21.0/24", "fdd5:c8ef:2fa0:21::/64"]
  connections:
    encryption: {enabled: true}
    requireMsgr2: true
  • Mon nodes may need network.rook.io/mon-ip annotations, because node IPs stay on VLAN 20.
  • machine-configs: a VLAN 21 interface with static v4 and v6 on every Ceph node, thinks and Pis. The host firewall opens 3300, 6789 and 6800-7300 on that interface only.
  • iac (RouterOS): VLAN 21 on the trunks to the thinks and Pis. It only exists after the router cutover (lab/iac#73).

Why not convert c1 in place now

Mons can't change address family in place. Moving them to dual stack on a new VLAN means failing over each mon on the slow-booting Pis, and VLAN 21 doesn't exist before the cutover anyway.

Lab rehearsal

Phase B of the bedrock harness, before the rebuild:

  • VLAN 21 on the containerlab Linux bridge labsw. A Linux bridge isn't throttled like the CHR routers.
  • One extra disk per test VM.
  • Rook on host networking with the values above.
  • An RBD mount held open throughout, HEALTH_OK at the end.

Source: handoff-rook-host-networking-2026-11-15.md (scratch). Its reference to mc#24 for dual stack is wrong; this is the issue.

Rook goes onto host networking as part of this rebuild, from day one, instead of being converted on the running cluster. ## Plan - Ceph runs on VLAN 21 (lab/iac ADR-0008): `10.30.21.0/24` and `fdd5:c8ef:2fa0:21::/64`, never routed. Host numbers match the servers VLAN, so think-01 is `.21` / `::21`. - Public and cluster networks share that one subnet. Ceph calls a separate cluster network optional, and splitting it adds a failure mode: OSDs flap when the cluster network is down but the public one is up. - MTU 1500. The Pi 4 mons can't go higher (`bcmgenet maxmtu 1500`, checked on pi-01), and jumbo frames gain about 1.5% at 1 Gbit. Reasoning is in ADR-0008. - Host networking, not Multus. Rook's Multus mode still needs a host interface and route on every node, because the CSI plugin runs on the host. - Encryption: host networking bypasses Cilium's WireGuard, so the Rook values carry: ```yaml network: provider: host dualStack: true addressRanges: public: ["10.30.21.0/24", "fdd5:c8ef:2fa0:21::/64"] cluster: ["10.30.21.0/24", "fdd5:c8ef:2fa0:21::/64"] connections: encryption: {enabled: true} requireMsgr2: true ``` - Mon nodes may need `network.rook.io/mon-ip` annotations, because node IPs stay on VLAN 20. - machine-configs: a VLAN 21 interface with static v4 and v6 on every Ceph node, thinks and Pis. The host firewall opens 3300, 6789 and 6800-7300 on that interface only. - iac (RouterOS): VLAN 21 on the trunks to the thinks and Pis. It only exists after the router cutover (lab/iac#73). ## Why not convert c1 in place now Mons can't change address family in place. Moving them to dual stack on a new VLAN means failing over each mon on the slow-booting Pis, and VLAN 21 doesn't exist before the cutover anyway. ## Lab rehearsal Phase B of the bedrock harness, before the rebuild: - VLAN 21 on the containerlab Linux bridge `labsw`. A Linux bridge isn't throttled like the CHR routers. - One extra disk per test VM. - Rook on host networking with the values above. - An RBD mount held open throughout, HEALTH_OK at the end. Source: handoff-rook-host-networking-2026-11-15.md (scratch). Its reference to mc#24 for dual stack is wrong; this is the issue.
Author
Owner

Status 2026-11-17:

  • ULA plan recorded in machine-configs -> proposed as lab/machine-configs#39 (ADR-0012: VLAN 20 statics + VIPs, storage 21, pods P:400::/56, services P:500::/112, LB pools, reissue checklist). Awaiting review.
  • router ULA RA -> already LIVE, verified today: VLANs 10/20/30/40/50 carry P:::/64 with router addrs ::2/::3, RA preference r1 high (iac f5f4fda; Terraform objects rb5009-a/b + crs309 report No drift at master 88f7609). Routes to pod/service ULA ranges are the part of this checkbox that still rides the rebuild (Cilium BGP v6 advertisement or static fallback).
  • prove dual-stack on test-01 - next executable item; test-02/test-03 hosts exist in the flake now (mc#31 harness).
  • rebuild c1 dual-stack - the window; ADR-0012 carries its address plan + reissue list.
    Legacy VLANs 1/1000 stay v4-only deliberately: hosts get IPv6 when they move to their new VLAN.
Status 2026-11-17: - [x] ULA plan recorded in machine-configs -> proposed as lab/machine-configs#39 (ADR-0012: VLAN 20 statics + VIPs, storage 21, pods P:400::/56, services P:500::/112, LB pools, reissue checklist). Awaiting review. - [x] router ULA RA -> already LIVE, verified today: VLANs 10/20/30/40/50 carry P:<vid>::/64 with router addrs ::2/::3, RA preference r1 high (iac f5f4fda; Terraform objects rb5009-a/b + crs309 report No drift at master 88f7609). Routes to pod/service ULA ranges are the part of this checkbox that still rides the rebuild (Cilium BGP v6 advertisement or static fallback). - [ ] prove dual-stack on test-01 - next executable item; test-02/test-03 hosts exist in the flake now (mc#31 harness). - [ ] rebuild c1 dual-stack - the window; ADR-0012 carries its address plan + reissue list. Legacy VLANs 1/1000 stay v4-only deliberately: hosts get IPv6 when they move to their new VLAN.
Author
Owner

Rook host networking / VLAN 21 remainder moved to lab/clusters#1785.

Rook host networking / VLAN 21 remainder moved to lab/clusters#1785.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lab/machine-configs#27
No description provided.