《NetBSD指南-25.2.3./etc/namedb/zone.127.0.0》

NetBSD用户指南中文版、NetBSD pkgsrc指南中文版...

版主: lionux

主题已锁定
头像
leo
帖子: 2465
注册时间: 2010-01-21 3:27

《NetBSD指南-25.2.3./etc/namedb/zone.127.0.0》

帖子 leo » 2010-03-08 1:26

This is the reverse lookup file (or zone) to resolve the special IP address 127.0.0.1 back to "localhost":

代码: 全选

 1| $TTL    3600
 2| @              IN SOA  strider.diverge.org. root.diverge.org. (
 3|                        1       ; Serial
 4|                        8H      ; Refresh
 5|                        2H      ; Retry
 6|                        1W      ; Expire
 7|                        1D)     ; Minimum TTL
 8|                 IN NS   localhost.
 9| 1.0.0           IN PTR  localhost.
In this file, all of the lines are the same as the localhost zonefile with exception of line 9, this is the reverse lookup (PTR) record. The zone used here is "@" again, which got set to the value given in named.conf, i.e. "127.in-addr.arpa". This is a special "domain" which is used to do reverse-lookup of IP addresses back into hostnames. For it to work, the four bytes of the IPv4 address are reserved, and the domain "in-addr.arpa" attached, so to resolve the IP address "127.0.0.1", the PTR record of "1.0.0.127.in-addr.arpa" is queried, which is what is defined in that line.

主题已锁定

在线用户

正浏览此版面之用户: 没有注册用户 和 6 访客