当前位置:网站首页>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
- Display all DNS cache entries - ipconfig/displaydns
边栏推荐
猜你喜欢
随机推荐
Mysql:设置主键自动增长起始值
论文笔记:BBN: Bilateral-Branch Network with Cumulative Learningfor Long-Tailed Visual Recognition
ERROR: Could not install packages due to an OSError: [Errno 2] 没有那个文件或目录: ‘/data/xxxx
交换机和路由器技术-26-OSPF末梢区域配置
【服务器安装mysql】centos7下使用mysql离线安装包安装mysql5.7
2022新员工公司级安全教育基础培训(118页)
网络安全培训机构哪家好?排名怎么选择?
paddlepaddle实现CS_CE Loss且并入PaddleClas
Switch and Router Technology - 25 - OSPF Multi-Area Configuration
对象的创建以及显示转换
【ImageNet】数据集1000个类的名称
视觉任务种常用的类别文件之一json文件
Listen to pull out U disk inserted into the message, U disk drive
Overview of the JVM garbage collection and mechanism
Switches and routers technology - 21 - RIP routing protocol
走出迷宫的最短路径
Kong implements ban on foreign IP access
2021 Network Planning Designer Afternoon Case Questions
form form submission database Chinese becomes a question mark
Merkel Studio--OpenEuler Training Notes (1)