PTR record format for IPv6

binddomain-name-systemipv6ptr-recordreverse-dns

What is the difference in the following two IPv6 PTR formats?

4.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0         IN      PTR     smtp.example.com.

4.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.3.0.0.0.0.a.4.f.7.0.6.2.ip6.arpa.    IN    PTR    smtp.example.com.

If I have a valid IPv6 address and dig for the PTR it does not seem to matter which way I have the record listed in the reverse zone file. It works with either one. I would expect it to work with the nibble format (the bottom example) but I would not expect it to work with the shorter version in the top example.

What is the first example called and how can I convert the nibble format to the shorter version? I have searched and searched everywhere but can't seem to figure out this shorter format or what makes it work.

Best Answer

There is no difference.

The second ends in a dot. Using this method, the PTR record is defined explicitly without taking into consideration the context of the zone the record is residing in. Or rather, the dot suppresses the zone from being appended on the end.

The first case is missing the dot at the end so the zone the record is defined in is automatically added to the end of it to complete it in full (the zone in your case is 0.0.0.0.3.0.0.0.0.a.4.f.7.0.6.2.ip6.arpa).

It is all about that dot.

Effectively, both methods evaluate to the same PTR record. The first method is preferred as it saves space and, if you ever change to a different /64 prefix, all you need to do is change the zone these PTR records live in and the entire lot is updated - no need to change the /64 prefix on every single PTR record in the zone file.

Related Topic