[systemd-devel] Why is default route scope RT_SCOPE_UNIVERSE?

Daniel Wang wonderfly at google.com
Tue May 16 16:51:56 UTC 2017


I'd like to understand the rational behind defaulting to scope universe
instead of scope link.
https://github.com/systemd/systemd/blob/master/src/network/networkd-route.c#L71

I have a NIC configured through DHCP. The DHCP server sends two routes, one
to the router, and the other to the rest of the LAN:

# cat leases/3 | grep ROUTES
ROUTES=192.168.0.1/32,0.0.0.0 192.168.0.0/24,192.168.0.1

systemd was able to add the first route, as this:

# ip route show
192.168.0.1 dev eth1 proto dhcp metric 1024

And it failed to add the second, getting error "Network is unreachable". I
think the kernel rejects it because it _doesn't know how to reach the
router_, in this case 192.168.0.1, as I read somewhere that the route has
to be configured link local.

I understand that systemd is smart enough to add a link local route to the
router, _if the router IP is included in the DHCP lease_. Unfortunately my
DHCP server doesn't do so, and I don't see any RFC mandates that.

I am trying to see if we can update our server implementation, but on the
other hand I'd like to understand why systemd chose RC_SCOPE_UNIVERSE as
its default?

-- 
Best,
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170516/d11b1498/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4849 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170516/d11b1498/attachment.bin>


More information about the systemd-devel mailing list