On an adopted hub the private network takes over the tunnel it finds rather than running beside it (hq ADR 0105): two tunnels leave the mesh's unreachable through the provider's filter, so no machine can ever join. The node presents the found tunnel when it enrols, under the key it took as its own; the inventory records it (node.tunnel, tunnel_peer — migration 0031) and the mesh composes from it: the overlay's range is the adopted tunnel's, the hub is placed at the tunnel's address on the tunnel's port, and every peer the tunnel had is carried in the hub's peer list as a peer of the tunnel, not a node of the mesh, until a node enrols with that key — which then keeps the address the tunnel had for it. A fresh node never gets an address the tunnel holds. The hub's declaration tells the host which unit to take over; the host's account of carrying it is recorded and shown. Every reader of the range follows the setting; nothing stores it. A found tunnel under another key is recorded and not adopted, so ADR 0100's non-overlap rule keeps applying where a tunnel is left running beside the mesh's. A lab bed and test skeleton for "How it is checked" are under lab/.
51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
# THE HUB ADOPTS THE PREDECESSOR'S TUNNEL (novox/hq ADR 0105). See README.md beside this file.
|
|
#
|
|
# hosting (public)
|
|
# anchor 192.0.2.10 the predecessor's hub: wg0 on udp/51900, 10.10.0.1/24, two peers; then the
|
|
# mesh adopted on it, taking the tunnel over
|
|
# peer-a 192.0.2.20 a predecessor machine reaching a service on the anchor over the tunnel;
|
|
# enrols later and keeps 10.10.0.2
|
|
# peer-b 192.0.2.30 a predecessor machine that never enrols: must notice nothing, ever
|
|
# fresh 192.0.2.40 a new machine: enrols later and gets 10.10.0.4
|
|
#
|
|
# inbound: allow on every machine — the anchor's firewall is the predecessor's, installed by the bed.
|
|
scenario: adopt-the-tunnel
|
|
|
|
segments:
|
|
hosting:
|
|
kind: public
|
|
cidr: [192.0.2.0/24]
|
|
|
|
machines:
|
|
anchor:
|
|
at: { segment: hosting, address: [192.0.2.10] }
|
|
egress: true
|
|
inbound: allow
|
|
memory: 12GiB
|
|
cpus: 6
|
|
disk: 60GiB
|
|
peer-a:
|
|
at: { segment: hosting, address: [192.0.2.20] }
|
|
egress: true
|
|
inbound: allow
|
|
memory: 3GiB
|
|
cpus: 2
|
|
disk: 20GiB
|
|
peer-b:
|
|
at: { segment: hosting, address: [192.0.2.30] }
|
|
egress: true
|
|
inbound: allow
|
|
memory: 2GiB
|
|
cpus: 2
|
|
disk: 15GiB
|
|
fresh:
|
|
at: { segment: hosting, address: [192.0.2.40] }
|
|
egress: true
|
|
inbound: allow
|
|
memory: 3GiB
|
|
cpus: 2
|
|
disk: 20GiB
|
|
|
|
place:
|
|
all: [host, runtime]
|