LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   New DNS Server IP (https://www.linuxquestions.org/questions/linux-newbie-8/new-dns-server-ip-4175516954/)

LYC 08-31-2014 08:05 AM

New DNS Server IP
 
Hi,

Our network team is changing the DNS server IP address. As RedHat 5.2 DNS client, correct me that I just have to change the file /etc/resolve.conf? Any other things I have to do?

Thanks in advance.

wpeckham 08-31-2014 08:38 AM

DNS server address change
 
IFF that is all they change, then the resolv.conf should be the only change you need to make.

NOTE: some of the new systems and networking do not maintain resolv.conf unchanged, they reconstruct it on reboot. (OK, to be correct on network init.) I do not remember if RHEL does that in current versions. I would check the ifup scripts under /etc/sysconfig/network-scripts to see if there is a reference to the old nameserver address there. If there is, I would update that at the same time.

Generally, as long as you change it both places at once, no downtime or other action is involved. The values in /etc/resolv.conf take effect at the very next resolution request, and the ones in the network-scripts take effect the next time the interface is brought up.

Best Practices (if that term has any real meaning outside of 'sales') are to have a secondary and tertiary nameserver (you can list as many as you like in resolv.conf, but the networking only checks the first three, Max). You can promote the secondary to first in the list while they are moving the primary, so there is not even delay at the client during the move while the primary is down. Only you can tell if that applies to your situation.

jpollard 08-31-2014 12:24 PM

On current RH systems, you need to check /etc/sysconfig/network-scripts, AND check /etc/sysconfig/network. Sometimes it seems NetworkManager uses network, other times it seems the entries in network-scripts can override (or vice versa, not sure as I gave up using NetworkManager as it seems to screw up the use of VMs)

Also remember that if you use DHCP for networking configuration (which can be nice) that is configured on the DHCP server. The clients do have to allow DHCP to configure /etc/resolv.conf, but that is frequently the default, so every time the network is initialized it gets reconfigured.

LYC 09-29-2014 09:07 PM

Hi,

After changing /etc/resolv.conf, do I have to run any command to take effect of the changes? How to know it is working?

I checked /etc/sysconfig/network and /etc/sysconfig/network-scripts do not have any hard-code setting of the DNS address.

wpeckham 10-04-2014 06:37 AM

resolv.conf
 
Any change to resolv.conf, by manual editing or by software modification, is effective immediatly. That data is normally not cached, but parsed on every request.

We just changed out two nameservers (one primary, one slave) at work. The process of waiting to get the external world updated to use the new addressses was the painful part. Internally, it did not take long at all. Planned well, a nearly painless process,


All times are GMT -5. The time now is 06:19 PM.