Unstable DNS with bind
Posted
by
yasser abd
on Server Fault
See other posts from Server Fault
or by yasser abd
Published on 2012-09-20T20:47:58Z
Indexed on
2012/09/20
21:40 UTC
Read the original article
Hit count: 374
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?
© Server Fault or respective owner