我一直认为域是在某种程度上相关的机器的集合。当我ping一个域名,比如google.com,为什么只返回一个IP地址?这个IP指的是什么?
发布于 2012-03-21 09:49:35
引用centos.org BIND documentation
Zone File Resource Records
...
A — Address record, which specifies an IP address to assign to a name.
<host> IN A <IP-address>
Figure 14-7. Sample A record configuration
If the <host> value is omitted, then an A record points to a default IP address for the top of the namespace. This system will be the target of all non-FQDN requests.
Consider the following A record examples for the domain.com zone file:
IN A 10.0.1.3
server1 IN A 10.0.1.5其中,10.0.1.3是域名的IP。例如,如果上面是域example.com的区域文件,ping example.com将ping 10.0.1.3。每个域都有这个“默认”IP地址,和上面的server1一样,还有其他的IP地址。
作为附注,您可以有多个IP指向相同的DNS名称-这是用于负载平衡(参见例如this或this)。要查看这一点,doo nslookup google.com。
发布于 2012-03-21 09:47:11
域名只是指向IP地址的人类友好的指针。
IP地址是指特定域名所指向的机器的地址。这是通过使用DNS确定的。由于冗余原因,一些较大的域,如google.com,确实有许多与其关联的IP地址。因为假定这些额外的IP地址返回相同的内容,所以大多数程序(包括ping )只返回一个任意的IP地址。如果您想查看所有这些IP地址,可以使用dig程序。
https://stackoverflow.com/questions/9797534
复制相似问题