1842069 Members
1675 Online
110186 Solutions
New Discussion

/etc/resolv.conf issue

 
SOLVED
Go to solution
Javed Khan_1
Valued Contributor

/etc/resolv.conf issue

Hi All,
I am facing a strange problem with resolver on hp unix .
I have three dns server mentioned in the my resolv.conf

Today i had a problem with my first dns server and it was not reachable.This case my system was unable to resolv ip addresses perhpas it took 5 min time to direct resolver to 2nd dns server .

How can i make resolver to go to second dns server in case first dns server is not available without retrying for first server ..

Thx
Never Give Up
8 REPLIES 8
whiteknight
Honored Contributor

Re: /etc/resolv.conf issue

Javed,

Example:-

# more /etc/resolv.conf
domain mys.xx.com
search mys.xx.com
nameserver 16.110.135.51
nameserver 16.110.135.52


WK
please assign points
Problem never ends, you must know how to fix it
Javed Khan_1
Valued Contributor

Re: /etc/resolv.conf issue

hello,
what exactly i need is how to reduce timeout between first and second dns server retry .

if first dns server is not available i want my resolver to go to second server immediately without waiting for first dns server to come up.
Never Give Up
AwadheshPandey
Honored Contributor
Solution

Re: /etc/resolv.conf issue

use retry and retrans
domain xxxx.yy.com
nameserver 164.129.225.119
nameserver 164.129.225.149
nameserver 164.129.225.229
search xxxx.yy.com
retry 3
retrans 300

see man resolv.conf for details
It's kind of fun to do the impossible
Javed Khan_1
Valued Contributor

Re: /etc/resolv.conf issue

I think i found it ..
by setting veriable RES_RETRY=1
so that mean my system will try first dns server for 5 sec then goes to second ..

Never Give Up
Wim Rombauts
Honored Contributor

Re: /etc/resolv.conf issue

What you face is TCP transmission timeout and has nothing to do with DNS.

Your system sends a request to the DNS server, but since the primary DNS server is dead, the request goes nowhere and the TCP stack keeps waiting for the reply until it times out.
If the DNS-server itself would have been up, while only the DNS service was down, you would get a "connection refused" immediately and fallback immediately to the second DNS server.

The only solution is some clustering functionality that picks-up the IP-address of the DNS server on a second system as sson as the primary DNS system no longer responds. This way the IP-adress remains available and DNS-requests allways get a "connection refused" instead of going nowhere.
Prasanth V Aravind
Trusted Contributor

Re: /etc/resolv.conf issue

could you check /etc/nsswitch.conf for this
dirk dierickx
Honored Contributor

Re: /etc/resolv.conf issue

you could take a look at the 'UNAVAIL' option for the nsswitch.conf file.

it is used as 'NOTFOUND', but this will react when the dns server is unavailable.

check the manpage for resolv.conf for more infos.
Javed Khan_1
Valued Contributor

Re: /etc/resolv.conf issue

issue closed by adding retry 1 in /etc/resolv.conf which is quite ok try first dns server for 5 sec , timeout go to second one
Thx for all valuable reply
Never Give Up