System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

server is unable to resolve secondary dns server

 
shikhar_1
Regular Advisor

server is unable to resolve secondary dns server

Hi,

 

Can anyone please let me know that how the server automatically use secondary dns serevr from resolv.conf once primary dns server is down?

 

#-> cat /etc/resolv.conf
search na.jnj.com rar.ncsus.jnj.com ncsus.jnj.com backup.ncsus.jnj.com

nameserver 10.35.34.86 <--- Currently it is down state

nameserver 10.35.34.85
nameserver 10.28.10.15
retrans 500
retry 4
[root@cpctmsp1:/.root]#
#-> cat /etc/nsswitch.conf
#
# /etc/nsswitch.files:
#
# @(#)B.11.31_LR
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any name services.
#
passwd: centrifydc        files
group: centrifydc         files
hosts:        files [NOTFOUND=continue TRYAGAIN=continue UNAVAIL=continue] dns
services:     files
networks:     files
protocols:    files
rpc:          files
publickey:    files
netgroup:     files
automount:    files
aliases:      files
[root@cpctmsp1:/.root]#

nameserver 10.35.34.86 <--- Currently it is down state but still the server is not able to resolve secondary dns server.

You can see the nsswtich.conf enrty also.

 

Please reply

3 REPLIES
Matti_Kurkela
Honored Contributor

Re: server is unable to resolve secondary dns server

The description can be found on your system by entering the command "man 4 resolver".

 

The system will send a query to the first server and wait for an answer for <retrans> milliseconds. If there is no answer, the system will resend the query to the second server and wait again. The system will cycle through all three servers in this way, until it has made a total of <retry> retries.

 

I see you have reduced the retrans value by a factor of 10x: the default retrans value is 5000 milliseconds (i.e 5 seconds). Although you've also listed the retry value explicitly, it is the same as the default value.

 

 What is the output if you run these commands:

dig -x 10.35.34.85 @10.35.34.85

dig -x 10.28.10.15 @10.28.10.15

 

MK
shikhar_1
Regular Advisor

Re: server is unable to resolve secondary dns server

[root@cpctmsp1:/.root]#
#-> dig -x 10.35.34.85 @10.35.34.85

; <<>> DiG 9.3.2 <<>> -x 10.35.34.85 @10.35.34.85
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1766
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;85.34.35.10.in-addr.arpa.      IN      PTR

;; ANSWER SECTION:
85.34.35.10.in-addr.arpa. 1800  IN      PTR     itsusraipa01p.na.jnj.com.

;; Query time: 1 msec
;; SERVER: 10.35.34.85#53(10.35.34.85)
;; WHEN: Wed Jun 27 03:10:17 2012
;; MSG SIZE  rcvd: 80

[root@cpctmsp1:/.root]#
#-> dig -x 10.28.10.15 @10.28.10.15

; <<>> DiG 9.3.2 <<>> -x 10.28.10.15 @10.28.10.15
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 668
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;15.10.28.10.in-addr.arpa.      IN      PTR

;; ANSWER SECTION:
15.10.28.10.in-addr.arpa. 1800  IN      PTR     DNS4.na.jnj.com.

;; Query time: 2 msec
;; SERVER: 10.28.10.15#53(10.28.10.15)
;; WHEN: Wed Jun 27 03:10:46 2012
;; MSG SIZE  rcvd: 71

 

Now i have changed the entries in resolv.conf and it is working with the nameserver whic is on the top of resolv.conf. Still my query is that why it is not taking secondary dns entry from resolv.conf

 

#-> cat /etc/resolv.conf
search na.jnj.com rar.ncsus.jnj.com ncsus.jnj.com backup.ncsus.jnj.com
nameserver 10.35.34.85
nameserver 10.35.34.86
nameserver 10.28.10.15
retrans 500
retry 4


praju
Occasional Contributor

Re: server is unable to resolve secondary dns server

Hi Shi,

Ps -ef |grep -i named ... ?

Pr@ju!