New users must understand the basic principles of DNS services

Source: Internet
Author: User
Article Title: beginners must understand the basic principles of DNS. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

We know that the host name can be used to identify a host or an IP address. People prefer to use host name identifiers that are easy to remember, while vrouters only wish to use IP addresses with fixed lengths and hierarchies.
 
We can identify a person in multiple ways. For example, the name on the birth certificate can also be indicated by a social security number or a driver's license number. Although these identifiers can be used to identify people, there is a more appropriate identifier in a background than other identifiers. For example, computers in IRS (a tax agency in the United States) prefer to use a fixed length of Social Security numbers rather than names on birth certificates. On the other hand, in daily life, people prefer to use the name on the birth certificate rather than the social security number (indeed, you can imagine that if a person says "Hi, my name is 132-67-9875. Please refer to my husband, 178-87-1146 ).
 
Hosts on the Internet can be identified by multiple forces just like humans. One of the identification methods is to use the host name (hostname ). Host names (such as cnn.com and www.yahoo.com) are helpful for memory usage. However, the host name provides almost no information about the location of the host on the Internet (the host with the Host Name sina.com.cn may be in China, and there is no other location information ). In addition, the host name is composed of variable-length letters and numbers, which makes it difficult for the router to process.
 
Therefore, hosts on the Internet also use the so-called IP address ID. We will discuss IP addresses in depth in the future. Here we will briefly describe them. The IP address consists of 4 bytes and has a strict hierarchy. IP addresses are generally expressed in dotted-decimal format. That is to say, all four bytes are expressed in decimal numbers ranging from 0 to. Each byte is separated by a dot. For example, 121.7.106.83.IP address has a hierarchical structure, when scanning an address from left to right, we get increasingly clear information about the location of the host on the Internet. This is like scanning a postal address from bottom to top, and we get increasingly clear information about the location of the house.
 
We already know the services provided by DNS. You can use the host name to identify a master sail or an IP address. People prefer to use host name identifiers that are easy to remember, while vrouters only wish to use IP addresses with fixed length and hierarchical structure. To mediate these two different preferences, we need a directory service that converts the host name to an IP address. This is the main task of the Domain Name System (DNS) of the Internet. DNS is a distributed database that consists of named server hosts and an application layer protocol that allows the customer host to communicate with the name server host to use the Domain Name Translation Service. The Name server host is usually a UNIX host that runs the Berkeley Internet Name Domain (BIND) software. The DNS protocol runs on UDP and uses the port number 53. Other application layer protocols (such as HTTP, SMTP, and FTP) generally use DNS to convert user-provided host names to IP addresses. For example, we consider what happens when a user requests a http://www.yesky.com using a browser (that is, an HTTP client) running on a local host. To send an HTTP request message to a web server host named www.yesky.com, the browser must be informed of the IP address of this host. We know that almost every host runs a DNS application client. The browser extracts the host name from the URL and passes it to the DNS application client on the local host. The DNS client sends a DNS query message containing the host name to a DNS server. The DNS Client finally receives a response message containing the IP address corresponding to the host name. The browser then opens a TCP connection to the HTTP server located in the IP address. From this example, we can see that DNS introduces extra latency (sometimes quite large) to Internet applications that use it ). Fortunately, as we will discuss soon. The expected host name-IP address ing relationship is often cached in the nearest DNS name server host, which helps reduce DNS access latency and DNS network traffic.
 
In addition to the conversion from the host name to the IP address, DNS also provides some important services:

[1] [2] Next page

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.