Principle of DNS Server

Source: Internet
Author: User
Tags domain name server
DNS (DomainNameSystem) is a tcpupd-based service that listens to port 53 of TCP and UPD at the same time. 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, all with the DNS service, it can Domain Name System
It is a t-based Cp/Upd service, listening to TCP and UPD port 53 at the same time. 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


Linux IdC.com second-level domain name


Therefore, our usual website such as www.linuxidc.com is actually www.linuxidc.com. The last point points 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 linuxidc.com, server A will query the next server B until the answer is returned.
Iterative query. If A does not have linuxidc.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 linuxidc.com domain and region in com do not have a idc.com relationship with each other. It is 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 there is resolution in the host file, the parsing result of the host file will be returned without any further steps

----> 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, and the DNS server searches for the cache. If yes, the system returns the result. If no, click Next.

----> Check whether the domain is in charge. -------> return the result.   # The second DNS is responsible for modifying the domain and returning results
Required is
No # The second self-defined DNS. If no result is displayed, go directly to the root server and go to 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.
Related Article

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.