I've setup a DNS with bind9 (9.9.5) on Ubuntu 14.04/trusty (kernel 4.4.0-59) for my local network. It is working, but sometimes it fails to find an IP of a host (e.g. ping says: ping: unknown host aypi1.bxlab
).
My setup is as follows.
/etc/bind/named.conf.options:
options {
directory "/var/cache/bind";
dnssec-validation auto;
auth-nxdomain no;
listen-on-v6 { none; };
allow-query {
127.0.0.1;
192.168.0.0/24;
};
};
/etc/bind/named.conf.local:
zone "bxlab" IN {
type master;
file "/etc/bind/db.intra";
};
zone "0.168.192.in-addr.arpa" IN {
type master;
file "/etc/bind/db.0.168.192";
};
/etc/bind/db.intra:
$TTL 1D ;
@ IN SOA bxlab. root.bxlab (
2011102401 ; Serial
3H ; Refresh
1H ; Retry
1W ; Expire
1D ) ; Minimum
IN NS aypi1.bxlab. ;
aypi0 IN A 192.168.0.10 ;
aypi1 IN A 192.168.0.11 ;
aypi2 IN A 192.168.0.12 ;
ns IN CNAME aypi1 ;
/etc/bind/db.0.168.192:
$TTL 1D ;
@ IN SOA ns.bxlab. root.ns.bxlab (
2011102301 ; Serial
3H ; Refresh
1H ; Retry
1W ; Expire
1D ) ; Minimum
IN NS ns.bxlab.
IN PTR bxlab.
IN A 255.255.255.0
10 IN PTR aypi0 ;
11 IN PTR aypi1 ;
12 IN PTR aypi2 ;
I also changed my router configurations as follows:
Primary DNS: 192.168.0.11
Secondary: xxx.xxx.xxx.xxx (DNS IP Provided by ISP)
The trouble is:
- After restarting bind9, nslookup worked with aypi1.bxlab.
- After 30 min (?),
ping aypi1.bxlab
returnedping: unknown host aypi1.bxlab
. - But waiting some seconds (maybe 6 sec?), ping became to work.
- 2 and 3 are repeated.
Do anybody have an idea to figure this out?
Many thanks!
bxlab
is - but you have an ISP provided server as secondary for your router - anytime the router decides to fallback to your secondary, your query will fail – pete Jan 24 '17 at 4:49bxlab
? Could you show me an example, or a reference web page? – Akihiko Jan 24 '17 at 16:08