Wiki-UX / How to configure DNS client
Jump to: navigation, search

How to configure DNS client



This article explains how to configure a UNIX system (HP-UX, LINUX) domain name client service.

Configure DNS time outs

To setup the time frame that the server is going to wait before it attempt to query the alternative DNS servers in the DNS server list on /etc/resolv.conf. The resolv.conf file manpage (# man 4 resolv.conf) turns to be ambiguous but the procedure is very simple.

An usual case for this situation is an enviroment where the web application server has 2 or more DNS servers that can be query. If the primary DNS server doesn't respond, the server will be waiting for a long time until it attempt to query the second server. In real life this means you can lose a client because the web form is not responding fast enough.

The way to reduce the time is adjust the /etc/resolv.conf file.

Original file:

-> /etc/resolv.conf 

You only need to add two more entries at the end of the file.

Updated file:

-> /etc/resolv.conf
retrans 5000
retry 1

It means that the server is going to wait 5 seconds (retrans) before it attempt to query the second DNS server, and it's going to query the current DNS server only one time (retry).

You may want to verify the new configuration by issuing the nslookup command

# nslookup
NOTE: There is a know bug on HPUX 11i v2 (11.23). Nslookup command reads the retrans value in seconds instead of miliseconds as document on the manpage. Install patch PHNE_37548 to correct this behaviour.



This page was last modified on 31 July 2010, at 05:31. This page has been accessed 3,788 times.