Operating System - HP-UX
1833300 Members
3036 Online
110051 Solutions
New Discussion

Re: HP UNIX 11.0 constantly looking up DNS addresses

 
Don Jessen
Occasional Contributor

HP UNIX 11.0 constantly looking up DNS addresses

We are on HP Unix 11.0 - our network person found that our UNIX is constantly looking up the dns address from the dns server.
He seems to think there should be a UNIX parameter to keep the DNS address in memory, and not go to the DNS server. From his pint of view there is a "time to live" parameter that is set to 3600 seconds, and UNIX should look up the address only once every 3600 seconds (1 Hour). We are going to the DNS server to look it up over 150 times in a 30 second trace.
It seems that UNIX is overriding his "time to live" parameter.
Any ideas?
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor

Re: HP UNIX 11.0 constantly looking up DNS addresses

TTL is a concept which applies to DNS servers rather than clients. It is perfectly normal for many hostname lookups to be done. Normally, to take some of the load off of DNS servers, caching-only servers are set up and the clients query these.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: HP UNIX 11.0 constantly looking up DNS addresses

By the way, if this is a box that is doing all of these lookups (and you think this is bad), you might consider making this box a caching-only DNS server and thus let it resolve these hostnames locally. Huge numbers of hostname lookups are common on boxes which are serving as Opevview Operations or Data Protector servers. It's also possible that you have some scripts that are doing tons of hostname lookups (e.g. netstat) and these are the real problem.


If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: HP UNIX 11.0 constantly looking up DNS addresses

I should also give you a plan B. If you find that you are actually resolving hostnames very often on but a few hosts then a good approach is to put these hosts in /etc/hosts and adjust /etc/nsswitch.conf to first search FILES then DNS if not found. This will also make your box a bit more robust in that it will still function if DNS is lost. This does assume that your hostname/IP address tuples remain essentially constant over time.
If it ain't broke, I can fix that.
rick jones
Honored Contributor

Re: HP UNIX 11.0 constantly looking up DNS addresses

The TTL in a DNS entry is advisory - that is to say it says - go ahead and cache this if you like, but don't keep it for any longer than the TTL.

As already pointed-out, the resolver library in HP-UX does not implement a cache, and if you want to simulate the presence of a cache you should configure and run a caching-only DNS server on that system.
there is no rest for the wicked yet the virtuous have no pillows