首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ping命令和域

Ping命令和域
EN

Stack Overflow用户
提问于 2012-03-21 09:41:48
回答 2查看 479关注 0票数 0

我一直认为域是在某种程度上相关的机器的集合。当我ping一个域名,比如google.com,为什么只返回一个IP地址?这个IP指的是什么?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2012-03-21 09:49:35

引用centos.org BIND documentation

代码语言:javascript
复制
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名称-这是用于负载平衡(参见例如thisthis)。要查看这一点,doo nslookup google.com

票数 0
EN

Stack Overflow用户

发布于 2012-03-21 09:47:11

域名只是指向IP地址的人类友好的指针。

IP地址是指特定域名所指向的机器的地址。这是通过使用DNS确定的。由于冗余原因,一些较大的域,如google.com,确实有许多与其关联的IP地址。因为假定这些额外的IP地址返回相同的内容,所以大多数程序(包括ping )只返回一个任意的IP地址。如果您想查看所有这些IP地址,可以使用dig程序。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9797534

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档