免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1069 | 回复: 0
打印 上一主题 下一主题

Solaris - dns名称解析过程 [复制链接]

论坛徽章:
1
寅虎
日期:2015-01-23 02:35:47
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-08-03 10:00 |只看该作者 |倒序浏览
Solaris - dns名称解析过程[中文]《转》


[译]Samhoo

本文的目的在于阐述DNS名称解析过程。为了给出一个例子,我们假设某个用户试图从客户机ftp到ftp.internic.net。

该客户机将经历如下解析步骤:

1. 客户机根据/etc/nsswitch.conf文件来确定名字解析的顺序。在本例中,假定的顺序是:首先是本地文件,其次

NIS+服务器,最后是DNS。

2. 客户机查找本地/etc/inet/hosts文件,没有发现匹配项。


3. 客户机向NIS+服务器发起关于ftp.internic.net地址的查询,仍然没有找到。


4. 客户机根据/etc/resolv.conf文件确定名称解析搜索列表和本地DNS服务器的地址。


5. 客户机解析例程向本地DNS服务器发起一个递归的DNS查询,以返回ftp.intenic.net的地址。这次,客户机将阻塞直

到本地DNS服务器完成名称解析。


6. 如果该查询最近出现过,本地DNS服务器首先会检查缓冲。如果该查询结果在本地缓冲里,它向客户机返回一个非权

威的查询结果


7. 本地DNS服务器向负责internic.net域查询的DNS服务器(如果没有适当的DNS服务器就向根服务器)发起一个交互查

询。在本例中,我们假设缓冲中没有所需的查询结果,而且根服务器服务于我们的查询。


8. 根服务器返回最接近的信息。这样,你只能从根服务器得到的所有net.服务器的名称和地址。根服务器返回的这些

名称和地址还包含了维持时间(time-to-alive),维持时间用于通知本地域名服务器,这些名称和地址可以缓冲多长

时间。


9. 本地DNS服务器向上一步查询返回的net.服务器的其中之一发起查询,查询的过程与上述向根服务器进行的交互查询

是一样的。


10. net.服务器返回最为接近的信息--internic.net.服务器的地址和名称及其维持时间(time-to-live)。


11. 本地DNS服务器向其中的一个internic.net.服务器发起相同的查询。


12. internic.net.服务器返回ftp.internic.net的地址及其维持时间(time-to-live)。


13. 本地DNS服务器向客户机返回所请求的地址,然后就可以处理ftp命令。


14. 本地DNS服务器将缓冲ftp.internic.net的地址用于以后的查询。


附原文:
The purpose of this infodoc is to explain the DNS Name Resolution Process. To use an example, let's say

a user is trying to ftp to ftp.internic.net from a client machine. The client machine resolution process

uses the following steps:
1. The client system consults the /etc/nsswitch.conf file to determine the name resolution order. In

this example, the presumed order is local files first, NIS+ server second, and DNS third.

2. The client system consults the local /etc/inet/hosts file and does not find an entry.

3. The client system sends a query regarding the address of ftp.internic.net to the NIS+ server and

finds none.

4. The client system consults the /etc/resolv.conf file to determine the name resolution search list and

the address of the local DNS server.

5. The client system resolver routines send a recursive DNS query regarding the return address of

ftp.internic.net to the local DNS server. At this point, the client will wait until the local server has

completed name resolution.

6. The local DNS server consults the contents of its cached information in case this query has been

tried recently. If the answer is in local cache, it is returned to the client as a non-authoritative

answer.

7. The local DNS server contacts the appropriate DNS server for the internic.net domain (if known) or a

root server, and sends an iterative query. In this example, the assumption is that the answer is not

cached and root server must be contacted.

8. The root server returns the best information it has. In this case, the only information you can be

guaranteed that the root server will have is the names and addresses of all the net.servers. The root

server returns these names and addresses along with a time-to-live value specifying how long the local

name server can cache this information.

9. The local DNS server contacts one of the net.servers returned from the previous query, and transmits

the same iterative query sent to the root servers earlier.

10. The net.server contacted returns the best information it has, which is the names and addresses of

the internic.net. servers along with a time-to-live value.

11. The local DNS server contacts one of the internic.net. servers and makes the same query.

12. The internic.net. servers return the address of the ftp.internic.net along with the time-to-live

value.

13. The local DNS server returns the requested address to the client system and the ftp command can

proceed.

14. Now this address for ftp.internic.net will be cached in local DNS server for future queries.
Linux联盟收集整理
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP