当前位置:网站首页>DNS domain name resolution service
DNS domain name resolution service
2022-07-25 04:01:00 【Now a lemon】
List of articles
Preface
Domain name resolution is to point domain name to website space IP, Let people through the registered domain name can easily access a website service .IP The address is the digital address on the network that identifies the site , For the convenience of memory , Use domain names instead of IP Address identification site address . Domain name resolution is domain name to IP Address conversion process . Domain name resolution work by DNS The server completes .
One 、BIND Domain name service foundation
1.DNS Concept
DNS The domain name system (Domain Name System abbreviation DNS,Domain Name Translated as domain name ) It is a core service of the Internet , It can be used to IP A distributed database with address mapping , Can make people more convenient access to the Internet , Instead of remembering what can be read directly by the machine IP Number string
2.DNS Protocol and port number used
DNS The default port is 53,DNS Ports are divided into TCP and UDP
2.1TCP It is used for area transmission , Mostly used for master-slave synchronization
In a district DNS The server reads the data file of this area DNS Data and information , And auxiliary DNS The server is from the master of the zone DNS The server reads the DNS Data and information
2.2UDP Is used to do DNS Analytic
Client to DNS Server query domain name , Generally, no more than 512 byte , use UDP Just transfer . Without three handshakes , such DNS Server load is lower , More responsive . In theory, , The client can also refer to the direction DNS Server query time TCP, But in fact , quite a lot DNS When the server is configured , Support only UDP Query package
3. Domain name Architecture
The desired domain name must end with a dot
for example :www.baidu.com.
Root domain name "."
First level domain name :.cn( China ).us( The United States ).tw( Taiwan ).kr( South Korea ).jp( Japan ).hk( Hong Kong ).uk( The British )
Two level domain name :.com.cn( Chinese business organizations ).edu.cn( educational services ).org.cn( uncommercially ).net.cn( Chinese operators )
Three level domain name / Subdomain : sina.com.cn baidu.com.cn
Host name : www mail ftp
4.DNS Distributed Internet parsing library
large 、 Distributed Internet DNS Parsing library
Root domain name DNS The server : Responsible for root domain name
Class A DNS The server : Responsible for the resolution of primary domain names ( It generally represents a type of organization or country or region )
second level DNS The server : Responsible for secondary domain name resolution
Level three / subdomain DNS The server : Responsible for sub domain name resolution , Also known as tertiary domain name
Host site : www、mail、ftp
5.DNS The role of the system
- Forward analysis : Search for the corresponding IP Address
- Reverse DNS : according to IP Address to find the corresponding domain name
6.DNS A query
6.1 recursive query
Recursive query is a kind of DNS The query method of the server , In this mode DNS The server received a client request , You must use an accurate query result to return to the client . If DNS The server does not store queries locally DNS Information , Then the server will ask other servers , And submit the returned query results to the client
Just wait for the client to send the request , The middle specific process is handed over to the server to realize
6.2 Iterative query
DNS Another query method of the server is iterative query , When the client sends a query request ,DNS The server does not reply directly to the query results , Instead, tell the client another DNS Server address , The client will go to this DNS The server submits the request , Cycle in turn until you return the result of the query directly
That is, the client requests need to be queried one by one to get the results , When the server has no results, it will only provide you with the address of other servers , Instead of asking for information for you , This is the opposite of recursion
7.DNS The query process
(1) First check the cache address of this machine
(2) Inquire about /etc/hosts file
(3) Inquire about dns Domain name server , hand DNS Domain name server processing
The above process is recursive query
(4) This dns The server may be a local domain name server , There is also this cache , If there is , Direct return , If not, proceed to the next step
(5) Help the root domain server , The root domain server returns the top-level server that may know the result and asks him to find the top-level domain server
(6) Help the top-level domain server , The top-level domain server returns the secondary domain server that may know the result and asks him to find the secondary domain server
(7) Turn to the secondary domain server , The secondary domain server found that it is my host , Find out ip The address is returned to the local domain name server
(8) The local domain name server logs the results to the cache , Then put the domain name and ip The corresponding relationship is returned to the client
The above is Iterative query 
Two 、DNS To configure
To configure DNS The server
1. install bind
2. Query profile 
3. Modify global profile (/etc/named.conf)

4. Modify area profile (/etc/named.rfc1912.zone)

5. Configuration area data profile (/var/named/named.localhost)


6. This completes the configuration , Turn off firewall , Turn off core protection , Turn on dns service 


verification
1. Open another machine 
2. modify DNS The configuration file , Point to the configured DNS Server's IP

3. Use nslookup Command view 


边栏推荐
- Force deduction problem 238. product of arrays other than itself
- Unity: test rotation function
- [golang] golang realizes sending wechat service number template messages
- 使用 “display: flex;justify-content: center;align-items: center; ” 解决流式栅格布局无法居中的问题
- Visio use
- 考研经历
- Student thinking vs workplace thinking
- Skywalking distributed link tracking, related graphics, DLJD, cat
- Localization distillation for dense object detection cvpr2022
- 144. Preorder traversal of binary tree
猜你喜欢

P100 MSSQL database penetration test of secondary vocational network security skills competition

Memory leak due to improper handling of custom view

What should testers do if they encounter a bug that is difficult to reproduce?
![[kaggle] how to effectively avoid oom and the long process of alchemy](/img/d1/cf6ecdeea9aa97d0eb93aa963687a5.png)
[kaggle] how to effectively avoid oom and the long process of alchemy

Uniapp picker select the effect demo of provinces and cities (finishing)

应急响应全栈

Deeply understand the connection state and reliable mechanism of TCP protocol

Student thinking vs workplace thinking

Emergency response stack

MySQL select query part 2
随机推荐
What are the models of asemi from the manufacturer of rectifier bridge and how about the electroplating process of the manufacturer of rectifier bridge?
Network construction and application in 2020 -- the answer of samba in Guosai
MySQL select query part 2
[matlab] solve the mex error there was a problem creating the mex file for real time execution, please ensure y
51 single chip microcomputer measures the period of square wave signal
数据中台建设(一):数据中台出现的背景
Interview question 05.06. integer conversion
Multithreading advanced Step2
Cluster clock synchronization configuration
场景之在线人数或者粉丝查询实现
Display: the function and effect of align content, justify content and align items under flex
[Flink] transform operator filter
[understanding of opportunity-47]: Guiguzi - Chapter 11 - decision makers, moderation, and rational distribution of interests
High temperature in Britain: two airport runways were burnt out, and several railways were restricted to ensure safety
应急响应全栈
有个问题想请教下,我想用来同步数据库,但我看他是根据mysql 的binlog同步的,如果是大表,一
Solve "nothing added to commit but untracked files present"“
Debezium series: when there are a large number of DML operations in the record source database, the debezium consumption data time lags behind the data generation time by several hours
EMQ Yingyun technology was successfully selected into the 2022 "cutting edge 100" list of Chinese entrepreneurs
Secondary vocational network security skills competition P100 web penetration test