The dhclient has "dhcp6.name-servers" string under request in dhclient.conf
In dhclient-script under dhcpv6 section the name servers are being updated in /etc/resolv.conf. The default behaviour of the script is to write the new name-servers to the resolv.conf file overwriting the old contents. The overwriting of this file is not acceptable since it is having nameserver IP updated or used by LTE, ethernet in my testing environment.
So I tried to tweak the script a bit by removing the mv command and appending the dhcp6 name servers using echo command directly to resolv.conf than writing to a temp file.
Within the make_resolv_conf function as the last statement I displayed the content of resolv.conf. I executed the dhclient with - 6 and - v enabled. The client fetched the the new ip and print shows the nameserver is appended(cat /etc/resolv.conf)
By default the /etc/resolv.conf content was
The print (cat /etc/resolv.conf) showed the content as
Once the dhclient stops successfully I opened the resolv.conf and the new servers were missing. It is having default IPs. What could be the reason for this behaviour.?
Who is refreshing the /etc/resolv.conf. I checked the dhclient-script but couldn't find any clue for this.
To confirm no other process updates the file, I killed the LTE process but the result was same. Other than dhclient-script how the resolv.conf is getting overwritten all the time? What am I missing?
Any help would be much appreciated
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.