<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Chan Chen Coding...

    How does DNS work

    Suppose your computer wants to find the IP address of network-surveys.cr.yp.to. It contacts a series of DNS servers around the Internet.

    There are several DNS servers with information about network-surveys.cr.yp.to. A central root server (located at Internet HQ in Virginia) has the following data in a file on disk:

         .:198.41.0.4      
         &to:198.6.1.82
    The root server's IP address is 198.41.0.4; your computer also has this address in a file on disk. Your computer sends its question to the root server, and receives a response from the root server's data:
         +--------+  network-surveys.cr.yp.to?  +-----------+      
         | Your | --------------------------> |198.41.0.4 |
         |computer| <--------------- |root server|
         +--------+ &to:198.6.1.82 +-----------+
    The response &to:198.6.1.82 is a delegation. It says ``For information about .to, ask the DNS server at IP address 198.6.1.82.''

    The DNS server at 198.6.1.82 (also located somewhere in Virginia) has the following data in a file on disk:

         .to:198.6.1.82      &yp.to:131.193.178.160 
    Your computer sends its question to that DNS server, and receives a response:
         +--------+  network-surveys.cr.yp.to?  +----------+      
         | Your | --------------------------> |198.6.1.82|
         |computer| <------------------------ |.to server|
         +--------+ &yp.to:131.193.178.160 +----------+
    The response &yp.to:131.193.178.160 is another delegation. It says ``For information about .yp.to, ask the DNS server at IP address 131.193.178.160.''

    The DNS server at 131.193.178.160 (located in my office in Chicago) has the following data in a file on disk:

         .yp.to:131.193.178.160      =network-surveys.cr.yp.to:131.193.178.100 
    Your computer sends its question to that DNS server, and receives a response:
         +--------+           network-surveys.cr.yp.to?         +---------------+      
         | Your | ------------------------------------------> |131.193.178.160|
         |computer| <------------------------------------------ | .yp.to server |
         +--------+ =network-surveys.cr.yp.to:131.193.178.100 +---------------+
    The response =network-surveys.cr.yp.to:131.193.178.100 finally answers the original question: the IP address of network-surveys.cr.yp.to is 131.193.178.100.

    All of this work is handled by a DNS cache running on your computer. Your computer remembers everything that it learned (for a limited amount of time; information changes!) to save time later. As an alternative, your computer can contact an external DNS cache operated by your Internet service provider; the external DNS cache will do all the work and report the answer.

    Multiple servers

    To protect against computer failure, there are actually several root servers, several .to servers, and two yp.to servers. Each of the root servers has the following information:
        .:198.41.0.4:a      
        .:128.9.0.107:b
        .:192.33.4.12:c
        .:128.8.10.90:d
        .:192.203.230.10:e
        .:192.5.5.241:f
        .:192.112.36.4:g
        .:128.63.2.53:h
        .:192.36.148.17:i
        .:192.58.128.30:j
        .:193.0.14.129:k
        .:198.32.64.12:l
        .:202.12.27.33:m
        &to:128.250.1.21:a
        &to:193.0.0.193:b
        &to:196.7.0.139:c
        &to:206.184.59.10:d
        &to:198.6.1.82:e
        &to:206.86.247.253:f
        &to:148.59.19.11:g
    Each of the .to servers has the following information:
        .to:128.250.1.21:a      
        .to:193.0.0.193:b
        .to:196.7.0.139:c
        .to:206.184.59.10:d
        .to:198.6.1.82:e
        .to:206.86.247.253:f
        .to:148.59.19.11:g
        &yp.to:131.193.178.181:a
        &yp.to:131.193.178.160:b
        # or, in BIND master zone-file format:
        # yp.to IN NS a.ns.yp.to
        # yp.to IN NS b.ns.yp.to
        # a.ns.yp.to IN A 131.193.178.181
        # b.ns.yp.to IN A 131.193.178.160
    Your computer tries the root servers in a random order. When it receives a response from some root server, it moves to the .to servers, and tries them in a random order. It eventually receives the answer from one of the two yp.to servers.

    Reverse lookups

    Suppose your computer sees the IP address 208.33.217.122 and wants to know the corresponding computer name.

    Your computer asks a series of DNS servers about the name 122.217.33.208.in-addr.arpa. The root servers have the following information:

        &33.208.in-addr.arpa:206.228.179.10:c      
        &33.208.in-addr.arpa:144.228.254.10:b
        &33.208.in-addr.arpa:144.228.255.10:a
    The DNS server at IP address 144.228.254.10 has the following information:
        .33.208.in-addr.arpa:144.228.255.10:a      
        .33.208.in-addr.arpa:206.228.179.10:c
        .33.208.in-addr.arpa:144.228.254.10:b
        &217.33.208.in-addr.arpa:209.191.164.20:a
        &217.33.208.in-addr.arpa:206.253.194.65:b
    The DNS server at IP address 209.191.164.20 has the following information:
        .217.33.208.in-addr.arpa:209.191.164.20:a      
        .217.33.208.in-addr.arpa:206.253.194.65:b
        =mm-outgoing.amazon.com:208.33.217.122
    The answer is mm-outgoing.amazon.com.

    Looking up the address for a name, and then the computer name for that address, doesn't necessarily produce the original name. Looking up the computer name for an address, and then the address for that name, doesn't necessarily produce the original address.

     

    1. Your web browser asks the resolving DNS server what the address of www.domainname.com is. Your computer already knows where the local ISP resolving DNS server is through its network configuration. 
    2. The Resolving DNS server does not know the address. So it asks a root server the same question. The 13 root servers have globally well-known IP addresses, and are run by a US-based company called ICANN
    3. The root server replies that it does not know, but it gives the address of the server which knows about .com domains. 
    4. The resolving DNS server asks the .com server what the address of www.domainname.com is. 
    5. The .com server replies that it does not know, but it gives the address of the server which knows about .domainname.com domain. This server is can be a managed server and many companies pay an annual fee (via a domain registar) to maintain this referral for their domain.
    6. The resolving DNS server asks the .domainname.com server what the address of www.domainname.com is. 
    7. The server answers the query with the IP address of www.domainname.com, and marks the response as “authoratitve”. This is an assertion that the answer is correct and complete. It also adds to its reply that “this data is valid for 24 hours”, so that anyone who is asking can confidently re-use the information for that time without having to issue another query. 
    8. The resolving DNS server finally has its answer, and can reply back to the web browser with the IP address. Crucially it marks its answer as “non-authoratitive”, so that the web browser knows it has the information indirectly



    -----------------------------------------------------
    Silence, the way to avoid many problems;
    Smile, the way to solve many problems;

    posted on 2012-02-20 11:47 Chan Chen 閱讀(272) 評(píng)論(0)  編輯  收藏 所屬分類: Network


    只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 亚洲黄色网址在线观看| 亚洲综合区小说区激情区| 久久久久亚洲AV无码麻豆| 成人黄网站片免费视频| 久久久亚洲精品蜜桃臀| xxxxx做受大片视频免费| 中文字幕专区在线亚洲| 两个人看的www视频免费完整版| 亚洲国产成人久久77| 99免费精品视频| 亚洲AV无码欧洲AV无码网站| 人妻丰满熟妇无码区免费 | 国产亚洲美女精品久久| 午夜国产大片免费观看| 全黄A免费一级毛片| 亚洲精品视频在线看| 无码的免费不卡毛片视频| 亚洲人成人无码网www国产| 免费看一级高潮毛片| 亚洲日韩VA无码中文字幕| 午夜网站在线观看免费完整高清观看| 成年女人色毛片免费看| 精品久久亚洲中文无码| 香蕉视频在线观看免费国产婷婷 | 永久久久免费浮力影院| 欧亚一级毛片免费看| 亚洲av永久无码精品古装片| 1000部拍拍拍18勿入免费视频软件 | 中文亚洲AV片在线观看不卡| 香港a毛片免费观看| 亚洲国产日韩精品| 免费在线观看a级毛片| 久草福利资源网站免费| 4虎1515hh永久免费| 456亚洲人成影院在线观| 亚洲国产成人影院播放| 1000部拍拍拍18勿入免费视频下载 | 免费一级e一片在线播放| 两个人看的www免费高清| 亚洲午夜一区二区三区| 亚洲人精品午夜射精日韩|