Repository navigation
Knoten v0.3.2-alpha
Pre-release
Pre-release
Self-assigned IPv6 addresses, in-memory coordination server
The coordination server no longer hands out addresses. Every machine works out its own IPv6 address from its mesh name, its subnet and its public key. The server is now a small in-memory service with no database. Several meshes can share one server, subnets decide which peers a machine accepts, and a new only mark limits the tunnel to the peers you choose.
New
IPv6 addresses each machine computes itself
- Each address is built from three parts: the mesh name, the subnet and the public key.
- Any machine can compute any peer's address from that peer's key and subnet. The server is not involved.
meshdlogs the machine's address at startup, andmeshd -setupprints it at the end.
Meshes
- New required setting
mesh. Machines in the same mesh share the first 48 bits of their addresses. - Several meshes can use the same coordination server: a machine ignores peers from any other mesh.
Subnets
- New setting
subnet: this machine's subnet. Setup usesglobalif you skip the question. - New setting
accept_subnets: the subnets whose peers this machine uses.["*"]accepts all of them, and leaving it empty accepts only the machine's own subnet. - Peers whose subnet isn't accepted are left out of the tunnel, and the log says so.
"only": true on peers
- Put it on any
staticorsyncedpeer. While at least one peer is marked, the tunnel contains only the marked peers. Every other peer stays in the file but out of the tunnel, and that includes new ones from the server. - Only you can set or clear the mark. The server can't.
meshdkeeps it onsyncedpeers across server updates. - If the server drops a marked
syncedpeer, its line and its mark go with it, and once no marked peer is left, every peer is back in the tunnel. For a limit that can't lift on its own, mark astaticpeer. - A
blockedpeer can't be marked.
synced peers work without a server
- Without
server_url,syncedpeers are now used as written instead of being ignored. Nothing updates them, so edits to their lines take effect.
Coordination server rebuilt, in memory
- No database and no files. A restart loses nothing, because machines announce themselves again on their next sync.
- A machine's first sync is how it joins. There is no separate registration step.
- A machine that stays silent longer than
-peer-timeout(default 90s) is dropped.
Changed
- Setup asks for the mesh name and this machine's subnet instead of an IPv4 address. For each peer it asks for the subnet instead of AllowedIPs.
mtumust now be at least1280, the IPv6 minimum.- Peers in
meshd.jsonhave asubnetinstead ofallowed_ips.
Removed
- The
addresssetting and the server-assigned IPv4 range10.10.0.0/16. - The
allowed_ipsfield on peers. - The
/v1/register,/v1/syncand/v1/healthendpoints. The only endpoint now is/v2/sync. - The coordserver
-dbflag and the SQLite database. This also removesmodernc.org/sqlite.