infra_wiki

Network

The two sites, their UniFi gateways and networks, and the tunnel, routes, ingress and tailnet that connect them.

The network connects two sites, folly (home) and offsite (remote). Each site has a UniFi gateway, its own networks and one Kubernetes cluster. Each gateway runs a UniFi console, the web app that configures the site. folly's console calls offsite nest, and offsite's console calls folly fml.

Parts#

PartJobWhere it runs
UniFi gatewayRoutes and filters traffic, and exchanges routes with the cluster over BGPUDM Pro at folly, UCG Max at offsite
Site Magic tunnelCarries traffic and routes between the sites over WireGuard (wgsts1000)The two gateways
CiliumAssigns pod and load-balancer addresses (VIPs), and announces them over BGPEach Kubernetes node
IngressGives services DNS names, certificates and public reachEach cluster
Tailscale ConnectorRoutes Tailscale traffic into the siteEach cluster
Lab resolversServe lab DNS and NTPcapsule and spore

Networks#

SiteNetworkJob
follyManagementHome network, WLAN fml
follyAnchorThe anchors and other lab hosts, WLAN lab (open, hidden)
follyKubernetesfolly nodes. DHCP offers iPXE netboot from spore.
follyfutureIPv6 prefix delegated from the WAN. Holds the Windows desktops tallboy and atomic.
follyiotIoT devices
offsiteDefaultClient LAN
offsiteKubernetesoffsite nodes

Rules#

  • Read addresses, subnets and ASNs from cluster-topology.json and anchor-topology.json. Do not copy them.
  • Change a subnet and every copy of it in one PR, or routes and DNS break. Find the copies with git grep -nF '<old prefix>'. They include the FRR files, policy.hujson, the Tailscale Connectors and VIPs pinned in app manifests.
  • After a change to a node subnet, future or offsite's Default network, edit the Site Magic subnet list in both consoles, or the other site has no route to the subnet.
  • Change a lab host address as the Topology rules say.

Where it lives#

  • terraform/network/unifi/<site>/: networks and their VLAN IDs, WLANs, firewall and gateway BGP config. terraform/network/unifi/folly/home.tf and terraform/network/unifi/offsite/networks.tf hold the Management, iot and offsite Default subnets. terraform/network/unifi/folly/aps.tf declares folly's access points and the AP groups a WLAN is assigned to, from the aps map in clients.yaml.
  • Each console's UI: the Site Magic tunnel, its subnet lists and the console's Let's Encrypt certificate
  • clusters/<site>/config/cluster-topology.json: K8S_NODE_CIDR, LB_RANGE, ROUTER_IP and the other cluster keys. Print them with jq .data <file>.
  • clusters/folly/config/anchor-topology.json: ANCHOR_CIDR, FUTURE_CIDR and the lab host addresses

Edit on GitHub

↑↓ move ↵ open esc close