nikdoof.com

/posts/ 2026/debian-and-threads

Debian, Matter/Thread, and dhcpcd

Jan 26, 2026

#debian#thread#matter#dhcpcd#homelab

Threads is a protcol under the Matter ecosystem, and at its core it is a dressed up version of Zigbee made to handle IPv6 over the air rather than the odd device protocol. With that change controllers become border routers that can route traffic between the Thread network and the rest of your IP network, making the whole system quite accessible and easy to work with, but can present some challenges when it comes to support in operating systems.

I noticed an issue today that a newly installed Debian 13 system seemed to be switching routes to the Thread network every few seconds, the border routers use IPv6 Router Advertisements to inform devices on the rest of network how to route traffic to the Thread network, and it is possible to have multiple border routers on the same network advertising the same routes. IPv6 can handle this natively, but its not a common configuration in most basic home networks.

Jan 26 16:54:19 matter dhcpcd[755]: ens192: deleting route to 2001:8b0:bd9:300::/64 via fe80::100a:e673:2904:fc34
Jan 26 16:54:35 matter dhcpcd[755]: ens192: adding route to 2001:8b0:bd9:300::/64 via fe80::b6:a70f:687d:a283
Jan 26 16:55:13 matter dhcpcd[755]: ens192: changing route to 2001:8b0:bd9:300::/64 via fe80::cc0:cf81:a3a6:f9e5
Jan 26 16:56:21 matter dhcpcd[755]: ens192: changing route to 2001:8b0:bd9:300::/64 via fe80::832:f689:7ba8:2762
Jan 26 16:56:38 matter dhcpcd[755]: ens192: changing route to 2001:8b0:bd9:300::/64 via fe80::100a:e673:2904:fc34
Jan 26 16:57:36 matter dhcpcd[755]: ens192: changing route to 2001:8b0:bd9:300::/64 via fe80::b6:a70f:687d:a283
Jan 26 16:58:13 matter dhcpcd[755]: ens192: changing route to 2001:8b0:bd9:300::/64 via fe80::cc0:cf81:a3a6:f9e5
Jan 26 16:59:21 matter dhcpcd[755]: ens192: changing route to 2001:8b0:bd9:300::/64 via fe80::832:f689:7ba8:2762
Jan 26 16:59:38 matter dhcpcd[755]: ens192: changing route to 2001:8b0:bd9:300::/64 via fe80::100a:e673:2904:fc34
Jan 26 17:00:36 matter dhcpcd[755]: ens192: changing route to 2001:8b0:bd9:300::/64 via fe80::b6:a70f:687d:a283
Jan 26 17:01:14 matter dhcpcd[755]: ens192: changing route to 2001:8b0:bd9:300::/64 via fe80::cc0:cf81:a3a6:f9e5
Jan 26 17:01:23 matter dhcpcd[755]: ens192: deleting route to 2001:8b0:bd9:300::/64 via fe80::cc0:cf81:a3a6:f9e5
Jan 26 17:02:22 matter dhcpcd[755]: ens192: adding route to 2001:8b0:bd9:300::/64 via fe80::832:f689:7ba8:2762
Jan 26 17:02:39 matter dhcpcd[755]: ens192: changing route to 2001:8b0:bd9:300::/64 via fe80::100a:e673:2904:fc34

By default, Debian 13 configures dhcpcd to manage network interfaces, and it listens for these Router Advertisements and updates the routing table accordingly, but with multiple border routers present, this leads to constant changes in the routing table as dhcpcd switches between the different advertised routes rather than adding them as alternatives. While it doesn’t present any obvious issues you can end up in a situation where traffic meant for the Thread network is being routed inconsistently, leading to potential connectivity problems for any applications that use Thread devices. In my case, I have configured matterbridge to bridge between my legacy Zigbee network and my Thread network, so I want to make sure its working correctly.

The solution, for me, was to switch to using systemd-networkd.

First, you want to disable interfaces by moving /etc/network/interfaces to another location

$ sudo mv /etc/network/interfaces /etc/network/interfaces.bak

Then you want to create a new network configuration file for your interface, in my case ens192, at /etc/systemd/network/20-ens192.network with the following content:

[Match]
Name=ens192
Type=ether

[Network]
DHCP=yes
IPv6AcceptRA=yes
IPv6PrivacyExtensions=no

Then, enable systemd-networkd and restart:

$ sudo systemctl enable systemd-networkd
$ reboot

After the reboot you can confirm that the routes are being handled correctly using ip

$ ip -6 route 
...
2001:8b0:bd9:300::/64 nhid 804849157 via fe80::cc0:cf81:a3a6:f9e5 dev ens192 proto ra metric 1024 expires 1700sec pref medium
2001:8b0:bd9:300::/64 nhid 3136661745 via fe80::b6:a70f:687d:a283 dev ens192 proto ra metric 1024 expires 1767sec pref medium
2001:8b0:bd9:300::/64 nhid 814653632 via fe80::832:f689:7ba8:2762 dev ens192 proto ra metric 1024 expires 1700sec pref medium
2001:8b0:bd9:300::/64 nhid 1712347215 via fe80::100a:e673:2904:fc34 dev ens192 proto ra metric 1024 expires 1791sec pref medium