1. DNS Overview
DNS (Domain Name System) is a distributed database that maps domain names and IP addresses on the Internet, allowing users to access the Internet more conveniently, instead of remembering the number of IP address strings that can be directly read by machines. The process of obtaining the IP address corresponding to the host name through the host name is called domain name resolution (or host name resolution ). The IP address resolved through the computer name is called forward resolution, and the IP address is called reverse resolution ,. The DNS protocol runs on the UDP protocol and uses the port number 53.
Ii. Composition of DNS servers
- DNS domain name space: it specifies the domain hierarchy used for the organization name.
- Resource Record (RR): It maps DNS domain names to specific types of resource information for registration or resolution of names in the namespace. In Linux, each row in the "name resolution Library (text file, located in/var/named/)" is usually called a resource record.
- DNS server: It stores and queries the name of the response resource record.
- DNS Client (resolution program): It queries searches from the server and resolves the name to the resource record type specified in the query.
Iii. DNS server type
- Cache DNS server: it does not contain domain name database files. It returns the query results obtained from the Domain Name Server to the client each time and caches the results locally for the next query.
- Master DNS server (master): the Administrator manually updates the database.
- Secondary DNS server (slave): Database updates are completed from the primary server or other secondary DNS servers.
Glossary:
- Fully Qualified Domain Name (FQDN): Fully Qualified Domain Name
- Host Name:
4. DNS query principles
1: Enter www.imxhy.cn and retrieve the local hosts query records first;
2: Use the local DNS cache to query records;
3: Use the primary DNS configured for the Network to query records;
4: Use the cache on the DNS server;
5: the DNS server forwards the query to the upper-level isp dns server and repeats the query in sequence;
6: If the DNS server does not configure forwarding queries, send the query request to 13 root DNS servers.
001. DNS principle and configuration format