What is the proper way to configure a BIND9 zone file to allow ping/dig/nslookup/web browsers to query a host using its hostname or a shortened CNAME record that points to this hostname instead of the entire fqdn of the host.
Example: This works.
dnsadmin@tre-lfs4:~$ dig fs.domain.org
; <<>> DiG 9.10.3-P4-Ubuntu <<>> fs.domain.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3925
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;fs.domain.org. IN A
;; ANSWER SECTION:
fs.domain.org. 38400 IN CNAME tre-lfs1.domain.org.
tre-lfs1.domain.org. 38400 IN A 10.30.0.31
From this zone file entry:
tre-lfs1.domain.org. IN A 10.30.0.31
fs.domain.org. IN CNAME tre-lfs1.domain.org.
I want to be able to do this:
nslookup/ping/dig fs
With a zone file entry that looks more like this:
tre-lfs1. IN A 10.30.0.31
fs. IN CNAME tre-lfs1.
So that I can both use the entire FQDN OR just the shortened hostname/cname.
The reason is that I may have the same machine hosting web and other services for different domains, but when locally administering I want to just use the short names.
Anyone know how to achieve this or a resource to look to in order to do so?