Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

(1) Stack Info

DNS Server

  • CentOS 5.6 64bit running dnsmasq 2.45 on IP 10.9.8.2.
  • Serving as DNS-Only Server using it's local /etc/hosts. /etc/resolv.conf on this machine has

Router

  • Draytek Vigor 2910G configured as DHCP Server and using 10.9.8.2, 8.8.8.8 as default DNS Server
  • (Assigning DHCP IP range served 10.9.8.*)

Network client with Problem

  • iMac with OS X Lion 10.7.4 with Ethernet DNS on "autoconfig", i.e. 10.9.8.2, 8.8.8.8 are shown as grey entries in DNS

All other local machines (webservers, etc) have fixed IPs 10.9.8.xx. Unix and Windows machines do not experience the problem.

(2) config files

dnsmasq machine /etc/resolv.conf

search lan
nameserver 8.8.8.8
nameserver 8.8.4.4

dnsmasq machine /etc/hosts (only the entry for idevsrv)

10.9.8.2        idevsrv idevsrv.lan

OS X Lion /etc/resolv.conf

nameserver 10.9.8.2
nameserver 8.8.8.8

(3) Observations

Irregularly and currently irreproducible, name resolving for local servers (named by dnsmasq) via mDNSResponder works and then works not.

Tools using mDNSResponder, like ping, browsers, subversion cannot resolve a hostname, while dig (not using mDNSResponder) works. Using 'dscacheutil -flushcache' gets ping working again, yet I cannot predict when it will stop working again:

$ ping idevsrv
ping: cannot resolve idevsrv: Unknown host

$ dig idevsrv

; <<>> DiG 9.7.3-P3 <<>> idevsrv
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24510
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;idevsrv.           IN  A

;; ANSWER SECTION:
idevsrv.        0   IN  A   10.9.8.2

;; Query time: 9 msec
;; SERVER: 10.9.8.2#53(10.9.8.2)
;; WHEN: Tue Jun 19 16:33:37 2012
;; MSG SIZE  rcvd: 41

$ dscacheutil -flushcache
$ ping idevsrv
PING idevsrv (10.9.8.2): 56 data bytes
64 bytes from 10.9.8.2: icmp_seq=0 ttl=64 time=0.310 ms

I have several servers including servers that need constant availability of hostnames (e.g. web, subversion) so constant availability is greatly appreciated by the team:)

After searching the web for hours I still did not find any useful information that goes further than flushing the dns cache which does not suffice.

(4) Question(s)

(in order of benefit:)

  • How could I avoid the disconnect? (but stil use my local dnsmasq dns server:)
  • How might I identify the reason for the disconnection?
  • If you have better search terms than the usual suspects, please paste your search url :)

Many thanx in advance!

Note: this question is moved from stackoverflow to this site.

share|improve this question
    
New info: dscacheutil -flushcache does not always remedy the problem! $ dscacheutil -flushcache $ ping ctf611 ping: cannot resolve ctf611: Unknown host –  Volker Jun 22 '12 at 12:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.