Principle of DNS Server

Source: Internet
Author: User

Principle of DNS Server

Domain Name System
It is a TCP/UPD-based service that listens to port 53 on both TCP and UPD. At the beginning, when the network was just born, there were only a few computers connected to the network. With the development of personal PCs, the network grew explosively and it was hard to remember a simple IP address, with the DNS service, the IP address can be mapped to an easy-to-remember English character, that is, the URL we are currently using. There are 13 root servers around the world, and only one root server in Asia is located in Japan.
In order to standardize the use of the address, an international IP Address Allocation organization has emerged, which divides the domain name into several levels.(Simple description)
The. Root DNS server is represented by a symbolic dot.
. Com. net. org. cn. TW primary domain name

Ibm.com second-level domain name

Therefore, our usual website such as www.ibm.com is actually the last point of www.ibm.com. Pointing to the root server.

(1) What types of queries does a DNS server actually store database files corresponding to the domain name and IP address? There are two types:
1. recursive query
2. Iterative Query

Recursive query. If a cannot find ibm.com, server a will query the next server B until the answer is returned.
Iterative query. If a does not have ibm.com but B knows it, send it to PC and ask B

Our computer generally uses two methods in combination for domain name resolution. The first half is recursive (local), and the second half is iterative (non-local)

(2) DNS Server Resolution is bidirectional:
Name -----> IP: forward resolution. Find the corresponding IP address based on the host name.
IP ------> FQDN: Response resolution, find the corresponding domain name based on the IP address

The DNS server records the resolution information mainly through some record types:
FQDN ---> IP: A indicates the corresponding IP Address
IP -----> FQDN: PTR (pointer) indicates the corresponding domain name
Domain -----> server: name of the NS (Name Server) Domain Name Server
Domain ------> MTA: MX (Mail exchanger) record the email address and email Exchanger
Aliase -----> JERRY: cname resolves the official name of an alias
SOA (start of authority) generally indicates a domain name's Primary Domain Name Server

(3) DNS server type:
Local slave server
Local host server

Master server-secondary Name Server
Generally, a slave server synchronizes data with other servers for a period of time, but it also has the notification responsibility. As long as its data changes, it will notify other slave servers, it will be synchronized with other slave servers regardless of their changes

(4) What is a region?
DNS resolution needs to define a domain, and there are two sub-regions under this domain, they are used for name resolution, name resolution is divided into two types, one is forward, the other is reverse, the following definitions are required:
A separate data file is required.

A separate data file is required in the reverse direction.

Therefore, a region is a physical concept, which corresponds to physical files one by one. The domain is a logical concept, and it refers to a "place ".

# A domain contains a forward region and a reverse region, but the region can also be opened up ,. the ibm.com domain and region in COM do not have a ing relationship with each other, not necessarily only two regions. If a domain is divided into multiple domains, there are more than two regions.

Region Transfer Type
Axfr full region transfer --------> All resolution information in the Transfer Region
Ixfr partial region transfer --------> only transmitted changed content

If a domain name is added or moved over, the modification is made by the master server, and the slave server synchronizes or transmits information with the master server at regular intervals, this type of transfer is called regional transfer.

(5) DNS Server Response client request parsing process

Request -----> Local/etc/hosts # If the host file is parsed, the parsing result of the host file is returned, without the next step

----> Local DNS Cache
# Search for the local DNS Cache. If yes, the system returns the result and there is no next step.

----> Find the first DNS server ----> Find the cache # Find the first DNS server you have defined. The DNS server searches for the cache. If yes, the result is returned. If no, click Next.

----> Check whether your domain is responsible -------> return result # The second DNS is responsible for modifying the domain and returning the result
Required is
No # second self-defined DNS, no result, go directly to the root server and then find the lower-level domain name
Bytes

Find the root DNS Server

# The answers returned by the root server step by step are authoritative answers, and the answers returned by the cache are non-authoritative answers.

Note:
/Etc/host can realize Domain Name Redirection because it is preferentially used

The purpose of the cache name server is to accelerate and save bandwidth. It is not responsible for Region management.

** Forwarder: This server only forwards data to other servers for user requests, enabling the DNS server to forward data between internal and external firewalls.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.