Here are some handy ‘dig’ commands to verify DNS records:
Do a hostname lookup
# dig www.google.com
; <<>> DiG 9.4.1 <<>> www.google.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 76
;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.google.com. IN A
;; ANSWER SECTION:
www.google.com. 84790 IN CNAME www.l.google.com.
www.l.google.com. 259 IN A 209.85.148.104
www.l.google.com. 259 IN A 209.85.148.105
www.l.google.com. 259 IN A 209.85.148.106
www.l.google.com. 259 IN A 209.85.148.147
www.l.google.com. 259 IN A 209.85.148.99
www.l.google.com. 259 IN A 209.85.148.103
;; Query time: 119 msec
;; SERVER: 10.0.0.8#53(10.0.0.8)
;; WHEN: Wed Sep 28 13:23:41 2011
;; MSG SIZE rcvd: 148
Get a short answer
# dig www.google.com +short
www.l.google.com.
209.85.148.99
209.85.148.103
209.85.148.104
209.85.148.105
209.85.148.106
209.85.148.147
Get just the answer section
# dig www.google.com +noall +answer
www.google.com. 84278 IN CNAME www.l.google.com.
www.l.google.com. 49 IN A 209.85.148.105
www.l.google.com. 49 IN A 209.85.148.106
www.l.google.com. 49 IN A 209.85.148.147
www.l.google.com. 49 IN A 209.85.148.99
www.l.google.com. 49 IN A 209.85.148.103
www.l.google.com. 49 IN A 209.85.148.104
Do a reverse lookup
# dig -x 209.85.148.105 +noall +answer
105.148.85.209.in-addr.arpa. 45351 IN PTR fra07s07-in-f105.1e100.net.
Use your ‘search’ string from the /etc/resolv.conf
#dig www.google.com +search
Reference: