[systemd-devel] Prefix delegation and IPv6 subnetting

Bent Bagger bent.bagger at fern.dk
Sat Jul 9 15:48:44 UTC 2022


Thank you for the comments. They are most helpful.

Contrary to somebody’s belief sub-netting is indeed possible using 
systemd in version 251.1.

Here is what I have achieved so far:

My allocation from my ISP is a generous /48 (as recommended by Ripe) - 
annotated as <PF> in the following. I have configured my main router to 
delegate /56 prefixes to requesting routers so Net0 is delegated this: 
<PF>:e00::/56 as evidenced by the routing tables:

|::1 dev lo proto kernel metric 256 pref medium
<PF>:19::/64 dev enp0s3 proto ra metric 1024 expires 3090sec pref medium
<PF>:e00::/64 dev enp0s8 proto kernel metric 256 expires 874sec pref medium
<PF>:e01::/64 dev enp0s9 proto kernel metric 256 expires 874sec pref medium
unreachable 2a06:4000:8073:e00::/56 dev lo proto dhcp metric 1024 pref 
medium
fe80::/64 dev enp0s8 proto kernel metric 256 pref medium
fe80::/64 dev enp0s3 proto kernel metric 256 pref medium
fe80::/64 dev enp0s9 proto kernel metric 256 pref medium
default via fe80::19 dev enp0s3 proto ra metric 1024 expires 874sec pref 
medium|

Since networkd doesn’t (not yet?) include a DHCP6 server I installed an 
ISC DHCP server on Net0 and configured it to delegate /60 prefixes to 
requesting routers. Also I added this segment to the network file for 
the downstream interface (enp0s8):

|[IPv6SendRA]
Managed=yes
RouterLifetimeSec=1500|

The line ‘Managed=yes’ is crucial in this context. Net2 gets this 
routing table:

|::1 dev lo proto kernel metric 256 pref medium
<PF>:e00::/64 dev enp0s3 proto ra metric 1024 expires 757sec pref medium
<PF>:e80::/64 dev enp0s8 proto kernel metric 256 expires 2519453sec pref 
medium
unreachable <PF>:e80::/60 dev lo proto dhcp metric 1024 pref medium
fe80::/64 dev enp0s8 proto kernel metric 256 pref medium
fe80::/64 dev enp0s3 proto kernel metric 256 pref medium
default via fe80::a00:27ff:fe3a:902b dev enp0s3 proto ra metric 1024 
expires 1440sec pref medium|

Likewise Net3 ends up with this routing table:

|::1 dev lo proto kernel metric 256 pref medium
<PF>:e80::/64 dev enp0s3 proto ra metric 1024 expires 3483sec pref medium
fe80::/64 dev enp0s3 proto kernel metric 256 pref medium
default via fe80::a00:27ff:fed7:6b82 dev enp0s3 proto ra metric 1024 
expires 1083sec pref medium|

Now on to routing. Upstream routing is easy thanks to the default 
routes, but how do I get the downstream routes established? The 
delegating router should add a route for the chosen prefix to the 
requesting router, but can networkd do it or should I start looking at 
routing protocols?

Bent



More information about the systemd-devel mailing list