为什么rDNS会反转存储IP地址?

时间:2021-04-01 20:09:26

For example, an address record for mail.example.com pointing to the IP address 192.0.2.5 is stored as 5.2.0.192.in-addr.arpa. Why do we reverse the IP address?

例如,指向IP地址192.0.2.5的mail.example.com的地址记录存储为5.2.0.192.in-addr.arpa。为什么要反转IP地址?

2 个解决方案

#1


Because in a DNS name the most significant part comes last.

因为在DNS名称中,最重要的部分是最后一个。

There are Root nameservers that tell you which nameservers are responsible for the Top Level Domains (TLD) such as .com, .org, .net. And this delegation basically goes down all the way (but any nameserver could handle multiple levels of course).

有根名称服务器可以告诉您哪些名称服务器负责*域名(TLD),例如.com,.org,.net。而且这个代表团基本上都是一路下降(但任何名称服务器都可以处理多个级别)。

So the (simplified) way to look for this is like this:

所以寻找这个的(简化)方法是这样的:

  • Root nameserver tells you what nameserver is responsible for arpa.
  • 根名称服务器告诉您什么名称服务器负责arpa。

  • arpa. nameserver tells you what nameserver is responsible for in-addr.arpa.
  • ARPA。 nameserver告诉你什么名称服务器负责in-addr.arpa。

  • in-addr.arpa. nameserver tells you what nameserver is responsible for 192.in-addr.arpa.
  • in-addr.arpa。 nameserver告诉你什么名称服务器负责192.in-addr.arpa。

Now if we assume that the IP address was not reversed, then there would need to be a nameserver that's responsible for providing the reverse-name lookup for all IP-Addresses that end in 5 (for example). Since the last digit of the IP address is the least significant one (i.e. IP networks/classes are grouped with the earlier parts of the IP adresse) this sepration wouldn't make any sense.

现在,如果我们假设IP地址没有被反转,则需要有一个名称服务器,它负责为以5结尾的所有IP地址提供反向名称查找(例如)。由于IP地址的最后一位是最不重要的数字(即IP网络/类与IP地址的早期部分分组),因此这种分离没有任何意义。

#2


In a domain, the most significant part is on the right (e.g. the "com", "net" or "org" part). As you move left, the parts get less significant, or large, and narrow down to the final point.

在域中,最重要的部分在右侧(例如“com”,“net”或“org”部分)。向左移动时,部件变得不那么重要,或者变大,并缩小到最终点。

IP addresses are the opposite; the most significant part (the 192 in this case) is at the left.

IP地址正好相反;最重要的部分(在这种情况下为192)位于左侧。

#1


Because in a DNS name the most significant part comes last.

因为在DNS名称中,最重要的部分是最后一个。

There are Root nameservers that tell you which nameservers are responsible for the Top Level Domains (TLD) such as .com, .org, .net. And this delegation basically goes down all the way (but any nameserver could handle multiple levels of course).

有根名称服务器可以告诉您哪些名称服务器负责*域名(TLD),例如.com,.org,.net。而且这个代表团基本上都是一路下降(但任何名称服务器都可以处理多个级别)。

So the (simplified) way to look for this is like this:

所以寻找这个的(简化)方法是这样的:

  • Root nameserver tells you what nameserver is responsible for arpa.
  • 根名称服务器告诉您什么名称服务器负责arpa。

  • arpa. nameserver tells you what nameserver is responsible for in-addr.arpa.
  • ARPA。 nameserver告诉你什么名称服务器负责in-addr.arpa。

  • in-addr.arpa. nameserver tells you what nameserver is responsible for 192.in-addr.arpa.
  • in-addr.arpa。 nameserver告诉你什么名称服务器负责192.in-addr.arpa。

Now if we assume that the IP address was not reversed, then there would need to be a nameserver that's responsible for providing the reverse-name lookup for all IP-Addresses that end in 5 (for example). Since the last digit of the IP address is the least significant one (i.e. IP networks/classes are grouped with the earlier parts of the IP adresse) this sepration wouldn't make any sense.

现在,如果我们假设IP地址没有被反转,则需要有一个名称服务器,它负责为以5结尾的所有IP地址提供反向名称查找(例如)。由于IP地址的最后一位是最不重要的数字(即IP网络/类与IP地址的早期部分分组),因此这种分离没有任何意义。

#2


In a domain, the most significant part is on the right (e.g. the "com", "net" or "org" part). As you move left, the parts get less significant, or large, and narrow down to the final point.

在域中,最重要的部分在右侧(例如“com”,“net”或“org”部分)。向左移动时,部件变得不那么重要,或者变大,并缩小到最终点。

IP addresses are the opposite; the most significant part (the 192 in this case) is at the left.

IP地址正好相反;最重要的部分(在这种情况下为192)位于左侧。