In my bind9 DNS server, I have my servers described like this:
[...]
prd1frm201 IN A 172.21.10.2
dns IN CNAME prd1frm201.kprd1.
ntp IN CNAME prd1frm201.kprd1.
prd1frm202 IN A 172.21.10.3
sentry IN CNAME prd1frm202.kprd1.
[...]
And the reverse is defined like:
[...]
3 IN PTR prd1frm202.kprd1.
4 IN PTR prd1frm203.kprd1.
[...]
So, when I resolve a host name (either A or CNAME) I get this correct answer:
gmartins@HP-Gilberto:~$ host prd1frm201
prd1frm201.kprd1 has address 172.21.10.2
gmartins@HP-Gilberto:~$ host dns
dns.kprd1 is an alias for prd1frm201.kprd1.
prd1frm201.kprd1 has address 172.21.10.2
gmartins@HP-Gilberto:~$ host ntp
ntp.kprd1 is an alias for prd1frm201.kprd1.
prd1frm201.kprd1 has address 172.21.10.2
What is indeed correct! My question is about reverse resolution:
gmartins@HP-Gilberto:~$ host 172.21.10.2
2.10.21.172.in-addr.arpa domain name pointer prd1frm201.kprd1.
gmartins@HP-Gilberto:~$ host 172.21.10.3
3.10.21.172.in-addr.arpa domain name pointer prd1frm202.kprd1.
Obviously, I'll never get a CNAME as an answer. But if I just change the reverse DNS file like this:
2 IN PTR prd1frm201.kprd1.
2 IN PTR dns.kprd1.
2 IN PTR ntp.kprd1.
Provides this answer:
gmartins@prd1frm201:~$ host 172.21.10.2
2.10.21.172.in-addr.arpa domain name pointer dns.kprd1.
2.10.21.172.in-addr.arpa domain name pointer ntp.kprd1.
2.10.21.172.in-addr.arpa domain name pointer prd1frm201.kprd1.
Although it seems perfectly fine, RFC 1912 states that "Also, PTR records must point back to a valid A record, not an alias defined by a CNAME".
My question is:
What is the PROPER way to configure it? should I only assign a PTR to an A register or can I have a PTR assigned either to an A or a CNAME register? Why (not)?