当前位置:网站首页>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

边栏推荐
- 利用Navicat Premium导出数据库表结构信息至Excel
- Switch and Router Technology-29-OSPF Virtual Link
- 堆排序 和冒泡排序
- Layered Architecture & SOA Architecture
- Self-research capability was recognized again, and Tencent Cloud Database was included in the Forrester Translytical report
- Apache初体验
- 无线电射频能量的收集
- 关于CC 攻击
- Switches and routers technologies - 30 - standard acls
- 项目实战第二十七讲:状态模式在重名品牌中的应用
猜你喜欢

分层架构&SOA架构

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

CAD2020 打开错误报告 e06d7363h Exception at 13644F69h

交换机和路由器技术-21-RIP路由协议
![ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/data/xxxx](/img/02/3896b29a955ae84a0f0326f0d2cabf.png)
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/data/xxxx

Layered Architecture & SOA Architecture

2022新员工公司级安全教育基础培训(118页)

Dry goods: The principle and practice of server network card group technology

无线电射频能量的收集

leetcode 9. 回文数
随机推荐
无线电射频能量的收集
Switch---Spanning Tree---Three-layer Architecture Summary
[Note] Is the value of BatchSize the bigger the better?
CAN/以太网转换器 CAN与以太网互联互通
form form submission database Chinese becomes a question mark
ALSA音频架构
The basics of binary heap~
交换机和路由器技术-27-OSPF路由重分发
梅克尔工作室--OpenEuler培训笔记(1)
Mysql中事件和定时任务
JVM 垃圾回收的概述与机制
C语言:实用调试技巧
Listen to pull out U disk inserted into the message, U disk drive
【小记】BatchSize的数值是设置的越大越好吗
项目实战第二十七讲:状态模式在重名品牌中的应用
我的LaTeX入门
JwsManager service interface implementation class - the jni implementation
The shortest path out of the maze
C语言题解:谁是凶手!
0基础转行软件测试,自学3个月,浅拿12k*13薪offer