1823472 Members
2322 Online
109660 Solutions
New Discussion юеВ

resolv.conf and dhcp

 
Rick King_2
New Member

resolv.conf and dhcp

My hpux11 machine at home is connected to the internet via dhcp. Whenever the machine reboots it rewrites the /etc/resolv.conf file.

Is there anyway to prevent the resolv.conf file from being rewritten?
3 REPLIES 3
Patrick Wallek
Honored Contributor

Re: resolv.conf and dhcp

What is changing in it when it is rewritten?

I would check through the startup scripts in /sbin/init.d and see if there is one there that is doing anything to the resolv.conf file.
T G Manikandan
Honored Contributor

Re: resolv.conf and dhcp

This can also happen when you are requesting dhcp for a ipaddress and that network ip defaults to a specified DNS server on that network.

For example your server is receiving a dhcp address as
172.16.3.45 and the dns on this particular network is somewhat like 172.16.1.21 then this could be the result.

I would suggest checking the dhcp server whether it is pointing out to a particular dns
Rajeev  Shukla
Honored Contributor

Re: resolv.conf and dhcp

This is the feature of DHCP client. The resolv.conf is overwritten when the machine is booting. This is a dynamic file in DHCP client and picksup the nameserver information from the DHCP server and updates its resolv.conf entry.
I only way to prevent this overwritting is write a rc script which runs in the end and copies your own resolv.vonf to /etc/resolv.conf

Rajeev