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?


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.

  • Some distributions of Linux and the like may set your (supposed to be unique) hostname from the first reverse-resolvable external interface's address. – sj26 Apr 2 '12 at 6:54
  • A PTR can map many IPs to one name. Of course, doing so is discouraged, but DNS doesn't care. – adaptr Apr 2 '12 at 10:38
  • an address can have PTRs to many hostnames - you can put multiple PTR records under the same in-addr.arpa label, in the same way that you put multiple DNS records under other labels. Its pretty rare but I have seen it in the wild. – Ben Clifford Apr 4 '12 at 1:40

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.


Is it bad practice ?
Absolutely; any services that depend on the client address for hostname resolution will have a hard time getting consistent answers.
The best-known examples would be SMTP, SSH, and large-scale NFS.

Is it forbidden ?
No, DNS doesn't care; an RR is an RR.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.