北京dns服务器ip地址
By the end of this article, you should have a better understanding of:
在本文末尾,您应该对以下内容有更好的了解:
There are some essential mental models to be familiar with when learning about DNS, DNS servers, and IP addresses. Going over these concepts now, before starting to learn about DNS, will
在学习DNS,DNS服务器和IP地址时,有一些基本的思维模型需要熟悉。 在开始了解DNS之前,现在仔细研究这些概念,将会
Mental models give you a frame of reference when things get a little weird and unfamiliar.
当事情变得有些奇怪和陌生时,心理模型会为您提供参考。
So let’s lay the groundwork.
因此,让我们奠定基础。
Client-server relationship. In simplest terms, a server is a software or hardware device that provides functionality for other software or hardware devices, called “clients.”
客户-服务器关系。 用最简单的术语来说,服务器是指为其他软件或硬件设备(称为“客户端”)提供功能的软件或硬件设备。
Client-server relationship. In simplest terms, a server is a software or hardware device that provides functionality for other software or hardware devices, called “clients.”
客户-服务器关系。 用最简单的术语来说,服务器是指为其他软件或硬件设备(称为“客户端”)提供功能的软件或硬件设备。
Prepare for a lot of talk about servers. As it turns out, there’s a whole lot of servers that go into this thing we call DNS, and how we, as humans, use it when we connect to the Internet.
准备大量有关服务器的讨论。 事实证明,有很多服务器都在使用我们称之为DNS的服务器,以及当我们连接到Internet时,我们作为人类如何使用它。
The Domain Name System (DNS) maps human-readable domain names (in URLs or in email address) to IP addresses. For example, DNS translates and maps the domain freecodecamp.org to the IP address 104.26.2.33.
域名系统(DNS)将人类可读的域名(在URL或电子邮件地址中)映射到IP地址。 例如,DNS会将域名freecodecamp.org转换并映射到IP地址104.26.2.33。
To help you fully understand this description, this section details:
为了帮助您完全理解此描述,本节详细介绍:
In 1966, the Advanced Research Projects Agency (ARPA), a US government agency, founded a computer network called ARPAnet. In simple terms, think of ARPAnet as the first iteration of what we now know today as the Internet.
1966年,美国政府机构高级研究计划局(ARPA)建立了一个名为ARPAnet的计算机网络。 简而言之,可以将ARPAnet视为我们如今所知的Internet的第一版。
The main goals of ARPAnet included
ARPAnet的主要目标包括
“(1) providing reliable communication even in the event of a partial equipment or network failure, (2) being able to connect to different types of computers and operating systems and (3) being a cooperative effort rather than a monopoly controlled by a single corporation. In order to provide reliable communication in the face of equipment failure, ARPANET was designed so that no one point or link was more critical than any other. This was accompanied by the building of redundant routes and the use of on-the-fly rerouting of data if any part of the network failed.”
“(1)即使在部分设备或网络出现故障的情况下也能提供可靠的通信;(2)能够连接到不同类型的计算机和操作系统,并且(3)是一种合作而不是由一个人控制的垄断公司。 为了在设备出现故障时提供可靠的通信,ARPANET的设计使任何一个点或链接都比其他任何一个都更为关键。 如果网络的任何部分发生故障 ,则需要建立冗余路由并使用实时数据重新路由。 ”
DNS and TCP/IP were critical in solving two issues with ARPAnet:
DNS和TCP / IP对于解决ARPAnet的两个问题至关重要:
For ARPAnet, there was a single location (a file called HOSTS.TXT) that contained all name-to-address mapping for every host on the network.
对于ARPAnet,只有一个位置(名为HOSTS.TXT的文件)包含网络上每个主机的所有名称到地址的映射。
“HOSTS.TXT was maintained by SRI’s Network Information Center (dubbed “the NIC”) and distributed from a single host, SRI-NIC.[*] ARPAnet administrators typically emailed their changes to the NIC, and periodically FTP’ed to SRI-NIC and grabbed the current HOSTS.TXT file. Their changes were compiled into a new HOSTS.TXT file once or twice a week.”
“ HOSTS.TXT由SRI的网络信息中心 (称为“ NIC”)维护,并从单个主机SRI-NIC分发。[ * ] ARPAnet管理员通常将其更改通过电子邮件发送到NIC,并定期通过FTP发送到SRI- NIC并获取了当前的HOSTS.TXT文件。 他们的更改每周一次或两次被编译到一个新的HOSTS.TXT文件中。 ”
There were three challenges with this set-up:
此设置面临三个挑战:
In essence, HOSTS.TX was a single point of failure, so the entire process here didn’t scale well past a certain number of hosts. ARPAnet needed a decentralized and scalable solution. DNS was it. Source
本质上,HOSTS.TX是一个单点故障,因此此处的整个过程无法很好地扩展到超过一定数量的主机。 ARPAnet需要一个分散和可扩展的解决方案。 DNS就是这样。 资源
Host-to-host communication within the same network wasn’t reliable enough. TCP/IP helped solve this issue.
同一网络内的主机到主机通信不够可靠。 TCP / IP帮助解决了这个问题。
By the early 1980s, DNS and TCP/IP (and therefore, IP addresses) were standard operating procedures for the ARPAnet.
到1980年代初,DNS和TCP / IP(以及IP地址)已成为ARPAnet的标准操作程序。
This history is very abridged. If you’d like to learn more about these topics, please reference the Resources section at the end of this article.
这段历史非常简短。 如果您想了解有关这些主题的更多信息,请参考本文末尾的参考资料部分。
Now that we have some historical context, let’s move on to learning more about domain names and IP addresses.
现在我们有了一些历史背景,让我们继续学习有关域名和IP地址的更多信息。
In the context of DNS, a domain name provides a user-friendly way to point to non-local resources. This could be a website, a mail system, print server, or any other server that is available on the Internet. A domain name can be more than just a website!
在DNS的上下文中,域名提供了一种用户友好的方式来指向非本地资源。 这可以是网站,邮件系统,打印服务器或Internet上可用的任何其他服务器。 域名不仅可以是网站!
“The goal of domain names is to provide a mechanism for naming resources in such a way that the names are usable in different hosts, networks, protocol families, internets, and administrative organizations.”
“域名的目标是提供一种资源命名机制,以使名称可以在不同的主机,网络,协议族,互联网和管理组织中使用。 ”
A domain name is much easier to remember and enter into a terminal or Internet browser, than an IP address.
域名比IP地址更容易记住和输入终端或Internet浏览器。
A domain name is part of a Uniform Resource Locator (URL), but the terms are not synonymous. A URL is the complete web address of a resource, while the domain name is the name of a website and is a sub-component of every URL.
域名是统一资源定位器(URL)的一部分,但这些术语不是同义词 。 URL是资源的完整网址,而域名是网站的名称,并且是每个URL的子组件。
While there are technical distinctions between URLs and domain names, web browsers usually treat them the same way, so you’ll get to the website if you type in the complete web address, or just the domain name.
虽然URL和域名之间在技术上有所区别,但是Web浏览器通常以相同的方式对待它们,因此,如果您输入完整的Web地址或仅输入域名,您将进入网站。
There are two parts to any given domain: top-level domain (TLD) and second-level domain (SLD). The parts of a domain name become more specific when moving from the right (end) to the left (beginning).
任何给定域都有两个部分:顶级域(TLD)和二级域(SLD)。 从右(结束)到左(开始)时,域名的各个部分变得更加具体。
This can be confusing at first. For example, let’s look at “freecodecamp.org”
起初这可能会造成混淆。 例如,让我们看一下“ freecodecamp.org”
In the early days of ARPAnet, there were a limited number of TLDs available, including com, edu, gov, org, arpa, mil, and 2-letter country code domains. These TLDs were initially reserved for institutions participating in the ARPAnet, but some later became available on commercial markets.
在ARPAnet成立之初,可用的TLD数量有限,包括com,edu,gov,org,arpa,mil和2个字母的国家/地区代码域。 这些TLD最初是为参加ARPAnet的机构保留的,但后来在商业市场上可用。
Today, there is a comparative wealth of available TLDs, including net, aero, biz, coop, info, museum, name, and others.
如今,有相当数量的可用TLD,包括网络,航空,商务,合作社,信息,博物馆,名称等。
Second-level domains are the domains that are available for individual purchase through domain registrars (for example, Namecheap).
二级域名是可以通过域名注册商(例如Namecheap)个人购买的域名。
While IP addresses are related to DNS in their function, the Internet Protocol itself is technically separate from DNS. I’ve already provided historical context for this distinction, so now I’ll explain how IP addresses function.
尽管IP地址在功能上与DNS相关,但是Internet协议本身在技术上与DNS是分开的。 我已经为这种区别提供了历史背景,因此现在我将解释IP地址的功能。
An IP address, as previously mentioned, is a unique identifier for a specific path that leads to a host on a network. I’d like to reference the analogy of a phone number and a phone: a phone number doesn’t represent the phone itself, it’s just a way to reach the person with the phone.
如前所述,IP地址是指向网络上主机的特定路径的唯一标识符。 我想引用一个电话号码和一个电话的类比:电话号码并不代表电话本身,它只是一种联系电话对象的方式。
This analogy is reasonably appropriate (at least, on a surface level), with IP addresses. An IP address represents an endpoint, but it isn’t the endpoint itself. IP assignments can be fixed (permanent) or dynamic (flexible and may be reassigned).
用IP地址这种类比是合理的(至少在表面上)。 IP地址代表一个端点,但不是端点本身。 IP分配可以是固定的(永久的),也可以是动态的(灵活的,可以重新分配)。
Like a domain name, the organization of IP addresses follows a hierarchical structure. Unlike domain names, IP addresses get more specific going left-to-right. This is an IPv4 example below:
像域名一样,IP地址的组织遵循分层结构。 与域名不同,IP地址的具体含义从左到右。 这是下面的IPv4示例:
If greater specificity is needed, network administrators can subnet the address space and delegate additional numbers.
如果需要更高的特异性, 网络管理员可以将地址空间划分为子网,并委派其他号码 。
IPv4 was the very first iteration of IP that ARPAnet used in production. Deployed in the early 80s, it’s still the most prevalent IP version. It’s a 32-bit scheme, and can therefore support slightly over 4 billion addresses.
IPv4是ARPAnet在生产中使用的IP的第一个迭代。 部署于80年代初期,它仍然是最流行的IP版本。 这是一种32位方案,因此可以支持略超过40亿个地址。
But wait, is that enough? Nope.
但是等等,够了吗? 不。
IPv6 has a 128-bit scheme, which allows it to support 340 undecillion addresses. It also offers performance improvements on IPv4.
IPv6具有128位方案,从而可以支持340个十亿地址。 它还可以改善IPv4的性能。
Example IPv4 address:
示例IPv4地址:
Example IPv6 address:
IPv6地址示例:
So, we’ve learned about domain names! We’ve learned about IP addresses! Now how do they relate to the Domain Name System?
因此,我们已经了解了域名! 我们已经了解了IP地址! 现在它们与域名系统有什么关系?
First of all, they fit into the namespace.
首先,它们适合命名空间。
As implied by the language “top” level domain and “second” level domain, the namespace is based on a hierarchy
正如“顶级”域和“第二”级域所暗示的那样,名称空间基于层次结构
“...with the hierarchy roughly corresponding to organizational structure, and names using "." as the character to mark the boundary between hierarchy levels.” Source.
“ ...的层次结构大致对应于组织结构,并使用“。”命名。 作为标记层次结构之间边界的字符。” 来源 。
This tree graph, with the root at the top, best illustrates the structure:
该树形图的根在顶部,最能说明该结构:
Let’s break this down, starting at the top.
让我们从顶部开始进行分解。
The top of this graph, noted with a “.” is called the “root.”
该图的顶部用“。”标记 被称为“根”。
“The authoritative name servers that serve the DNS root zone, commonly known as the “root servers”, are a network of hundreds of servers in many countries around the world. They are configured in the DNS root zone as 13 named authorities.”
“为DNS根目录区域提供服务的权威名称服务器,通常称为“根服务器”,是由世界许多国家的数百个服务器组成的网络。 它们在DNS根区域中配置为13个命名机构。 ”
The root domain has a zero-length label.
根域的长度为零。
From here-on down, each node (dot) in the graph has a unique label up to 63 characters long.
从现在开始,图形中的每个节点(点)都有一个唯一的标签,最长为63个字符。
The first level down from the root are the TLDs: the com, org, edu, and gov. Please note that this graph does not contain a full list of TLDs.
从根目录开始的第一层是TLD:com,org,edu和gov。 请注意,此图不包含TLD的完整列表。
Below TLDs are the SLDs, the second-level domains. The children of each node are called “subdomains,” which are still considered part of the parent domain. For example, in freecodecamp.org, freecodecamp (the SLD) is a subdomain of org (the TLD).
TLD下方是SLD,即二级域。 每个节点的子节点称为“子域”,仍被视为父域的一部分。 例如,在freecodecamp.org中,freecodecamp(SLD)是org(TLD)的子域。
Depending on the hierarchy of the website, there may be third-, fourth, fifth- level domains. For example, in hypothetical-subdomain.freecodecamp.org, hypothetical-subdomain is the third-level domain, and the subdomain of freecodecamp. So on and so forth, at least up to 127 levels, which is the maximum allowed by DNS.
根据网站的层次结构,可能会有第三,第四,第五级域。 例如,在hypothetical-subdomain.freecodecamp.org中,hypothetical-subdomain是第三级域,也是freecodecamp的子域。 依此类推,至少达到127个级别,这是DNS所允许的最大值。
Wouldn’t it be nuts to try to have one person or organization administer everything? Yes, it would. Especially because one of the chief design goals of DNS was to promote distributed, decentralized management of the system at large.
尝试让一个人或组织来管理所有事情不是很疯狂吗? 是的,会的。 特别是因为DNS的主要设计目标之一是促进整个系统的分布式,分散式管理。
I wish I could tell you the folks in charge are called the “Namespace Kings,” but alas.
我希望我能告诉您负责的人被称为“命名空间之王”,但是a。
Each domain (or subdomain) in the domain namespace is or is part of a zone, “an autonomously administered piece of the namespace.” So, the namespace is broken into zones.
域名称空间中的每个域(或子域)都属于区域 “ 区域名称 ”的一部分,或者是该区域的一部分。 因此,名称空间分为多个区域。
Responsibility for those zones is managed through delegation and administration.
这些区域的责任通过授权和管理来管理。
The process of assigning the responsibility of subdomains to other entities is called delegation.
将子域的职责分配给其他实体的过程称为委托。
For example, the Public Interest Registry administers the domain name org, and has since 2003. Public Interest Registry may delegate responsibility to other parties to manage subdomains of org, say freecodecamp. And then whoever administers freecodecamp may assign responsibility for the subdomains of freecodecamp (for example, hypothethical-subdomain.freecodecamp.com) to another party.
例如,公共利益注册机构管理着域名org,并且自2003年以来一直运营。公共利益注册机构可以将责任委托给其他方来管理组织的子域,例如freecodecamp。 然后,负责管理freecodecamp的人可以将对freecodecamp的子域(例如,hypothethical-subdomain.freecodecamp.com)的责任分配给另一方。
If someone (an organization, team, or individual) administers a zone, what they’re doing is administering the nameserver that is responsible for the zone.
如果某人(组织,团队或个人)管理区域,那么他们正在做的事情就是管理负责该区域的名称服务器 。
This brings us into one of the most foundational concepts in the Domain Name System.
这使我们进入了域名系统中最基础的概念之一。
“The programs that store information about the domain namespace are called nameservers.”
“存储有关域名称空间信息的程序称为名称服务器。 ”
At this point is where thinking about a client-server relationship, at least initially, is useful. Domain nameservers are the “server” side of the client-server relationship. Nameservers may load one, hundreds, or even thousands of zones, but they never load the entire namespace. Once a nameserver has loaded the totality of a zone, it is said to be authoritative for that zone.
在这一点上,至少在最初考虑客户端-服务器关系是有用的。 域名服务器是客户端-服务器关系的“服务器”端。 名称服务器可以加载一个,数百甚至数千个区域,但是它们从不加载整个名称空间。 一旦名称服务器加载了整个区域,就可以说该服务器是该区域的权威 。
To understand why nameservers function the way they do, it’s useful to understand the “client” part of the relationship.
要了解名称服务器为何以这种方式发挥作用,了解关系的“客户端”部分很有用。
In DNS, the client (the requester of information) is called the “resolver,” which may seem backward at first. Wouldn’t the server that is resolving the request be called the “resolver?” I thought so, too, but it’s not. Best to just memorize that and move on.
在DNS中,客户端(信息的请求者)被称为“解析器”,乍一看似乎是倒退的。 解析请求的服务器不会被称为“解析器”吗? 我也这样认为,但事实并非如此。 最好只是记住并继续前进。
Resolvers are typically included, de facto, in most operating systems, so the applications installed on the OS don’t have to figure out how to make low-level DNS queries.
实际上,大多数操作系统通常都包含解析器,因此,操作系统上安装的应用程序不必弄清楚如何进行低级DNS查询。
DNS queries and their responses are types of DNS messages, and have their own data transport protocol (usually UDP). Resolvers are responsible for helping applications installed on the OS translate requests for DNS-related data into DNS queries.
DNS查询及其响应是DNS消息的类型,并且具有自己的数据传输协议(通常为UDP)。 解析程序负责帮助操作系统上安装的应用程序将对DNS相关数据的请求转换为DNS查询。
In sum, resolvers are responsible for packaging and sending off requests for data. Once the resolver receives the response (if at all), it passes that back to the original requesting application in a format consumable to the requesting application.
总之,解析器负责打包和发送数据请求。 解析器一旦收到响应(如果有的话),便会将其以消耗给请求应用程序的格式传递回原始请求应用程序。
Now that we are a bit more familiar with the client-side of the relationship, we need to understand how domain nameservers respond to resolver queries.
现在,我们对这种关系的客户端有了更多的了解,我们需要了解域名服务器如何响应解析器查询。
Nameservers respond to DNS queries through resolution. Resolution is the process by which nameservers find datafiles in the namespace. Depending on the type of query, nameservers respond differently to different queries, but the end goal is resolution.
域名服务器通过解析来响应DNS查询。 解析是名称服务器在名称空间中查找数据文件的过程。 根据查询的类型,名称服务器对不同查询的响应方式不同,但是最终目标是解析。
Type of query? Yes, there are multiple types of DNS queries. But first, what’s usually in a DNS query? It’s a request for information, specifically for the IP address associated with a domain name.
查询类型? 是的,有多种类型的DNS查询。 但是首先,DNS查询通常是什么? 这是对信息的请求,特别是对于与域名关联的IP地址的信息。
Recursive: recursive queries allow the query to be referred on to multiple nameservers to be resolved. If the first queried nameserver doesn’t have the desired data, then that nameserver sends the query along to the most appropriate next nameserver, until the nameserver with the desired datafiles is found and sends a response to the resolver.
递归 :递归查询允许将查询引用到多个要解析的名称服务器上。 如果第一个查询的名称服务器没有所需的数据,则该名称服务器会将查询发送到最合适的下一个名称服务器,直到找到具有所需数据文件的名称服务器,并将响应发送到解析器。
Iterative: iterative queries require the queried nameserver to respond either with the desired data or with an error. The response may contain the IP address of the most appropriate nameserver to send the request to next; the resolver may then send another request to that, more appropriate, nameserver.
迭代 :迭代查询需要查询的名称服务器以所需的数据或错误进行响应。 响应中可能包含最合适的名称服务器的IP地址,以将请求发送到下一个; 解析器然后可以向该更合适的名称服务器发送另一个请求。
In case you need it, you can also query for the domain name, if all you have is the IP address. This is called a reverse DNS lookup.
如果您需要的话,如果您只有IP地址,也可以查询域名。 这称为反向DNS查找。
Once the query reaches a nameserver that contains the desired datafiles, then the query can be resolved. Nameservers have a number of datafiles associated with them, all or some of which may be used to resolve the query.
一旦查询到达包含所需数据文件的名称服务器,就可以解决该查询。 名称服务器具有许多与之关联的数据文件,所有或部分数据文件可用于解析查询。
These are the datafiles in the domain namespace. These datafiles have specific formats and contents.
这些是域名称空间中的数据文件。 这些数据文件具有特定的格式和内容。
The most common RRs:
最常见的RR:
Other important Resource Record (RR) types are PR, NS, SRV, and MX. Read about them here.
其他重要的资源记录(RR)类型是PR,NS,SRV和MX。 在这里阅读有关它们的信息 。
When the local nameserver receives a response from a query, it caches that data (stores it in memory), so next time it receives the same query, it can just answer the query directly rather than go through the original, longer resolution process.
当本地名称服务器收到查询的响应时,它会缓存该数据(将其存储在内存中),因此,下次它收到相同的查询时,它可以直接回答查询,而无需经过原始的较长解析过程。
But once this information is cached, it is both static and isolated, and is therefore at risk of becoming out of date. Therefore, resource records all have what is called a time to live (TTL) value, which dictates how long that data can be cached. When that time runs out (reaches zero), the nameserver deletes the record.
但是,一旦此信息被缓存,它既是静态的又是孤立的,因此有过时的风险。 因此,所有资源记录都具有所谓的生存时间 (TTL)值,该值指示可以将数据缓存多长时间。 当时间用完(达到零)时,名称服务器将删除记录。
Important note: TTL doesn’t apply to the name servers that are authoritative for the zone that contains the resource record. It just applies to the nameserver that cached that resource record.
重要说明:TTL不适用于对包含资源记录的区域具有权威性的名称服务器。 它仅适用于缓存该资源记录的名称服务器。
We’ve covered a lot of ground in this article, and it’s been heavy on the concepts. To tie this all together and make it real, here’s a day (figurative day) in the life of a query.
我们在本文中介绍了很多基础知识,并且对概念进行了大量的介绍。 为了将所有这些联系在一起并使其成为现实,这是查询生命中的一天(象征性的一天)。
There are so many reasons to be familiar with DNS and IP address related concepts.
熟悉DNS和IP地址相关概念的原因有很多。
At this point, you should understand what DNS is and what a nameserver is, as well as be familiar with technical concepts relating to IP addresses.
在这一点上,您应该了解什么是DNS,什么是名称服务器,以及熟悉与IP地址有关的技术概念。
Many books have been written about and dive deeper into the fascinating world of DNS, and there is so much more to learn. The topics that were not included in this article but are either part of DNS or very related include:
已经写了许多书籍,并且深入探讨了迷人的DNS世界,还有很多东西要学习。 本文未包含但与DNS无关或相关性很强的主题包括:
For those of you who are still reading and want to learn more about DNS, I first and foremost recommend “DNS and BIND, 5th Ed.”, written by Cricket Liu and published by O’Reilly Media. It’s invaluable.
对于那些仍在阅读和 要想了解有关DNS的更多信息,我首先推荐由Cricket Liu撰写并由O'Reilly Media出版的“ DNS和BIND,第5版”。 这是无价的。
I also encourage everyone to poke around in the original Request for Comments (RFCs) linked below. Not only are there points for reading primary sources, but they’re also exceptionally well-organized and comprehensible documents, which is why I quoted them in this article.
我还鼓励大家在下面链接的原始“征求意见”(RFC)中四处摸索。 不仅有阅读原始资料的要点,而且它们是组织得很好且易于理解的文档,这就是我在本文中引用它们的原因。
RFC 1034: DOMAIN NAMES - CONCEPTS AND FACILITIES
RFC 1034:域名-概念和功能
RFC 1035: DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION
RFC 1035:域名-实施和规范
RFC 1122: Requirements for Internet Hosts -- Communication Layers
RFC 1122:Internet主机的要求-通信层
More about DNS Design Goals, from Connected: An Internet Encyclopedia
有关“互联网络:DNS百科全书”的DNS设计目标的更多信息
How the Internet was Born from the ARPAnet to the Interpret, from The Conversation
互联网是如何从ARPAnet诞生到口译的,来自The Conversation
Learning DNS Video Course, by Cricket Liu, from O'Reilly Media
O'Reilly Media的Cricket Liu撰写的学习DNS视频课程
I'm Chloe Tucker, an artist and developer in Portland, Oregon. As a former educator, I'm continuously searching for the intersection of learning and teaching, or technology and art. Reach out to me on Twitter @_chloetucker and check out my website at chloe.dev.
我是俄勒冈州波特兰市的艺术家兼开发商Chloe Tucker。 作为前教育工作者,我一直在寻找学与教,技术与艺术的交集。 伸手到我的Twitter上@_chloetucker ,并在检查了我的网站chloe.dev 。
翻译自: https://www.freecodecamp.org/news/what-is-dns/
北京dns服务器ip地址