no servers could be reached

Barry Margolin barmar at alum.mit.edu
Thu Jun 16 00:54:35 UTC 2005


In article <d8qgu4$25em$1 at sf1.isc.org>, Ian <db5 at hermes.net.au> wrote:

> Dear Experts
> 
> /dev/rob0 replied to my mess, but yes, it was too messy.  I'll try again.
> 
> The object is to have a name server for my home network. Dig -x 127.0.0.1
> is successful.  Dig <hostname> is not.  After days of this, that and
> tearing my hair out I have no idea why. Please help. Relevant files
> follow, including output from named-checkzone.

What does named-checkzone have to do with it?  Your problem isn't with 
names in your own zones, it's with zones out on the Internet.

The problem is apparently with communication between your server and the 
root servers.  Or maybe your named.ca is wrong (you didn't include it 
below).

> 
> Regards
> 
> Ian Dudley-Bestow.
> 
> *******start*******
> Slackware 9.1
> Kernel 2.4.22 (home made)
> P III.
> *******end*******
> 
> 
> *******start*******
> dig -x 127.0.0.1
> 
> ; <<>> DiG 9.2.2-P3 <<>> -x 127.0.0.1
> ;; global options:  printcmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19019
> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
> 
> ;; QUESTION SECTION:
> ;1.0.0.127.in-addr.arpa.                IN      PTR
> 
> ;; ANSWER SECTION:
> 1.0.0.127.in-addr.arpa. 86400   IN      PTR     localhost.
> 
> ;; AUTHORITY SECTION:
> 0.0.127.in-addr.arpa.   86400   IN      NS      localhost.
> 
> ;; ADDITIONAL SECTION:
> localhost.              86400   IN      A       127.0.0.1
> 
> ;; Query time: 163 msec
> ;; SERVER: 203.62.159.2#53(203.62.159.2)
> ;; WHEN: Thu Jun 16 21:48:37 2005
> ;; MSG SIZE  rcvd: 93
> *******end*******
> 
> 
> *******start*******
> dig garage
> 
> ; <<>> DiG 9.2.2-P3 <<>> garage
> ;; global options:  printcmd
> ;; connection timed out; no servers could be reached
> *******end*******

Try: dig garage.localhost

since that's the name you defined in your localhost.zone file.

> 
> 
> *******start*******
> root at house:/var/named/caching-example# cat /etc/named.conf
> options {
>         directory "/var/named";
> 
>         // Uncommenting this might help if you have to go through a
>         // firewall and things are not working out.  But you probably
>         // need to talk to your firewall admin.
> 
>         // query-source port 53;
> };
> 
> controls {
>         inet 127.0.0.1 allow { localhost; } keys { rndc_key; };
> };
> 
> key "rndc_key" {
>         algorithm hmac-md5;
>         secret
> "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
> };
> 
> zone "." IN {
>         type hint;
>         file "caching-example/named.ca";
> };
> 
> zone "localhost" IN {
>         type master;
>         file "caching-example/localhost.zone";
>         allow-update { none; };
> };
> 
> zone "0.0.127.in-addr.arpa" IN {
>         type master;
>         file "caching-example/named.local";
>         allow-update { none; };
> };
> *******end*******
> 
> *******start*******
> root at house:/var/named/caching-example# named-checkzone localhost
> localhost.zone
> zone localhost/IN: loaded serial 2005061401
> OK
> *******end*******
> 
> 
> *******start*******
> root at house:/var/named/caching-example# named-checkzone localhost named.local
> zone localhost/IN: loaded serial 2005061401
> OK
> *******end*******
> 
> 
> *******start*******
> /var/log/messages
> Jun 16 21:32:44 house named[99]: starting BIND 9.2.2-P3
> Jun 16 21:32:44 house named[99]: using 1 CPU
> Jun 16 21:32:44 house named[99]: loading configuration from '/etc
> named.conf'
> Jun 16 21:32:44 house named[99]: no IPv6 interfaces found
> Jun 16 21:32:44 house named[99]: listening on IPv4 interface lo,
> 127.0.0.1#53
> Jun 16 21:32:44 house named[99]: listening on IPv4 interface eth0,
> 192.168.1.1#53
> Jun 16 21:32:45 house named[99]: command channel listening on 127.0.0.1#953
> Jun 16 21:32:45 house named[99]: zone 0.0.127.in-addr.arpa/IN: loaded serial
> 2005061401
> Jun 16 21:32:45 house named[99]: zone localhost/IN: loaded serial 2005061401
> Jun 16 21:32:45 house named[99]: running
> Jun 16 21:32:45 house named[99]: zone localhost/IN: sending notifies (serial
> 2005061401)
> Jun 16 21:32:45 house named[99]: zone 0.0.127.in-addr.arpa/IN: sending
> notifies (serial 2005061401)
> *******end*******
> 
> 
> *******start*******
> root at house:/var/named/caching-example# cat named.local
> $TTL 3D
> @               IN      SOA     localhost. hostmaster.localhost. (
>                         2005061401       ; Serial
>                         8H      ; Refresh
>                         2H      ; Retry
>                         4W      ; Expire
>                         1D)     ; Minimum TTL
>                         NS      localhost.
> 1                       PTR     localhost.
> *******end*******
> 
> 
> *******start*******
> root at house:/var/named/caching-example# cat localhost.zone
> $TTL 3D
> @       IN      SOA     localhost. hostmaster.localhost. (
>                         2005061401       ; serial, todays date + todays
> serial #
>                         8H              ; refresh, seconds
>                         2H              ; retry, seconds
>                         4W              ; expire, seconds
>                         1D )            ; minimum, seconds
> ;
>                 NS      ns              ; Inet Address of name server
> localhost       A       127.0.0.1

That should probably be:

localhost.        A       127.0.0.1

> garage          A       192.168.1.9
> shed            A       192.168.1.10
> *******end*******

It's very unusual to have anything in the localhost zone other that 
localhost itself.  What use do you have for names like shed.localhost 
and garage.localhost?

-- 
Barry Margolin, barmar at alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***



More information about the bind-users mailing list