The file /etc/dhcp/dhclient-enter-hooks.d/resolved
provided by systemd (242-7ubuntu3) causes the dhclient failing to get DNS due to systemd-resolved is not run.
This issue can be reproduced on Ubuntu Eoan:
==============================
root@eoan:~# dhclient -v
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/ens224/00:0c:29:92:d4:da
Sending on LPF/ens224/00:0c:29:92:d4:da
Listening on LPF/ens192/00:0c:29:92:d4:d0
Sending on LPF/ens192/00:0c:29:92:d4:d0
Listening on LPF/ens160/00:0c:29:92:d4:c6
Sending on LPF/ens160/00:0c:29:92:d4:c6
Sending on Socket/fallback
DHCPDISCOVER on ens224 to 255.255.255.255 port 67 interval 3 (xid=0x6d9fb33d)
DHCPDISCOVER on ens192 to 255.255.255.255 port 67 interval 3 (xid=0xeb8fda26)
DHCPREQUEST for 192.168.120.4 on ens160 to 255.255.255.255 port 67 (xid=0x6d39545d)
DHCPACK of 192.168.120.4 from 192.168.120.254 (xid=0x5d54396d)
RTNETLINK answers: File exists
d41d8cd98f00b204e9800998ecf8427e /run/systemd/resolved.conf.d/isc-dhcp-v4-ens160.conf
md5sum: /run/systemd/resolved.conf.d/isc-dhcp-v6-ens160.conf: No such file or directory
5025823d750dda1f3f15e306c4a0afce /run/systemd/resolved.conf.d/isc-dhcp-v4-ens160.conf
md5sum: /run/systemd/resolved.conf.d/isc-dhcp-v6-ens160.conf: No such file or directory
bound to 192.168.120.4 -- renewal in 111 seconds.
root@eoan:~# resolvectl status |grep DNS
MulticastDNS setting: no
DNSOverTLS setting: no
DNSSEC setting: no
DNSSEC supported: no
DNSSEC NTA: 10.in-addr.arpa
MulticastDNS setting: no
DNSOverTLS setting: no
DNSSEC setting: no
DNSSEC supported: no
MulticastDNS setting: no
DNSOverTLS setting: no
DNSSEC setting: no
DNSSEC supported: no
MulticastDNS setting: no
DNSOverTLS setting: no
DNSSEC setting: no
DNSSEC supported: no
==============================
Attached please find the patch for this. The output for md5sum in the hook file resolv should separate the stdout and stderr so it won't compare the wrong data.
The file /etc/dhcp/ dhclient- enter-hooks. d/resolved ======= ======= ======= == /www.isc. org/software/ dhcp/
provided by systemd (242-7ubuntu3) causes the dhclient failing to get DNS due to systemd-resolved is not run.
This issue can be reproduced on Ubuntu Eoan:
=======
root@eoan:~# dhclient -v
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https:/
Listening on LPF/ens224/ 00:0c:29: 92:d4:da 00:0c:29: 92:d4:da 00:0c:29: 92:d4:d0 00:0c:29: 92:d4:d0 00:0c:29: 92:d4:c6 00:0c:29: 92:d4:c6 4e9800998ecf842 7e /run/systemd/ resolved. conf.d/ isc-dhcp- v4-ens160. conf resolved. conf.d/ isc-dhcp- v6-ens160. conf: No such file or directory f3f15e306c4a0af ce /run/systemd/ resolved. conf.d/ isc-dhcp- v4-ens160. conf resolved. conf.d/ isc-dhcp- v6-ens160. conf: No such file or directory ======= ======= ======= ==
Sending on LPF/ens224/
Listening on LPF/ens192/
Sending on LPF/ens192/
Listening on LPF/ens160/
Sending on LPF/ens160/
Sending on Socket/fallback
DHCPDISCOVER on ens224 to 255.255.255.255 port 67 interval 3 (xid=0x6d9fb33d)
DHCPDISCOVER on ens192 to 255.255.255.255 port 67 interval 3 (xid=0xeb8fda26)
DHCPREQUEST for 192.168.120.4 on ens160 to 255.255.255.255 port 67 (xid=0x6d39545d)
DHCPACK of 192.168.120.4 from 192.168.120.254 (xid=0x5d54396d)
RTNETLINK answers: File exists
d41d8cd98f00b20
md5sum: /run/systemd/
5025823d750dda1
md5sum: /run/systemd/
bound to 192.168.120.4 -- renewal in 111 seconds.
root@eoan:~# resolvectl status |grep DNS
MulticastDNS setting: no
DNSOverTLS setting: no
DNSSEC setting: no
DNSSEC supported: no
DNSSEC NTA: 10.in-addr.arpa
MulticastDNS setting: no
DNSOverTLS setting: no
DNSSEC setting: no
DNSSEC supported: no
MulticastDNS setting: no
DNSOverTLS setting: no
DNSSEC setting: no
DNSSEC supported: no
MulticastDNS setting: no
DNSOverTLS setting: no
DNSSEC setting: no
DNSSEC supported: no
=======
Attached please find the patch for this. The output for md5sum in the hook file resolv should separate the stdout and stderr so it won't compare the wrong data.