networkd dhcp client generic options
Add Reply
Sebastian Unger
2018-01-29 20:07:49 UTC
Raw Message

I have tried to find an answer to this using the usual sources, but have
come up empty so far. Hopefully someone here can help me. If this is not
the best place, please let me know where that would be.

I've been managing a number of Ubuntu machines (~60) for several years now
and am currently preparing the upgrade from 16.04 to 18.04 (using 17.10

One of the many changes is the migration from ifupdown to netplan/networkd,
at least for the server machines. The desktop install still seems to use
network-manager by default. This is causing me a bit of a head-ache.

In 16.04 we had a number of scripts in /etc/dhclient hooks as well as in
/etc/network/if-up.d. Obviously these do not work any more with networkd. I
understand why networkd does not use the if-up scripts and does not like
scripts in general. However, for the /etc/dhclient scripts, I can see no
way to achieve the same functionality that is currently available.

For example, samba installs a script into /etc/dhclient to get the WINS
server from DHCP and update its own dynamic config so that it can use that.
How would one go about achieving this with networkd?

I have read suggestions on the internet to put an inotify on
/run/systemd/netif/* and process the information when it changes. That
strikes me as a bad idea on many levels (i.e. the files themselves contain
warnings not to do that), but for WINS that isn't even a solution since
networkd does not appear to store the received value for option 44 in there.


Q1: Is there any way to get the networkd DHCP client to ask for and record
more options than just the bare IPv4/6 necessities?
Q2: What is the "official" way to get these options out of networkd for use
by the parts of the system that need them?
Q3: If the answers to the two above are something like: No and None, then
is there a way to integrate networkd with an external DHCP client?