Send dhcp-users mailing list submissions to dhcp-users@lists.isc.org
To subscribe or unsubscribe via the World Wide Web, visit https://lists.isc.org/mailman/listinfo/dhcp-users or, via email, send a message with subject or body 'help' to dhcp-users-requ...@lists.isc.org You can reach the person managing the list at dhcp-users-ow...@lists.isc.org When replying, please edit your Subject line so it is more specific than "Re: Contents of dhcp-users digest..." Today's Topics: 1. Debian Buster dhclient v6 overwrites resolv.conf with prepend domain_name_servers (d...@biblestuph.com) 2. Re: Debian Buster dhclient v6 overwrites resolv.conf with prepend domain_name_servers (Rudy Zijlstra) ---------------------------------------------------------------------- Message: 1 Date: Sat, 18 Sep 2021 14:44:40 -0400 From: d...@biblestuph.com To: dhcp-users@lists.isc.org Subject: Debian Buster dhclient v6 overwrites resolv.conf with prepend domain_name_servers Message-ID: <1cba524d-8e5e-4475-1eb5-ec10db105...@biblestuph.com> Content-Type: text/plain; charset=utf-8; format=flowed My Debian Buster AWS instance runs two copies of dhclient (isc-dhclient-4.4.1), one for -4 and one for -6. I wanted to prepend my localhost 127.0.0.1 to the nameservers written to resolv.conf, so I uncommented this line in dhclient.conf: prepend domain-name-servers 127.0.0.1; but instead of prepending, on the first execution after boot I get _only_ the localhost in the resolv.conf, nothing else. It's not the worse thing in the world as the next RENEW rewrites it with the fully correct values, but it's missing some intended values until then. (And later RENEW6 calls won't update, see the logic snippet below.) Troubleshooting I found that on boot the v6 instance was overwriting the resolv.conf written by the v4 instance; I.E., the v4 dhclient-script instance gets (verified by the debug hook) BOUND, new_domain_name, and new_domain_name_servers, the last with my 127.0.0.1 in front as I expect, and therefore writes the resolv.conf as expected. But then it is immediately followed by a BOUND6 call from the v6 instance, which _also_ gets new_domain_name_servers but with _only_ the localhost entry and no new_domain_name. As a result, this logic in dhclient-script gets tripped: # update /etc/resolv.conf if [ "${reason}" = BOUND6 ] || [ "${new_dhcp6_name_servers}" != "${old_dhcp6_name_servers}" ] || [ "${new_dhcp6_domain_search}" != "${old_dhcp6_domain_search}" ]; then make_resolv_conf fi and make_resolv_conf rewrites per this logic: # DHCPv4 if [ -n "$new_domain_search" ] || [ -n "$new_domain_name" ] || [ -n "$new_domain_name_servers" ]; then So ... is this a known issue, and/or is there a graceful work around? Thank you! Dan ------------------------------ Message: 2 Date: Sat, 18 Sep 2021 21:43:48 +0200 From: Rudy Zijlstra <r...@grumpydevil.homelinux.org> To: dhcp-users@lists.isc.org Subject: Re: Debian Buster dhclient v6 overwrites resolv.conf with prepend domain_name_servers Message-ID: <c4ae8b33-6f4e-b4cd-dbfe-638cbbec8...@grumpydevil.homelinux.org> Content-Type: text/plain; charset=utf-8; format=flowed Hi On 18-09-2021 20:44, d...@biblestuph.com wrote: > My Debian Buster AWS instance runs two copies of dhclient > (isc-dhclient-4.4.1), one for -4 and one for -6. I wanted to prepend > my localhost 127.0.0.1 to the nameservers written to resolv.conf, so I > uncommented this line in dhclient.conf: > > prepend domain-name-servers 127.0.0.1; I would suggest to run the two instances with each their own config file. In the v6 version do not use the prepend statement Cheers Rudy ------------------------------ Subject: Digest Footer _______________________________________________ ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. dhcp-users mailing list dhcp-users@lists.isc.org https://lists.isc.org/mailman/listinfo/dhcp-users ------------------------------ End of dhcp-users Digest, Vol 155, Issue 7 ******************************************