I don't understand why I can use 'dig dad.homenet' to properly resolve
the address but not 'dig dad'. It appears that when the domain is not
specified, the local domain is not searched at all. But, 'host dad'
and 'ping dad' work just fine.
RH7.3, BIND 9.2.0
1102 $ host dad
dad.homenet has address 192.168.1.249
1103 $ dig dad
; <<>> DiG 9.2.0 <<>> dad
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 62119
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;dad. IN A
;; AUTHORITY SECTION:
. 4812 IN SOA A.ROOT-SERVERS.NET.
NSTLD.VERISIGN-GRS.COM. 2002112600 1800 900 604800 86400
;; Query time: 18 msec
;; SERVER: 127.0.0.1#53(localhost)
;; WHEN: Tue Nov 26 12:11:41 2002
;; MSG SIZE rcvd: 96
1104 $ dig dad.homenet
; <<>> DiG 9.2.0 <<>> dad.homenet
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17684
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL:
1
;; QUESTION SECTION:
;dad.homenet. IN A
;; ANSWER SECTION:
dad.homenet. 259200 IN A 192.168.1.249
;; AUTHORITY SECTION:
homenet. 259200 IN NS linux2.homenet.
;; ADDITIONAL SECTION:
linux2.homenet. 259200 IN A 192.168.1.200
;; Query time: 13 msec
;; SERVER: 127.0.0.1#53(localhost)
;; WHEN: Tue Nov 26 12:12:10 2002
;; MSG SIZE rcvd: 82
1105 $ ping dad
PING dad.homenet (192.168.1.249) from 192.168.1.200 : 56(84) bytes of
data.
64 bytes from dad.homenet (192.168.1.249): icmp_seq=1 ttl=128
time=0.460 ms
1106 $ cat /etc/resolv.conf
search homenet homenet2
nameserver localhost
1107 $
$ man dig
+[no]search
Use [do not use] the search list defined by the
searchlist or domain directive in resolv.conf (if
any). The search list is not used by default.
You are supposed to use FQDN, dig doesn't query your /etc/resolve.conf
for domain suffix.
YANG