It's just a quick tips rather than an article, anyway, and you won't need to touch it unless there is DNS nameserver change or newly setup.
Basically, what DNS lookup does is when an application brower or any network connection go over network, it makes a request which requires a DNS lookup, such programs send a resolution request to the local DNS resolver in the local operating system, which in turn handles the communications required.
On Linux, it is configured in /etc/resolv.conf file.
# cat /etc/resolv.conf
search fibrevillage.com fibrevillage.com. ## fibrevillage.com. means any subdomains if you have
Use your own nameserver ips in your working environment of course.
Here are mostly used 3 options:
nameserver Name server IP address
domain Local domain name
search Search list for host-name lookup
Other two are less used:
This option allows addresses returned by gethostbyname(3) to
be sorted. A sortlist is specified by IP-address-netmask
pairs. The netmask is optional and defaults to the natural
netmask of the net. The IP address and optional network pairs
are separated by slashes. Up to 10 pairs may be specified.
Here is an example:
sortlist 126.96.36.199/255.255.240.0 188.8.131.52
Options allows certain internal resolver variables to be
Internal resolver variables of options
The syntax is
options option ...
‘timeout’ sets the amount of time the resolver will wait for a response from a remote name server before retrying the query via a different name server. In secs, default is 5.
sets the number of times the resolver will send a query to its name servers before giving up and returning an error to the calling application.
‘rotate’ sets RES_ROTATE in _res.options, which causes round robin selection of nameservers from among those listed.
Note: If your name servers are not identificatly same, for example, nameserver #1 is for one subdomain, while server #2 is for the other subdomain, then rotate may not be the ideal option to play with
Check out more options in http://man7.org/linux/man-pages/man5/resolver.5.html