From 1a91634d5b3b052f1b8586601a10084dbe557ca0 Mon Sep 17 00:00:00 2001 From: riccardom Date: Fri, 16 Oct 2026 11:32:07 +0200 Subject: [PATCH] Move HA routing peer selection to v0.82.0 v0.81.2 was released from the release branch without netbirdio/netbird #7689 and #8192, so the routing peer selection described in How Routing Peers Work and NB_HA_RELAYED_SWITCH_DELAY ship in v0.82.0, not v0.81.1. --- src/pages/client/environment-variables.mdx | 2 +- src/pages/manage/networks/how-routing-peers-work.mdx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/client/environment-variables.mdx b/src/pages/client/environment-variables.mdx index 9b46aa1b..0986e1c2 100644 --- a/src/pages/client/environment-variables.mdx +++ b/src/pages/client/environment-variables.mdx @@ -35,7 +35,7 @@ To clear all saved service parameters (including env vars), run `sudo netbird se | `NB_DISABLE_CUSTOM_ROUTING` | All | Revert to the routing behavior from before exit node support was added. No exclusion routes or fwmark-based socket routing will be used; all dialers and listeners fall back to plain `net.Dial`/`net.Listen`. Routes with a prefix of /7 or larger (e.g. default routes, 0.0.0.0/0) will be rejected. | | `NB_ROUTE_PROTO_FLAG` | macOS, BSD | Set a custom route flag on routes the client adds to the routing table. Accepted values: `2` (RTF_PROTO2) or `3` (RTF_PROTO3); defaults to RTF_PROTO1. Not used on Linux (Linux uses netlink with its own protocol field). | | `NB_DISABLE_ROUTE_CACHE` | Windows | Disable the 2-second cache on Windows routing table lookups. The client reads the OS routing table (via Win32 API) when adding or removing routes; without the cache, each operation triggers a fresh read. Only needed for debugging route conflicts. | -| `NB_HA_RELAYED_SWITCH_DELAY` | All | How long a relayed routing peer keeps a highly available network before the route moves to an equivalent routing peer with a direct connection. Takes a duration (default `30s`), `0` to switch at once, or `never` to keep a routing peer whose direct connection fell back to relayed for as long as it stays connected. Available from v0.81.1. See [Relayed switch delay](/manage/networks/how-routing-peers-work#relayed-switch-delay). | +| `NB_HA_RELAYED_SWITCH_DELAY` | All | How long a relayed routing peer keeps a highly available network before the route moves to an equivalent routing peer with a direct connection. Takes a duration (default `30s`), `0` to switch at once, or `never` to keep a routing peer whose direct connection fell back to relayed for as long as it stays connected. Available from v0.82.0. See [Relayed switch delay](/manage/networks/how-routing-peers-work#relayed-switch-delay). | | `NB_FWMARK_BASE` | Linux | Move the netfilter mark range the client uses (default base `0x1BD00`, covering `0x1BD00`-`0x1BD0FF`). Set this when other software on the host claims bits the NetBird marks use, so its rules act on NetBird traffic. The value is the base of the range, decimal or `0x`-prefixed, and the low byte identifies the individual mark, so it has to be left free: `NB_FWMARK_BASE=0x11000` puts the marks at `0x11000`-`0x110FF`. A value that is zero, larger than 32 bits, or has a bit set in its low byte is rejected with a warning in the log and the default range is used. | Container network plugins, CNIs and other VPNs claim bits of the mark space for themselves. When one of them has a rule matching a bit that a NetBird mark also sets, that rule acts on NetBird traffic, which shows up as traffic being dropped, masqueraded, or routed elsewhere. `NB_FWMARK_BASE` moves the whole NetBird range out of the way. diff --git a/src/pages/manage/networks/how-routing-peers-work.mdx b/src/pages/manage/networks/how-routing-peers-work.mdx index 4d31015d..3ed73475 100644 --- a/src/pages/manage/networks/how-routing-peers-work.mdx +++ b/src/pages/manage/networks/how-routing-peers-work.mdx @@ -103,7 +103,7 @@ Multiple routing peers can serve the same network or route. Each peer that uses The choice is made by the peer that uses the network, not by the routing peers, so what follows depends on the NetBird version of that peer. -This section describes NetBird v0.81.1 and later. Earlier clients move to another routing peer as soon as their connection falls back to relayed, and for latency differences of 10 ms, which resets connections more often with masquerade on. +This section describes NetBird v0.82.0 and later. Earlier clients move to another routing peer as soon as their connection falls back to relayed, and for latency differences of 10 ms, which resets connections more often with masquerade on. ### How a peer picks a routing peer @@ -141,7 +141,7 @@ The delay is set with the `NB_HA_RELAYED_SWITCH_DELAY` [environment variable](/c |---|---| | unset | The default delay of 30 seconds. | | a duration, such as `10s` or `2m` | Keep a relayed routing peer for that long. | -| `0` | Switch at once, as clients before v0.81.1 do. | +| `0` | Switch at once, as clients before v0.82.0 do. | | `never` | Keep a routing peer whose direct connection fell back to relayed for as long as it stays connected. A routing peer that came up relayed still moves after the default delay. | An invalid value is logged as a warning and the default is used.