The first part of the DNS domain name resolution experiment trilogy-forward resolution

DNS domain name resolution experiment trilogy first part (upper part)-forward resolution

table of Contents

DNS forward resolution

The role of the DNS system

Distributed data structure of DNS system

DNS server type

BIND service

BIND server-side program

BIND service control

Steps to construct DNS domain name resolution server

Install the BIND package

Configure forward resolution


The role of the DNS system

Forward resolution: Find the corresponding IP address based on the domain name

Reverse resolution: Find the corresponding domain name based on the IP address

Distributed data structure of DNS system

For example: http://www.qq.com.cn.

The top level of the tree structure becomes the root domain, which is indicated by ".". The corresponding server is called the root server. The entire domain name space resolution power belongs to the root server, but the root server cannot bear the huge load, so the delegation mechanism is adopted under the root domain. Set up some top-level domains, then resolve different top-level domains, and then delegate to the subordinate second-level domains, third-level domains, and so on

Root domain: Located at the top level of the domain name space, generally represented by a "."

Top-level domain: generally represents a type of organization or country, such as .net (network provider), .com (business enterprise), .cn (Chinese national domain name)

Second-level domain: used to indicate a specific organization in the top-level domain. The second-level domain names below the national top-level domain are managed by the national network department. For example, the second-level domain names set under the .cn top-level domain name: .com.cn, .edu.cn

Subdomain: All levels of domains created under the second-level domain are collectively referred to as subdomains, and each organization or user can freely apply for registration of their own domain name

Host: Located at the lowest level of the domain name space, it is a specific computer, such as: www and mail are specific computer names

DNS server type

  1. Primary domain name server: responsible for maintaining all domain name information of an area, it is the authoritative information of all specific information, and the data can be modified. When constructing the main domain name server, you need to create the address data file of the area in charge.
  2. Secondary domain name server: When the primary domain name server fails, shuts down, or is overloaded, the secondary domain name server serves as a backup service to provide domain name resolution services. The resolution structure provided by the domain name server is not determined by itself, but comes from the main domain name server. When constructing the secondary domain name server, you need to specify the unknown of the master domain name server so that the server can automatically synchronize the address database of the area
  3. Cache domain name server: It only provides the cache function of domain name resolution results to improve query speed and efficiency, but there is no domain name database. It obtains the result of each domain name server query from a remote server, puts it in the cache, and uses it to respond when querying the same information later. The cache domain name server is not an authoritative server, because all the information provided is indirect information. When constructing a cache domain name server, you must set the root domain or designate other DNs servers as the source of resolution.
  4. Forwarding domain name server: responsible for local queries of all non-local domain names. After the forwarding domain name server receives the query request, it searches in its cache, and if it cannot find it, it forwards the request to the specified domain name server in turn until the result is found, otherwise it returns a result that cannot be mapped.

BIND service

BIND server-side program

Main executive program: /usr/sbin/named

Default listening port: 53

Main configuration file: /etc/named.conf

The data file that saves DNS resolution records is located at: /var/named/

BIND service control

systemctl [status|start|stop|restart] named.service

Steps to construct DNS domain name resolution server

Install the BIND package

yum install -y bind

Configure forward resolution

(1) First check the path of the configuration file that needs to be modified

rpm -qc bind #Query the path where the Bind software configuration file is located

/etc/named.conf #Main configuration file

/etc/named.rfc1912.zones #Zone configuration file

/var/named/named.localhost #Regional data configuration file

(2) Configure forward analysis

vim /etc/named.conf

(3) Modify the zone configuration file and add the forward zone configuration

vim /etc/named.rfc1912.zones

(4) Configure the forward area data file

cd / var / named /

cp -p named.localhost kgc.com.zone

vim /var/named/kgc.com.zone

Guess you like

Origin blog.csdn.net/Alen686/article/details/113969357