Hi all,
I'm getting very inconsistent success with BIND 9. If I ping the same
address over and over, the very first ping takes a lot time (creating
the cache?), then it works faster, but every few times it will simply
fail.

Looking at /var/log/messages I see it's not building the
request properly, but I don't know why. This machine is a gateway,
plugged into both my LAN using 192.168.0.xxx and my router leading
to the internet (router:10.170.16.129). I'm quite confident my router
is configured properly.
For example, my domain is mydomain.net and I ping m3.doubleclick.net,
I see this in /var/log/messages:
Code:
Jun 18 08:25:07 feresa named[32307]: client 127.0.0.1#1199: query: m3.doubleclick.net.mydomain.net IN A
Jun 18 08:25:07 feresa named[32307]: client 127.0.0.1#1199: query: m3.doubleclick.net IN AAAA
Jun 18 08:25:12 feresa named[32307]: client 192.168.0.1#1200: query: m3.doubleclick.net IN AAAA
Jun 18 08:25:17 feresa named[32307]: client 127.0.0.1#1199: query: m3.doubleclick.net IN AAAA
Jun 18 08:25:22 feresa named[32307]: client 192.168.0.1#1200: query: m3.doubleclick.net IN AAAA
Jun 18 08:25:27 feresa named[32307]: client 127.0.0.1#1200: query: m3.doubleclick.net.mydomain.net IN AAAA
Jun 18 08:25:27 feresa named[32307]: client 127.0.0.1#1200: query: m3.doubleclick.net IN A
Jun 18 08:25:32 feresa named[32307]: client 192.168.0.1#1201: query: m3.doubleclick.net IN A
Jun 18 08:25:37 feresa named[32307]: client 127.0.0.1#1200: query: m3.doubleclick.net IN A
Jun 18 08:25:42 feresa named[32307]: client 192.168.0.1#1201: query: m3.doubleclick.net IN A
Jun 18 08:25:47 feresa named[32307]: client 127.0.0.1#1201: query: m3.doubleclick.net.mydomain.net IN A
I don't understand:
1) why is my client sometimes logged as 127.0.0.1 and other times as 192.168.0.1?
This machine multi-homes to 127.0.0.1 (of course), 192.168.0.1 as well as 10.170.16.xxx.
Is this a problem?
2) why is it prefixing m3.doubleclick.net onto my domain? Is it because it can't get it
resolved first by going out to the internet? Or (more likely) I'm telling it to do this?
10.170.16.129 is my router. These are my other system files that might be of significance:
/etc/hosts
Code:
127.0.0.1 localhost
::1 localhost ipv6-localhost ipv6-loopback
fe00::0 ipv6-localnet
ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
10.170.16.129 cisco1
192.168.0.1 feresa.mydomain.net feresa
/etc/resolv.conf
Code:
domain mydomain.net
nameserver 127.0.0.1
nameserver 192.168.0.1
/etc/nsswitch.conf
Code:
# passwd: files nis
# shadow: files nis
# group: files nis
passwd: compat
group: compat
hosts: files dns
networks: files dns
services: files
protocols: files
rpc: files
ethers: files
netmasks: files
netgroup: files
publickey: files
bootparams: files
automount: files nis
aliases: files
/etc/named.conf
Code:
options {
directory "/var/lib/named";
dump-file "/var/log/named_dump.db";
statistics-file "/var/log/named.stats";
forwarders { 10.170.16.129; };
forward first;
#listen-on port 53 { 127.0.0.1; };
listen-on-v6 { any; };
query-source address * port 53;
transfer-source * port 53;
notify-source * port 53;
#allow-query { 127.0.0.1; };
notify no;
};
logging {
channel syslog_queries {
syslog user;
severity debug;
};
category queries { syslog_queries; };
channel syslog_errors {
syslog user;
severity error;
};
category default { syslog_errors; };
category lame-servers { null; };
};
view "internal" {
match-clients { 127.0.0.1; 192.168.0.0/24; };
forward first;
forwarders { 10.170.16.129; };
recursion yes;
zone "." in {
type hint;
file "root.hint";
};
zone "localhost" in {
type master;
file "localhost.zone";
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "127.0.0.zone";
};
zone "mydomain.com" {
type master;
file "master/private.mydomain.com.zone";
};
zone "mydomain.net" in {
type master;
file "master/private.mydomain.net.zone";
};
//// zone "16.170.10.in-addr.arpa" in {
//// type master;
//// file "master/16.170.10.in-addr.arpa.zone";
//// };
zone "0.168.192.in-addr.arpa" in {
type master;
file "master/0.168.192.in-addr.arpa.zone";
};
}; //end view internal
view "external" {
match-clients { any; };
recursion no;
forward first;
forwarders { 10.170.16.129; };
zone "." in {
type hint;
file "root.hint";
};
zone "mydomain.net" in {
type master;
file "master/mydomain.net.zone";
};
zone "mydomain.com" in {
type master;
file "master/mydomain.com.zone";
};
zone "16.170.10.in-addr.arpa" in {
type master;
file "master/16.170.10.in-addr.arpa.zone";
};
//// zone "0.168.192.in-addr.arpa" in {
//// type master;
//// file "master/0.168.192.in-addr.arpa.zone";
//// };
}; //end view external
Thanks in advance for any pointers.