Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

we have a Centos machine called jupiter, on which I have installed bind9,

On every other machine the DNS is set to be the IP address of jupiter (192.168.2.101), as you can see in the output of the following command in windows

>ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : mypcs
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Broadcom NetXtreme 57xx Gigabit Controller
   Physical Address. . . . . . . . . : 00-1A-A0-AC-E4-CC
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::c16d:3ae4:5907:30c4%8(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.2.98(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Thursday, September 20, 2012 10:26:11 AM
   Lease Expires . . . . . . . . . . : Sunday, September 23, 2012 10:26:10 AM
   Default Gateway . . . . . . . . . : 192.168.2.1
   DHCP Server . . . . . . . . . . . : 192.168.2.1
   DHCPv6 IAID . . . . . . . . . . . : 201333408
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-16-3A-50-01-00-1A-A0-AC-E4-CC

   DNS Servers . . . . . . . . . . . : 192.168.2.101
                                       192.168.2.1
                                       192.168.2.1
   NetBIOS over Tcpip. . . . . . . . : Enabled

All machines can always nslookup one of the domain (mydomain.com) that is set in the jupiter's DNS server, you can see that in the output of nslookup on the same windows machine:

>nslookup mydomain.com
    Server:  UnKnown
    Address:  192.168.2.101

    Name:    mydomain.com
    Address:  192.168.2.100

The problem is, sometimes mydomain.com can not be pinged, here is the output of the ping on the same windows machine

>ping mydomain.com
Ping request could not find host mydomain.com. Please check the name and try again.

This looks very random, and happens once in a while, so the machine can lookup the DNS records but can't ping it, nor can browse the website that is hosted on mydomain.com, which should resolve to 192.168.2.100

On a linux machine that has the same DNS settings, the output of dig command for mydomain is as follows:

$ dig mydomain.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.2 <<>> mydomain.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36090
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;mydomain.com.                  IN      A

;; ANSWER SECTION:
mydomain.com.           86400   IN      A       192.168.2.100

;; AUTHORITY SECTION:
mydomain.com.           86400   IN      NS      jupiter.

;; ADDITIONAL SECTION:
jupiter.                86400   IN      A       192.168.2.101

;; Query time: 1 msec
;; SERVER: 192.168.2.101#53(192.168.2.101)
;; WHEN: Thu Sep 20 16:32:14 2012
;; MSG SIZE  rcvd: 83

We've never had the same problem on MACs, they always resolve mydomain.com

Here is how I have defined mydomain.com on Bind9's configs on Jupiter, notice that the name of the machine on 192.168.2.100 is venus, so I have this file:

/var/named/named.venus:

$TTL 1D
@       IN SOA jupiter. admin.ourcompany.com. (
                2003052800      ; serial
                                86400           ; refresh
                                300                     ; retry
                                604800          ; expire
                                3600            ; minimum
                )

@       IN      NS   jupiter.
@       IN      A    192.168.2.100
*       IN      A    192.168.2.100

/var/named/zones/named.venus.zone

zone "mydomain.com" IN {type master;file "/var/named/named.venus";allow-update {none;};};

One thing to note is that I haven't defined reverse DNS lookups, only the forward DNS lookups are defined in Bind9 configs, not sure if that's relevant or not.

So my question is, why is this being so unstable? what could be the cause?

share|improve this question
    
According to the error message, ping mydomain.com doesn't fail because it can't reach the server, but because it can't resolve the name. Does nslookup domain.com work correctly at the same time? Does the error persist after you flush the DNS cache (ipconfig /flushdns)? Does it persist after restarting the DNS cache (net stop dnscache && net start dnscache)? –  Ansgar Wiechers Sep 20 '12 at 20:57
    
Why would you ping a DNS zone? You ping a host! And I can't see a configuration saying mydomain is a host of .com. –  mailq Sep 20 '12 at 21:00
    
@mailq Then have a closer look at this line: @ IN A 192.168.2.100 –  Ansgar Wiechers Sep 20 '12 at 21:05
    
Then it is probably because he has configured another DNS server at 192.168.2.1. And also left the Primary Dns Suffix blank. –  mailq Sep 20 '12 at 21:08
1  
@yasserabd If you want to make sure that @ refers to the correct domain, insert a line $ORIGIN mydomain.com. after the line $TTL 1D. –  Ansgar Wiechers Sep 20 '12 at 22:09

1 Answer 1

With it being an intermittent problem have you looked at why your DHCP is handing out 192.168.2.1 (twice) for additional DNS servers?

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.