域服务器的dns:::1_网络101:什么是DNS查询?

域服务器的dns:::1

DNS is a topic which is often considered difficult to understand, but the basic thesis of it is actually not hard to grasp if explained correctly — which is the very aim of this article. The first fundamental point to grasp is that every domain in existence is linked to an Internet Protocol (IP) address. Even though loading up a webpage may seem like magic, it is not. If one were to open up their web browser, put www.example.com into the address bar and hit enter, their computer would then ask a server where to load that website from. In response, this server would respond with an IP address in order to be directed to the website of choice — that is what a Domain Name System (DNS) is.

DNS是一个通常被认为很难理解的主题,但是如果解释正确,它的基本主题实际上并不难理解-这正是本文的目的。 要掌握的第一个基本点是,每个存在的域都链接到Internet协议(IP)地址。 即使加载网页可能看起来很神奇,但事实并非如此。 如果要打开他们的Web浏览器,请将www.example.com放入地址栏中,然后按Enter,他们的计算机将询问服务器从何处加载该网站。 作为响应,该服务器将以IP地址进行响应,以便将其定向到所选的网站-这就是域名系统(DNS)。

In other words, when a user enters a website into the address bar, a translation must occur between the domain that the user types in (www.example.com) and the IP address which the domain is linked to. The task taking place behind the scenes here is referred to as a DNS name resolution. The way in which this works can be compared to how a post code is used in combination with a door number in order to be directed to a literal geographical location. The reason for this is because long digits of numbers (such as 93.184.216.34) which is the IP address for the domain in this scenario would be too difficult for human beings to memorise or remember for each and every website. In order to solve this, the Domain Name System (DNS) was created to operate as a directory for the internet. This particular process is known as a DNS query.

换句话说,当用户在地址栏中输入网站时,必须在用户键入的域(www.example.com)与链接到该域的IP地址之间进行转换。 这里发生在后台的任务称为DNS名称解析。 可以将其工作方式与邮政编码与门号组合使用的方式进行比较,以便直接指向实际地理位置。 这样做的原因是,长数字(例如93.184.216.34)(在这种情况下是域的IP地址)对于人类来说很难为每个网站记住或记住。 为了解决这个问题,创建了域名系统(DNS)作为互联网目录。 此特定过程称为DNS查询。

However, it is important to note that there are three main types of DNS queries and this is where it becomes slightly more technical. These three types being: recursive, non-recursive, and iterative — which may be explained in the following way:

但是,重要的是要注意,DNS查询主要分为三种类型,这在这里变得更加技术化。 这三种类型是:递归,非递归和迭代-可以通过以下方式进行解释:

1. Recursive DNS query — This form of DNS query will attempt to obtain a DNS name resolution by connecting to a Recursive DNS server. Most of these are ran by Internet Service Providers (ISPs) and will be the default for the average user unless they have changed this. Once a computer connects to the assigned Recursive server, it will ask “what is the IP address for this website?”. The first thing that the Recursive server will then do is check to see if the IP address for the URL in question can be located within its local cache. This would be the case if you had visited the website before, as the IP address would be stored in a local repository. If so, the user will successfully be able to load the website. However, if this is not the case and it does not exist within the local cache then the Recursive DNS server will attempt to obtain the IP address through other means.

1.递归DNS查询 -这种形式的DNS查询将尝试通过连接到递归DNS服务器来获得DNS名称解析。 其中大多数都是由Internet服务提供商(ISP)运行的,并且将成为普通用户的默认设置,除非他们对此进行了更改。 一旦计算机连接到分配的递归服务器,它将询问“此网站的IP地址是什么?”。 递归服务器将要做的第一件事是检查URL的IP地址是否可以位于其本地缓存中。 如果您以前访问过该网站,则将是这种情况,因为IP地址将存储在本地存储库中。 如果是这样,则用户将能够成功加载该网站。 但是,如果不是这种情况,并且它在本地缓存中不存在,则递归DNS服务器将尝试通过其他方式获取IP地址。

Fortunately, most ISPs usually provide a Recursive DNS for this very purpose which contains its own cache system so the user does not have to rely on having visited the website before or local cache. The next step in the recursive process would involve trying the request over and over until a response is given. This query is ran multiple times to check if the DNS query can be filled from its own cache or by querying other trusted DNS servers. It moves down its list of trusted DNS servers in a hierarchical order to ensure that the most important DNS servers are checked first. Once this process is complete, the user will either be returned with an IP address, a uniform resource locator (URL) or an error message stating that the request (site) does not exist.

幸运的是,大多数ISP通常为此目的提供一个递归DNS,该DNS包含自己的缓存系统,因此用户不必依赖之前访问过网站或本地缓存的内容。 递归过程的下一步将涉及反复尝试请求,直到给出响应为止。 多次运行此查询以检查DNS查询是否可以从其自身的缓存中填充或通过查询其他受信任的DNS服务器来填充。 它将其受信任的DNS服务器列表按层次结构向下移动,以确保首先检查最重要的DNS服务器。 完成此过程后,将为用户返回IP地址,统一资源定位符(URL)或错误消息,指出该请求(站点)不存在。

2. Non-Recursive DNS Query — This form of DNS query is able to respond immediately as the DNS Resolver already knows how to obtain the answer to the query. The reason for this is because the DNS record will either be stored in the local cache or it will query a DNS name server which is authoritative and definitely holds the IP address for the hostname. In other words, a response is immediately returned to the client because unlike Recursive and Iterative queries, there is no need for additional rounds of queries.

2.非递归DNS查询 -这种形式的DNS查询能够立即响应,因为DNS解析器已经知道如何获取查询的答案。 这样做的原因是因为DNS记录将存储在本地缓存中,或者将查询具有权威性并且肯定拥有主机名IP地址的DNS名称服务器。 换句话说,由于与递归和迭代查询不同,不需要额外的查询回合,因此响应会立即返回到客户端。

3. Iterative DNS query — This form of DNS query works by allowing the client to directly communicate with each DNS server involved in the lookup. This is in contrast to Recursive DNS queries which use a DNS server to communicate with other DNS servers. Once a server has received an iterative query it will either return the IP address of the requested host name, or it will issue a referral which means that it will produce the address of a DNS server that should know. The client is then able to directly issue an iterative query to this referred server.

3.迭代DNS查询 -这种DNS查询形式通过允许客户端直接与查找中涉及的每个DNS服务器进行通信来工作。 这与使用DNS服务器与其他DNS服务器进行通信的递归DNS查询相反。 服务器收到迭代查询后,它将返回请求的主机名的IP地址,或者发出引用,这意味着它将产生应该知道的DNS服务器的地址。 然后,客户端可以直接向此引用的服务器发出迭代查询。

In summary, this article has defined what a DNS is and introduced the concept of DNS queries. With that being said, there are still numerous other aspects of DNS such as Zones, Records, Load Balancing, and Scavenging — which one should familiarise themselves with in order to gain a more technical and comprehensive understanding of DNS as a whole.

总之,本文定义了什么是DNS,并介绍了DNS查询的概念。 话虽这么说,DNS仍然还有许多其他方面,例如区域,记录,负载平衡和清除-人们应该熟悉它们,以便对整个DNS有了更技术和更全面的了解。

翻译自: https://medium.com/@adamonthecode/what-is-a-dns-query-a82159d2caa8

域服务器的dns:::1

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值