大网数据广告活动
服务器运维问答

PTR record format for IPv6

· 52CE 我爱测

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…

问题原文

原帖链接 · user53029 · CC BY-SA 3.0

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.

已采纳解答

原帖链接 · parkamark · CC BY-SA 3.0

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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-01-19)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。