Explanation of common DNS records (I): DNS Series II

Source: Internet
Author: User
Tags domain name server fully qualified domain name

Http://yuelei.blog.51cto.com/202879/106921

Common DNS records (I)In the previous blog, we introduced the architecture of the DNS server, from which we learned that if we want to register a domain name, then, the domain name that we apply for must be delegated through the top-level domain name server or its subordinate Domain Name Server, and the resolution right must be delegated to our DNS server, in this way, we can obtain the resolution right for the domain name applied. In this article, we will go further, assuming that we have successfully applied for a domain name hexun.com for the company, and now the resolution right of hexun.com is assigned to the company's DNS server 202.99.16.1, what kind of configuration should we perform on the server 202.99.16.1? 1. Install the DNS serverFirst, install the DNS component on the server. The TCP/IP configuration of the server is shown in. It is very easy to install DNS components. Choose Control Panel> add or delete Programs> Add/delete Windows Components> network services, as shown in, and select "Domain Name System. 2. Create a regionAfter the DNS server is created, we will create a DNS region, which is the namespace of the DNS server. The DNS server has a forward and reverse regions, the forward region is responsible for resolving the domain name to the IP address, while the reverse region is responsible for resolving the IP address to the domain name. There are three types of DNS regions: Forward region, reverse region, and stub region. To understand the region type, you must first understand the differences between the primary server and the secondary server of the DNS server. Generally, an enterprise requires two DNS servers when applying for a domain name. One is the primary server and the other is the secondary server. Generally, the primary server is responsible for parsing requests. The data of the secondary server is copied from the primary server, and the data of the secondary server is read-only, when the primary server fails or the server cannot respond to the client's resolution request due to heavy load, the secondary server will take up the domain name resolution task. Now let's go back and explain what is the main region. The primary server uses the primary region, and the secondary server uses the secondary region. The stub area can be seen as a special and simplified auxiliary area. The specific differences will be described in the subsequent blog. Generally, we use a large number of forward regions. Logically, we must first create a primary region, because both the secondary region and the stub region need to copy data from the primary region, therefore, our current task is to create a forward primary region for the region hexun.com. As shown in, create a forward region on the DNS server. The new region wizard appears. Click Next to continue. Select to create a main region. The region name is the same as the applied domain name, hexun.com. The region data file is hexun.com. DNS. All records in the region are stored in this file. Note that this file will be used in the future. The wizard asks if dynamic updates are allowed in the region. Generally, dynamic updates are allowed if the DNS region is used in the enterprise intranet; otherwise, dynamic updates are not required. As shown in, the region has been created. After the region is created, as shown in, there is only one NS record and one SOA record in the region. The next step is to create an appropriate DNS record in the region. Three creation recordsDNS records are the specific manifestation of DNS region data. Next we will introduce several of the most common DNS records. Once you have mastered these records, you can basically master the basic DNS applications. 1. A recordA record, also known as host record, is the most widely used DNS record. The basic function of a record is to specify the IP address corresponding to a domain name. For example, we want to use the record to indicate that the domain name of a host is bbs.hexun.com and the IP address is 202.99.16.185. Then we can perform the following operations. As shown in, select "New Host" in the hexun.com area ". As shown in, the IP address of the domain name bbs.hexun.com is 202.99.16.185 in the record. The concept of a fully qualified domain name is mentioned here. A fully qualified domain name refers to a domain name ending with a dot. For example, bbs.hexun.com. is a fully qualified domain name. In general network applications, we can omit the rightmost point of a fully qualified domain name, But DNS cannot omit this point. Because this point represents the DNS Root, with this point, a fully qualified domain name can be expressed as an absolute path, such as bbs.hexun.com. it can be represented as a BBS host in the hexun.com domain under the com subdomain under the DNS Root. If the DNS finds that a domain name does not end with a fully qualified domain name, it will add the current region name as the suffix, so that it can meet the needs of fully qualified domain names. For example, DNS will process the domain name BBS as bbs.hexun.com .. Therefore, if you want to enter a fully qualified domain name, we should note that the domain name should end with a point. The basic usage of record a is to describe the ing between domain names and IP addresses. In fact, record a also has an advanced usage, and record a has the role of load balancing. DNS is often used as a low-cost Load Balancing solution, mainly based on a records. For example, four Web servers are responsible for the website [url] www.hexun.com [/url]. The IP addresses of the four Web servers are 202.99.16.81, 202.99.16.82, 202.99.16.83, and 202.99.16.84, respectively, then we should create the following host records.

The above four A records are used to describe the four IP addresses corresponding to [url] www.hexun.com [/url] respectively. How can we use these IP addresses to achieve load balancing? This is the principle. Generally, domain names are used to access the Web server. Therefore, you need to use the DNS server to resolve the domain name to an IP address. When the first client queries [url] www.hexun.com [/url], the DNS server will tell the client that the IP address corresponding to this domain name is 202.99.16.81, when the second client queries, the DNS server will change the answer to 202.99.16.82. In this way, DNS uses the "Round Robin" technology to direct different access users to four different Web servers, this achieves a simple load balancing effect. We can use a simple experiment to verify the DNS round-robin effect, as shown in. We can query the IP address of the domain name by pinging [url] www.hexun.com [/url] on the client, but the strange thing is that the client queries the domain name twice to get the same result. Why? Does DNS round robin not work? In fact, it is not because the client has a DNS cache mechanism. When the client first queries the DNS server and obtains the IP address corresponding to the domain name, the customer will take the opportunity to cache the query results, in this way, you can directly obtain results from the Cache during the next query without asking the DNS server. To understand this, we only need to use ipconfig/flushdns to clear the DNS cache of the client and continue the experiment. As shown in the experiment results, we can see that DNS round robin has played a role.2. Ns recordsThe NS record and SOA record are two indispensable records in any DNS region. The NS record is also called the name server record to indicate which DNS servers are responsible for resolution in this region, the SOA record specifies which of the DNS servers responsible for resolution is the primary server. Therefore, these two records cannot be missing in any DNS region. Assume that two DNS servers are responsible for resolution in the hexun.com region. ns1.hexun.com is the primary server, ns2.hexun.com is the secondary server, ns1.hexun.com is 202.99.16.1, and ns2.hexun.com is 202.99. Then we should create two Ns records. Of course, NS records depend on the resolution of a records. We should first create two A records for ns1.hexun.com and ns2.hexun.com, as shown in the records created. With the support of two host records, you can edit the NS records, as shown in. The NS records in the current region are automatically created when the hexun.com region is created. This NS record does not work normally, because nsserver is not a fully qualified domain name that can be resolved, so we delete this record and recreate two Ns records. As shown in, we create an NS record. The Fully Qualified Domain Name of the NS server is ns1.hexun.com .. And the resolved IP address is 202.99.16.1. This record indicates that a server ns1.hexun.com is responsible for the domain name resolution of hexun.com. Create the NS record of ns2.hexun.com in the same way. The created result is shown in.3. SOA recordThe NS records indicate that two DNS servers are responsible for the resolution of the hexun.com domain name. But which one is the master server? The NS record does not indicate that this task is completed by the SOA record. The SOA record is also known as the starting authorization organization record. The SOA record describes which DNS server is the primary server and some associated parameters between the primary server and the secondary server. As shown in, the hexun.com SOA record is analyzed one by one. First, we need to analyze the serial number, which reflects the number of data changes on the DNS server. Each time the data on the DNS server is updated, the serial number is added to one digit. However, it is of little significance for the Administrator to understand this parameter, because whether the DNS server is updated 10000 times or 9999 times has no substantial impact on the administrator. In fact, this parameter is used by the secondary server. As we mentioned above, the data on the secondary server is copied from the primary server. How can the secondary server determine whether the data on the primary server is updated? The secondary server simply checks the serial number of the primary server. If the serial number of the primary server is greater than that of the secondary server, the secondary server should perform incremental updates on the primary server. The importance of the master server parameter is self-evident. In the current SOA record, the master server parameter is nsserver ., this is not a fully qualified domain name that can be resolved. We should change the master server to ns1.hexun.com ., as shown in, this is the correct master server parameter. You may wonder why the NS record and SOA record are nsserver by default, mainly because nsserver. Is the NetBIOS name of this DNS server. We can see from, we change the SOA record in charge of the parameter to admin.hexun.com., looks like a host of fully qualified domain name, actually means admin@hexun.com, is a mailbox address. So why is the owner Parameter not directly written as a admin@hexun.com? After all, this is a better understanding. In this case, the @ symbol has a special meaning in DNS. @ represents the current region in DNS, that is, hexun.com, therefore, we are forced to write the email address in a fully qualified domain name format. The Refresh Interval indicates that the secondary server contacts the primary server every 15 minutes to check whether the primary server has any data updates. If the secondary server loses contact with the primary server every 10 minutes, the secondary server will contact the primary server every 10 minutes. During this period, the secondary server will be responsible for domain name resolution in the current region. The expiration time is one day. If the secondary server has not been connected to the primary server after one day, the secondary server will think that the primary server will never return, your data has no meaning to be saved, so we will announce that the data has expired and refuse to continue providing resolution services for users. One hour of TTL indicates that the record's survival time in the DNS cache is one hour.

In this blog, we will introduce three DNS records: a record, NS record, and SOA record. From the perspective of content, it is obviously necessary for any DNS region, in the next blog, we will introduce MX, cname, SRV, and PTR records.

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.