ikkhksvu 发表于 2024-9-30 15:57:25

一文看懂:网址,URL,域名,IP位置,DNS,域名解析


    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">公众号关注&nbsp;“菜鸟要飞”</span></p><span style="color: black;">设为 “</span><span style="color: black;">星标</span><span style="color: black;">”,和12万程序员<span style="color: black;">一块</span>成长!</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_png/1J6IbIcPCLanG2nzjVZov1VibmPXR7lDibFjRdTvH1iaDz9ic4H3xRZCz7BM563rFFfvRukzX7uhOqXc8yDhEZqicFQ/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"><span style="color: black;"><span style="color: black;">源自</span>:猴哥技术站</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">今天给<span style="color: black;">大众</span>梳理一篇关于网址、URL、IP<span style="color: black;">位置</span>、域名、DNS、域名解析的白话长文,并以简单的提问-解答形式让读者更加深刻理解网址、URL、IP<span style="color: black;">位置</span>、域名、DNS、域名解析,<span style="color: black;">期盼</span>有助于读者的学习,面试和工作!</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/WW3ZYUYMtpQunXM9fzw2nvbwxzia50kBnicQzzFoNfWAHbQjkTzvBPjlH9GPTY4Ribnw65Zf0JRhdsX5Hmo5BMl8g/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">1、</span>一个疑问</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">在指出这个问题之前,<span style="color: black;">首要</span><span style="color: black;">咱们</span>要清楚以下几点:</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">互联网上的所有数据都是存储在主机(服务器)上</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">互联网中的所有主机都<span style="color: black;">持有</span><span style="color: black;">独一</span>的IP<span style="color: black;">位置</span></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">互联网中任意两台主机通信都是<span style="color: black;">经过</span>IP<span style="color: black;">位置</span>来实现</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">那样</span><span style="color: black;">认识</span><span style="color: black;">以上</span>内容之后,<span style="color: black;">咱们</span>以两台主机最简单的通信方式——上网为例,为<span style="color: black;">大众</span>说明这个疑问是什么!</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">21世纪的<span style="color: black;">每一个</span>人应该都<span style="color: black;">熟练</span>网上冲浪(不知道还有<span style="color: black;">无</span>人用这个词)的过程,<span style="color: black;">咱们</span>上网的实质<span style="color: black;">便是</span>获取网址对应主机上的数据并在用户主机上进行展示(浏览器上),<span style="color: black;">那样</span><span style="color: black;">咱们</span>就该<span style="color: black;">可疑</span>一个问题:</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">互联网中的任意两台主机通信是依靠IP<span style="color: black;">位置</span>进行的,而<span style="color: black;">咱们</span>上网只是输入的网址,并不是IP<span style="color: black;">位置</span>,怎么就能找到对方主机并获取它的数据呢?</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/WW3ZYUYMtpQunXM9fzw2nvbwxzia50kBnxnicNKTlxEqzibFzDVTS8A8Q7ahQA4oEEhKtlhq5M6cP5D9qQzwp8DOw/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">一个疑问</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">因此呢</span>,势必存在某种机制,将网址解析<span style="color: black;">作为</span>了IP<span style="color: black;">位置</span>,再<span style="color: black;">经过</span>IP<span style="color: black;">位置</span>进行通信!这个机制<span style="color: black;">亦</span>是贯穿本文所有技术知识的主线!</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;"><span style="color: black;">2、</span>网址</span></strong></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">1. 网址是什么?</span></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">网址,<span style="color: black;">亦</span>叫做域名,又<span style="color: black;">叫作</span>URL,是互联网用户用来标识主机的名字,该名字<span style="color: black;">拥有</span><span style="color: black;">独一</span>性,层次性,字面<span style="color: black;">道理</span><span style="color: black;">能够</span><span style="color: black;">暗示</span>主机的账号、功能、性质、所属的地区或组织,便于所有互联网用户记忆与<span style="color: black;">运用</span>!</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">URL,即Uniform Resource Locator,统一资源定位符,用于指明互联网主机的服务器及<span style="color: black;">详细</span>的网页位置,URL的<span style="color: black;">形成</span>策略与示例如下:</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/WW3ZYUYMtpQunXM9fzw2nvbwxzia50kBnpHBXVEmljatvUwaGOiaXVvngvUKtzkG1ZGQ2aNATVl1o9iclWKqaF0xQ/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">URL<span style="color: black;">形成</span>与示例</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">特点:</span></strong><span style="color: black;">网址命名遵循互联网域名规则,且易于管理,<span style="color: black;">包含</span>分配,确认、回收,<span style="color: black;">同期</span>与主机IP<span style="color: black;">位置</span>进行绑定,在用户<span style="color: black;">拜访</span>域名时能够<span style="color: black;">有效</span>的将网址映射到IP<span style="color: black;">位置</span>(<span style="color: black;">有效</span>由域名服务器<span style="color: black;">保准</span>,详见后文)。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/WW3ZYUYMtpQunXM9fzw2nvbwxzia50kBnIzxZnS0WIgPYia4mFJ4sKBQtuFa0KlA6JyAic7N8pIqViakGmXrsWFMkA/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">网址</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">2. 网址的<span style="color: black;">显现</span><span style="color: black;">处理</span>了什么问题?</span></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">网址/域名/URL的<span style="color: black;">显现</span><span style="color: black;">处理</span>了以下两个问题:</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">问题一:IP<span style="color: black;">位置</span>是互联网中所有主机的统一寻址方式,<span style="color: black;">运用</span>IP<span style="color: black;">位置</span>能够直接<span style="color: black;">拜访</span>互联网上主机数据、资源,但<span style="color: black;">因为</span>IP<span style="color: black;">位置</span>只是一串数据,不<span style="color: black;">拥有</span><span style="color: black;">实质</span><span style="color: black;">道理</span>,<span style="color: black;">引起</span>所有互联网用户记忆起来<span style="color: black;">非常</span>困难。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">问题二:在Internet架构中,几乎所有的应用层软件都不是<span style="color: black;">经过</span>IP<span style="color: black;">位置</span>来<span style="color: black;">拜访</span>互联网中的主机资源,而是<span style="color: black;">需求</span>用户输入<span style="color: black;">拥有</span><span style="color: black;">必定</span><span style="color: black;">道理</span>的主机名字来<span style="color: black;">拜访</span>对应主机的。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/WW3ZYUYMtpQunXM9fzw2nvbwxzia50kBnYKEdF8sTgU63fvOLmeysSbPd1SDf2Mgicvcz844zoHY9qibBFJe1CJng/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">IP<span style="color: black;">位置</span>记忆困难</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">3. 网址的结构<span style="color: black;">构成</span></span></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">上面<span style="color: black;">说到</span>的主机名<span style="color: black;">叫作</span>,<span style="color: black;">亦</span><span style="color: black;">便是</span>网址/域名的命名遵循了<span style="color: black;">必定</span>规则,这个规则便<span style="color: black;">是由于</span>互联网中的“名字管理<span style="color: black;">公司</span>”来制定的,即域名系统DNS。<span style="color: black;">这儿</span>先介绍下网址的<span style="color: black;">构成</span>:</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">互联网中的某台主机域名由其所属各级域名及其<span style="color: black;">自己</span>名字<span style="color: black;">一起</span><span style="color: black;">构成</span>(即由子域名<span style="color: black;">形成</span>),级别从左到右依<span style="color: black;">增多</span>,最右边为顶级域名,最左边为主机自己的名字,各级子域名<span style="color: black;">运用</span>“.”隔开,<span style="color: black;">平常</span>的格式如下:</span></p><span style="color: black;">主机名.<span style="color: black;">公司</span>名.网络名.顶级域名&nbsp;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/WW3ZYUYMtpQunXM9fzw2nvbwxzia50kBn8KbbkGRVPXJwG1QSAKcGPrds3z6BQplukiaq3JGhC4YAibxtyGLoTRbQ/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">中科大域名<span style="color: black;">构成</span></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">下面将<span style="color: black;">仔细</span>介绍上图<span style="color: black;">说到</span>的域名系统DNS,<span style="color: black;">包含</span>DNS诞生<span style="color: black;">处理</span>了什么问题,域名发展史,域名层级,部分顶层域名对象,域名服务器,域名解析过程与IP技术拓展!</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">3、</span>DNS域名系统</strong></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">1. DNS是什么?</span></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">DNS,英文全写为Domain Name System,中文意思为域名系统,是互联网中<span style="color: black;">供给</span>域名与IP<span style="color: black;">位置</span>互相映射的分布式数据库。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">2. DNS发展史</span></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/WW3ZYUYMtpQunXM9fzw2nvbwxzia50kBnia3OPV0uINqSQU5w8ICCMBAXL3CC4iaBwyUdnqafEX1Olxw0TW49y2fQ/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">DNS发展史</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">3. DNS<span style="color: black;">处理</span>了什么问题?</span></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">前文<span style="color: black;">已然</span><span style="color: black;">说到</span>DNS域名系统是互联网中的主机域名管理系统,充当“管理员”的角色!DNS在诞生之前(ARPANET时期),互联网中的每台主机都是用一个文件来纪录所有的主机名及其IP<span style="color: black;">位置</span>,这个文件<span style="color: black;">便是</span>hosts.txt (<span style="color: black;">此刻</span>是hosts文件,无后缀),所有主机都必须<span style="color: black;">定时</span>从相应站点来更新该文件,用于同步互联网中主机的新增、变更、消失。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/WW3ZYUYMtpQunXM9fzw2nvbwxzia50kBnMSxSFfR5lnCSV2CYh5w0ic7c7XjKgxqkMaPicaC0AlzZfGcwv1VxFmHA/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">hosts文件内容</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">能够</span>想象,随着互联网中的主机数量<span style="color: black;">增多</span>,hosts文件必将越来越大,在<span style="color: black;">守护</span>更新方面的难度<span style="color: black;">更加是</span>激增,主机名<span style="color: black;">更加是</span>频繁<span style="color: black;">出现</span>冲突,为<span style="color: black;">认识</span>决这个问题,1983年DNS域名系统<span style="color: black;">面世</span>。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/WW3ZYUYMtpQunXM9fzw2nvbwxzia50kBnmzhqVuRoozkWicb09X6YdrzqticvnItFzdu5hsD849dSrAWlYtsgsR4Q/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">DNS<span style="color: black;">处理</span>了什么问题</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">4. DNS域名层次结构</strong></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">DNS是一个分层的树形结构,各层由域<span style="color: black;">形成</span>,域的<span style="color: black;">道理</span>如下:</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">域<span style="color: black;">暗示</span>一个区域、一个范围</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">每一个</span>域可容纳<span style="color: black;">海量</span>主机</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">每一个</span>主机必有自己的域,却不<span style="color: black;">必定</span>有自己的域名<span style="color: black;">位置</span></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">DNS标准规定,单个域名长度<span style="color: black;">通常</span>在63个字符以内,最长不超过255个字符</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">DNS标准规定,域名中的字符限26个字母(不分<span style="color: black;">体积</span>写),数字,连字符“-”(<span style="color: black;">不可</span><span style="color: black;">做为</span>子 域名首字母与末尾字母)</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">域所在服务器<span style="color: black;">叫作</span>为域名服务器,<span style="color: black;">重点</span>用于将域名映射为IP<span style="color: black;">位置</span>(详见后文)</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">DNS的域名树由根域,顶级域,二级域及其子域<span style="color: black;">形成</span>,其结构图与示例如下:</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/WW3ZYUYMtpQunXM9fzw2nvbwxzia50kBnbAkOR3pdRTJEG5ibWAEzAqNIAiab8VeH9GCmOPkP5ZxfmkicHMib0uR2rw/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">域名结构</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">下面逐一介绍各级域:</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">根域,由互联网网络信息中心(InterNIC)负责管理,用点“.”<span style="color: black;">暗示</span>,无名<span style="color: black;">叫作</span>,是域名系统中的最高级别域,标准域名结尾应<span style="color: black;">包括</span>根域“.”,但<span style="color: black;">实质</span><span style="color: black;">运用</span>中该根域都是省略的,<span style="color: black;">因此</span><span style="color: black;">大众</span><span style="color: black;">平常</span>的网址末尾并<span style="color: black;">无</span>“.”。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">顶级域(Top-Level Domains = TLD),隶属于根域,是仅次于根域的下一级域,由国家顶级域(ccTLD)与通用顶级域(gTLD)<span style="color: black;">一起</span><span style="color: black;">构成</span>。国家顶级域共有243个(即<span style="color: black;">全世界</span>的国家与地区总数),而通用顶级域,<span style="color: black;">亦</span>叫国际域名,其数量是随着因特网的发展在<span style="color: black;">逐步</span><span style="color: black;">增多</span>,理论会达到无穷多个。下表<span style="color: black;">陈列</span>出了<span style="color: black;">平常</span>的通用顶级域名:</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/WW3ZYUYMtpQunXM9fzw2nvbwxzia50kBnMk9vYFjXoibj42dAaa4HtCz1biboljiatZibIC60zCsoJonY2VKnEGvF7g/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">通用顶级域名</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">二级域,正式给组织和个人注册<span style="color: black;">运用</span>的<span style="color: black;">独一</span>名<span style="color: black;">叫作</span>,如亚马逊、IBM,微软的官方网址(头条<span style="color: black;">不可</span>带网址)中的字眼“amazon”“ibm”“microsoft”<span style="color: black;">便是</span>这些企业注册的二级域名。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">二级域以下子域,在二级域中的组织<span style="color: black;">公司</span><span style="color: black;">能够</span><span style="color: black;">按照</span>需要来进一步划分子域,如<span style="color: black;">营销</span><span style="color: black;">分部</span>用sale子域名,业务<span style="color: black;">分部</span>用business子域名等。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">前文中<span style="color: black;">已然</span><span style="color: black;">说到</span>域名的<span style="color: black;">显现</span>是为<span style="color: black;">认识</span>决用户记忆困难的问题,<span style="color: black;">实质</span>在互联网中并<span style="color: black;">不可</span><span style="color: black;">运用</span>域名进行主机间的通信,而仍然需要<span style="color: black;">运用</span>IP<span style="color: black;">位置</span>进行数据交互,<span style="color: black;">因此</span>DNS系统在<span style="color: black;">供给</span>域名功能的<span style="color: black;">同期</span>更大的<span style="color: black;">功效</span>是能够<span style="color: black;">有效</span>的将域名解析映射到对应主机的IP<span style="color: black;">位置</span>。这<span style="color: black;">便是</span>即将为<span style="color: black;">大众</span>介绍的域名服务器的<span style="color: black;">功效</span>。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">5. 域名服务器</span></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">域名服务器构<span style="color: black;">成为了</span>DNS中的分布式网络系统,其功能<span style="color: black;">重点</span>是为内外主机<span style="color: black;">供给</span>域名与IP<span style="color: black;">位置</span>的互相解析映射服务。域名服务器分布在互联网的各子网中,<span style="color: black;">每一个</span>域名服务器负责管理连接到本子网的所有主机,并为其<span style="color: black;">供给</span>服务,服务内容为:</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">客户机应用程序将<span style="color: black;">目的</span>主机域名发送给其所属子网的域名服务器,域名服务器给该客户机返回对应的<span style="color: black;">目的</span>主机IP<span style="color: black;">位置</span>;若本子网中的域名服务器<span style="color: black;">没法</span><span style="color: black;">查找</span>到<span style="color: black;">目的</span>主机域名的IP,则<span style="color: black;">按照</span>DNS的标准IP<span style="color: black;">位置</span>解析流程<span style="color: black;">供给</span>进一步的<span style="color: black;">查找</span>服务,该过程将在下文“域名解析过程”中<span style="color: black;">仔细</span>介绍。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">4、</span>域名解析过程</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">经过</span>域名获取对应IP<span style="color: black;">位置</span>的过程叫做域名解析,参与域名解析过程最重要的单元<span style="color: black;">便是</span>域名服务器,域名服务器的体系结构如下:</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/WW3ZYUYMtpQunXM9fzw2nvbwxzia50kBnIzRlACG9jqmDOngXawicmEOicjltrsQQiaHfFc6Tb5FBUWTdqWYqAEbhA/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">域名服务器的结构</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">根域名服务器,是<span style="color: black;">全世界</span>级别最高,最重要的域名服务器,全世界共有13台(IPv4根域名服务器,编号为A到M),1个主根服务器和9个辅根服务器在美国,欧洲2个辅根服务器,<span style="color: black;">位置于</span>英国和瑞典,亚洲1个辅根服务器,<span style="color: black;">位置于</span>日本。根域名服务器只纪录其下级顶级域名服务器的域名及其IP<span style="color: black;">位置</span>,当低级域名服务器遇到<span style="color: black;">没法</span>解析的域名时,<span style="color: black;">首要</span>会向根域名服务器求助。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">顶级域名服务器,级别同顶级域,用于纪录注册在该顶级域名服务器上的所有二级域名并<span style="color: black;">供给</span>DNS<span style="color: black;">查找</span>服务。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">权限域名服务器,为一个区域的主机<span style="color: black;">供给</span>DNS<span style="color: black;">查找</span>服务,<span style="color: black;">倘若</span><span style="color: black;">查找</span>结果为空,则<span style="color: black;">通告</span>发起请求的DNS用户应到哪个权限域名服务器进一步<span style="color: black;">查找</span>。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">☆本地域名服务器,不在上图的域名服务器体系中,但在域名解析中<span style="color: black;">装扮</span>重要的角色。每主机发出的DNS域名<span style="color: black;">查找</span>请求<span style="color: black;">首要</span>都会发送到本地域名服务器。本地域名服务器<span style="color: black;">能够</span>设立在个人,大学,<span style="color: black;">机构</span>等<span style="color: black;">各样</span>范围内,又叫做首选DNS(很<span style="color: black;">熟练</span>吧),<span style="color: black;">便是</span><span style="color: black;">咱们</span>计算机网络连接中的首选DNS:</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/WW3ZYUYMtpQunXM9fzw2nvbwxzia50kBnXZK632NibcgluUZxCH4IGYXR4MCHNCp0lDdEcMx7XolFmkQfib6l4PoQ/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">本地DNS服务器</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">一张图看懂域名解析全过程:</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/WW3ZYUYMtpQunXM9fzw2nvbwxzia50kBntXdA9EuIWnJxtujI3mdh5049NdmH5QeGPNh49gfZAPbRtEW7qJSr0Q/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">域名解析<span style="color: black;">仔细</span>过程</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">上图以用户<span style="color: black;">拜访</span>头条网站为例,简明扼要的为<span style="color: black;">大众</span>讲述了用户输入网址到获取IP<span style="color: black;">位置</span>的全过程,下面<span style="color: black;">咱们</span>来<span style="color: black;">仔细</span>解释该过程:</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">用户打开计算机,在浏览器中输入头条网址后计算机将向本地DNS服务器发起域名解析请求。本地DNS服务器<span style="color: black;">一般</span>由互联网服务<span style="color: black;">供给</span>商(ISP)<span style="color: black;">供给</span>,如三大运营商。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">本地DNS服务器接收到用的DNS请求后,<span style="color: black;">首要</span><span style="color: black;">查找</span>其<span style="color: black;">自己</span>缓存纪录中<span style="color: black;">是不是</span>存在头条域名对应的IP<span style="color: black;">位置</span>,<span style="color: black;">倘若</span>存在,则直接将该IP<span style="color: black;">位置</span>回传给用户计算机;否则,将进一步向根域名服务器发起求助。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">因为</span>根域名服务器只会纪录其下级的13个顶级域名服务器,而不会直接纪录域名与IP的映射关系,<span style="color: black;">因此</span>在接收到本地域名服务器的解析请求时,根域名服务器将<span style="color: black;">通知</span>本地服务器:“你所请求的域名由.com顶级域名服务器管理,其IP为xxx”。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">本地DNS服务器进一步向.com顶级域名服务器发起域名解析请求,<span style="color: black;">因为</span>.com域名服务器<span style="color: black;">亦</span>不会纪录域名与IP的映射关系,而是<span style="color: black;">通知</span>请求者去该域名所属的域服务器上<span style="color: black;">查找</span>,并给出其IP<span style="color: black;">位置</span>。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">本地DNS服务器继续向域服务器发起头条域名解析请求,便会得到头条域名对应的IP<span style="color: black;">位置</span>,<span style="color: black;">此时</span>本地DNS服务器不仅会向用户计算机返回IP<span style="color: black;">位置</span>,<span style="color: black;">同期</span>在其<span style="color: black;">自己</span>缓存中<span style="color: black;">增多</span>头条域名与其IP的纪录,从而加快其他计算机获取头条域名对应IP的解析速度。</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">总结</strong></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">本文以通俗易懂的语言结合<span style="color: black;">实质</span>问题<span style="color: black;">仔细</span>阐述了网址、域名、IP<span style="color: black;">位置</span>、URL、域名服务器、域名解析等<span style="color: black;">关联</span>技术原理,并配置了细致的示意图,让内容更易于读者理解、记忆。<span style="color: black;">期盼</span>有利于读者的学习、工作!</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">说个题外话,鸟哥是个比较<span style="color: black;">爱好</span>折腾的程序员,业余<span style="color: black;">爱好</span><span style="color: black;">研发</span>自己网站、小程序、App等,这些东西统统离不开服务器!<span style="color: black;">近期</span>就围绕服务器的主题创建了一个<span style="color: black;">微X</span>群,<span style="color: black;">爱好</span>玩服务器<span style="color: black;">或</span>想自己<span style="color: black;">研发</span>一款<span style="color: black;">制品</span>的读者<span style="color: black;">能够</span>进来,相互学习交流!我<span style="color: black;">亦</span>会时不时的带<span style="color: black;">大众</span>撸点和服务器<span style="color: black;">关联</span>的优惠券!不感兴趣,不<span style="color: black;">爱好</span>折腾的就<span style="color: black;">不必</span>凑着闹了!</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">识别二维码,添加<span style="color: black;">微X</span>后</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">发送【服务器】<span style="color: black;">就可</span>获取邀请链接</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">这是我<span style="color: black;">安排</span>的<span style="color: black;">设备</span>人,请勿调戏!</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">举荐</span>阅读</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><a style="color: black;">有点<span style="color: black;">敏锐</span>,老铁们低调<span style="color: black;">运用</span>就好!</a></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><a style="color: black;"><strong style="color: blue;">厉害了,没想到成</strong></a><strong style="color: blue;">人网站用的技术都甩<span style="color: black;">咱们</span>几条街!</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><a style="color: black;"><strong style="color: blue;">前女友让我破解植物大战僵尸!我干脆撸了一款<span style="color: black;">同样</span>的</strong></a></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><a style="color: black;"><strong style="color: blue;">....翻身舔狗把歌唱呀</strong></a></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"></p>




m5k1umn 发表于 5 天前

你说得对,我们一起加油,未来可期。
页: [1]
查看完整版本: 一文看懂:网址,URL,域名,IP位置,DNS,域名解析