I have a Linux machine and it seems DNS cache is not getting clear on it. It is still showing old values, even after changing in DNS server by Network team. I did
/etc/init.d/nscd restart
But still it is showing old values on this server.
On my rest of servers in environment, nslookup is showing updated value, so problem is only with this server.
Please advice.
Contrary to the misleading service name, nscd is not really a caching service for DNS. (It caches names resolved via services indicated via nsswitch.conf, including names in /etc/hosts.) First, tell us the "hosts:" entry in /etc/nsswitch.conf. Second, guve us your /etc/resolv.conf file. The first host entry in that file is the most likely origin of your bad DNS entries. If that IP *is* the same host, then tell us which service is running on port 53 ("netstat -anp | grep :53")
This server is a client (Not DNS Server/Slave). Network team has made changes on DNS Server and DNS Slave, thats why when we do
nslookup tldb4t-scan
from any of other server in my environment, output is updated one. But only from this server, it is still showing old values.
Is this making things clear to you ?
Remove this servers' IP addresses from resolv.conf, and further, stop and disable the named service on it. After this, your host will use only the master and slave DNS servers and so should always be accurate.
(If for some reason this presents a peformance issue, then we will look at creating a proper dns caching-resolver on this server.)