DNS naming convention for multi-homed devices

Is it bad practice to have multiple IPs resolve via reverse DNS to the same hostname?

Consider a router with multiple interfaces: 1 WAN and 3 separate LANs. Is it appropriate for all four IPs resolve to router.domain.com, or should the WAN interface resolve to wan-router.domain.com and the LAN interfaces resolve to lan01-router.domain.com, lan02-router.domain.com and lan03-router.domain.com?


Solution 1:

I personally prefer the latter, because otherwise you break circular resolution (that is, if you reverse-resolve an IP address to a fully-qualified domain name (FQDN), then forward-resolve the FQDN, you get a different IP address).

Circular resolution the other way is unreliable, because many names can resolve to one address; but since an address can only PTR to one name, it's often held that that name should at least resolve back to the starting address. Sometimes, odd things can happen if this is not so.

The need to get this right is confirmed by RFC1912, which says

Make sure your PTR and A records match. For every IP address, there should be a matching PTR record in the in-addr.arpa domain. If a host is multi-homed, (more than one IP address) make sure that all IP addresses have a corresponding PTR record (not just the first one). Failure to have matching PTR and A records can cause loss of Internet services similar to not being registered in the DNS at all.

Solution 2:

My preference is for router.example.com to resolve to the router's management address and let router-interface.example.com resolve to the IP of that particular interface, then ensure that reverse resolution matches forward resolution.