当前位置:网站首页>Application layer protocol - DNS
Application layer protocol - DNS
2022-08-11 04:53:00 【Stupid trying to】
Article table of contents
[Foreword] After the user enters a URL in the browser, if the protocol name in the URL is followed by a domain name instead of an IP, the domain name resolution will be performed first, that is, the DNS protocol. The DNS protocol is to convert the domain name into an IP address.
DNS protocol is based on UDP transmission
1. Hierarchy of domain names

Attention Attention Attention!The root domain name is . by default. The common last one, such as com, is a top-level domain name and not a root domain name.
(1) The hierarchy of the domain name belongs to the relationship of management
There is only one root domain name, which is not identified, and is directly represented by .
The root domain knows the IPs of all top-level domains, and so on
(2) The following domain name:
Host.example.Microsoft.com.
In this domain name, Host is the fourth-level domain name, example is the third-level domain name, Microsoft is the second-level domain name, com is the top-level domain name, and the last . is the root domain name
Host is a fourth-level domain name, which is the most basic information. It is generally the host name of a computer. The common www represents a web server
2. Some TLDs
com commercial organization, such as www.baidu.com
cn China
net network support organization
gov government organizations
edu educational institutions
3. Domain name resolution process
3.1 Recursive query
Generally, the query request made by the DNS client is a recursive query method
The so-called recursive query means that after the DNS client sends a query request, if there is no required data in the DNS server, the DNS server will replace the client to query other DNS servers until the result is returned, that is, thisThe DNS server must reply to the DNS client
3.2 Iterative query
Generally, the query method between the DNS server and the DNS server is iterative query
The so-called iterative query refers to:
After the first DNS server makes a query request to the second DNS server, if the second DNS server does not find it, it will provide the IP address of the third DNS server to the first, so that the firststation directly to the third DNS server to query, and so on
If the last DNS server is not found, notify the first DNS server that the query failed
3.3 Example
For example, if the host whose domain name is me.abc.com needs to know the IP address of the target domain name a.xyz.com, the query process is as follows:
First, the host performs a recursive query to the local domain name server dns.abc.com
Then the local domain name server dns.abc.com uses an iterative query to query a root domain name server
The root domain name server tells the local domain name server the IP of the next top-level domain name server dns.com to query
The local domain name server goes to the top-level domain name server dns.com for query
The top-level domain name server then tells the local domain name server the IP of the next authoritative domain name server dns.xyz.com to query
Query the local domain name server to the authority domain name server dns.xyz.com
The authority domain name server found the IP of the target domain name a.xyz.com and told it to the local domain name server
Finally, the local domain name server tells the local host me.abc.com the final result of the query

4.Other
4.1 Cache mechanism
Each nameserver maintains a cache of recently used names and a record of where name mapping information was obtained
Therefore, when the same domain name is requested to be resolved again, the address in the cache can be used directly
Through the caching mechanism, not only the traffic of DNS query data network is reduced, but also the workload of upper-layer servers is reduced
4.2 related commands (under Windows system)
- Look up the default DNS server configured for the host - nslookup
![[External link image transfer failed, the origin site may have anti-leech mechanism, it is recommended to save the imageDirect upload (img-oBTGvxjy-1659845478275)(C:\Users\Star\AppData\Roaming\Typora\typora-user-images\1659845298959.png)]+](/img/ca/ef50c173037c6bff21ba4bdf6cfbac.png)
- Display all DNS cache entries - ipconfig/displaydns

边栏推荐
- 交换机和路由器技术-31-扩展ACL
- 「转」“搜索”的原理,架构,实现,实践,面试不用再怕了
- Switch and Router Technology-29-OSPF Virtual Link
- vector中resize() 用法排坑
- Use Navicat Premium to export database table structure information to Excel
- Redis: Solve the problem of modifying the same key with distributed high concurrency
- 【Web3 系列开发教程——创建你的第一个 NFT(9)】如何在手机钱包里查看你的 NFT
- FPGA工程师面试试题集锦111~120
- 【实战场景】商城-折扣活动设计方案
- 对象的创建以及显示转换
猜你喜欢

0 Basic software test for career change, self-study for 3 months, 12k*13 salary offer

Apache初体验

IP-Guard如何禁止运行U盘程序

I wrote some code in my resume, but I still can't pass the interview

网络协议1

交换机和路由器技术-25-OSPF多区域配置

Do you understand how the Selenium automated testing framework works?
![[E-commerce operation] How to formulate a social media marketing strategy?](/img/fe/fc1270e608abbce02f83fcb712e562.jpg)
[E-commerce operation] How to formulate a social media marketing strategy?

3 模块二:科研工具使用

【yolov7系列三】实战从0构建训练自己的数据集
随机推荐
延长经济保险(jeecgboot)
About data paging display
Selenium自动化测试框架工作原理你明白了吗?
I wrote some code in my resume, but I still can't pass the interview
Redis:解决分布式高并发修改同一个Key的问题
2021 Network Planning Designer Afternoon Case Questions
洛谷P4560 Wall 砖墙
[Actual combat scene] Mall-discount event design plan
ALSA音频架构
关于数据分页显示
Snap - rotate the smallest number of an array
网络安全培训机构哪家好?排名怎么选择?
Object Creation and Display Transformation
【Web3 系列开发教程——创建你的第一个 NFT(9)】如何在手机钱包里查看你的 NFT
力扣——旋转数组的最小数字
澳大利亚网络空间安全体系建设论析
Three 】 【 yolov7 series of actual combat from 0 to build training data sets
JwsManager service interface implementation class - the jni implementation
CAD2020 打开错误报告 e06d7363h Exception at 13644F69h
Summary of c language fprintf, fscanf, sscanf and sprintf function knowledge points