Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have configured one DNS server which returns back the SOA record instead of A record when i query it with dig tool. Can somebody tell me what is the reason ?

root@pradeep-laptop:~# dig prashanth.foo

; <<>> DiG 9.8.1-P1 <<>> prashanth.foo
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 16583
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;prashanth.foo.         IN  A

;; AUTHORITY SECTION:
.           86389   IN  SOA a.root-servers.net. nstld.verisign-grs.com. 2012072401 1800 900 604800 890

;; Query time: 2 msec
;; SERVER: 172.16.140.34#53(172.16.140.34)
;; WHEN: Wed Jul 25 14:25:05 2012
;; MSG SIZE  rcvd: 106

The zone file is as follows:

 $TTL   300
 @  IN  SOA ns.prashanth.foo. root.prashanth.foo. (
                  2     ; Serial
                300     ; Refresh
              86400     ; Retry
            2419200     ; Expire
             604800 )   ; Negative Cache TTL
 ;

 prashanth.foo. IN  NS  ns.prashanth.foo.
 prashanth.foo.    IN      A       172.16.150.196
 ns         IN  A   172.16.150.196
 prashanth.foo.    IN      MX  10  mail.prashanth.foo.
 mail            IN      A       172.16.150.196
share|improve this question
1  
Please post the output of DIG, as well as your zone config file –  MichelZ Jul 25 '12 at 8:06
    
It's commonly best practice to use a date formatted serial number. Instead of just 2 use 2012072500. Update the date every day you edit the zone. Update the last two digits each time you update the zone within a single day. –  bahamat Jul 25 '12 at 9:06
2  
Why do you obfuscate the zone? It supposed to be public anyway. You make it worse for everyone who is trying to help. –  cstamas Jul 25 '12 at 10:06
    
Maybe it is not obfuscated? It's a perfectly valid zone... ! –  MichelZ Jul 26 '12 at 6:28

3 Answers 3

See what you get when you specify the type explicitly:

dig -t a prashanth.foo

Or

dig -t any prashanth.foo

If you're still not seeing it update the serial number and reload the zone.

share|improve this answer

Have you reloaded your zone file?

Using BIND:

sudo rndc reload

share|improve this answer

Is that the exact zone file? If so, don't use spaces at the beginning of the records.
Reload named and try again after.
e.g., instead of:
.. rashanth.foo. IN NS ns.prashanth.foo.
use:
prashanth.foo. IN NS ns.prashanth.foo.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.