recursion:递归,是一个name server在自己不能提供授权解析的前提下,代替resolver去向其他name server请求解析,待自己得到结果后,再将这个结果返回给local dns(resolver)。递归不一定就是直接向root去查,而是先在自己的cache里查找这个域名的就近name server。递归的时候总是将原样查询请求发送给其他Name server,而不会修改它。
A name server that receives a recursive query that it can't answer itself will query the "closest known" name servers. The closest known name servers are the servers authoritative for the zone closest to the domain name being looked up. For example, if the name server receives a recursive query for the address of the domain name girigiri.gbrmpa.gov.au, it will first check whether it knows which name servers are authoritative for girigiri.gbrmpa.gov.au. If it does, it will send the query to one of them. If not, it will check whether it knows the name servers for gbrmpa.gov.au, and after that gov.au, and then au. The default, where the check is guaranteed to stop, is the root zone, since every name server knows the domain names and addresses of the root name servers.
Iteration:反复查询,指的是一个name server在自己不能提供授权解析的前提下,直接告诉resolver 你该去某某name server上查。自己只是想指路一样,并不替人跑一圈,local dns在接到回复后,自己再屁颠屁颠的跑去问那台name server,可能那台name server又告诉它一个地址,local dns就又屁颠屁颠的跑去了。
文章评论
我耗子:)
为什么查询的时候都是去找相邻上一级的name server
而不是直接去找根(我记得原理上是直接找根,根在向下一级一级的找呀) ?
为了更快速的找到,比如查xx.aaa.com这个域,如果缓存里恰好有aaa.com,那它就直接找这个。
谢谢:)我懂了。你的blog真是好呀!!!
谢谢哦~~