I have the following setup:
A bind9 instance (referred as L below) on very limited hardware for resolving the names on my local networks.
It is an authoritative master for the zone home.mydomain.com. Queries to this server work and return homedns.home.mydomian.com as NS and the IP 192.168.1.77 of it as an additional record.
A bind9 instance (referred as M below) to resolve internet and local names.
No global forward option is used here. There is a forward zone configured:
zone "home.mydomain.com" in {
type forward;
forward only;
forwarders { 192.168.1.77; };
};
Note1: mydomain.com is an existing, registered domain but there is no record for home.mydomain.com
Note2: The bind9 version of M is very old: 9.8.1-P1
This setup works as long as the internet connection is up, but local name queries are not answered when the connection is down. Log is syslog is
Aug 30 09:05:42 M named[1611]: error (no valid DS) resolving 'xxx.home.mydomain.com/A/IN': 192.168.1.77#53
Capturing the network for a successful resolve when the connection is up reveals that M queries for mydomain.com on the internet after receiving the answer from L.
In the answer from M to the client, the AUTHORITY SECTION is changed:
dig to L:
;; ANSWER SECTION:
syslog.home.mydomain.com. 3600 IN A 192.168.1.99
;; AUTHORITY SECTION:
home.mydomain.com. 3600 IN NS homedns.home.mydomain.com.
;; ADDITIONAL SECTION:
homedns.home.mydomain.com. 3600 IN A 192.168.1.77
dig to M:
;; ANSWER SECTION:
syslog.home.mydomain.com. 2134 IN A 192.168.1.99
;; AUTHORITY SECTION:
net. 171334 IN NS j.gtld-servers.net.
net. 171334 IN NS m.gtld-servers.net.
net. 171334 IN NS i.gtld-servers.net.
net. 171334 IN NS k.gtld-servers.net.
net. 171334 IN NS g.gtld-servers.net.
net. 171334 IN NS e.gtld-servers.net.
net. 171334 IN NS h.gtld-servers.net.
net. 171334 IN NS a.gtld-servers.net.
net. 171334 IN NS d.gtld-servers.net.
net. 171334 IN NS f.gtld-servers.net.
net. 171334 IN NS b.gtld-servers.net.
net. 171334 IN NS c.gtld-servers.net.
net. 171334 IN NS l.gtld-servers.net.
I do not understand why M is not just returning the answer from L to the client and I don't have any ideas left, what I could try to avoid the query to the internet for the forwarded zone.