< turn > Uncover DNS background files: The five of the DNS series

Source: Internet
Author: User
Tags fully qualified domain name

Secret DNS Background Filesin the previous blog post we introduced the DNS architecture, common records, but also introduced the configuration of the secondary server, today we introduce the DNS server behind several files. In fact, the work of the DNS server relies entirely on these files, understand the background files of the DNS, is conducive to a better understanding of the DNS server, can also let you understand why there are experts claiming that the best tool to configure DNS is Notepad. the files used by the DNS server are not complex, one is the boot file, which is responsible for storing the startup information of the DNS server ; one is Cache.dns, which is responsible for storing the domain name and IP address of the root server; One of the most important files is the zone data file, which is responsible for all DNS records in the storage area. These files are in the \windows\system32\dns directory, we find the DNS server responsible for parsing the hexun.com zone 202.99.16.1, to analyze the DNS server used by the above file. a Boot filefirst of all look at the boot file, oddly, in the DNS server C:\Windows\System32\DNS directory, we did not find the boot file, specifically as shown, then why? At this time because the DNS boot information can have three ways to save, one can be saved in the boot file, the second is can be saved in the registry, and three can be saved in active Directory. Microsoft may be afraid that users mistakenly deleted the boot file, so by default the boot information is saved in two different ways. If we want to view the contents of the boot file, we first need to modify how the DNS server boot information is saved. In DNS Manager, select to view the properties of the DNS server, as shown in.  switch to the "Advanced" tab in the DNS server properties, as shown in, choose to load the zone data from the file so that the DNS server writes the startup information to the boot file.  as shown, the boot file finally appears!  Open the boot file with Notepad to see, in fact, the content is very simple, primay on behalf of the DNS server is the main server of the current zone, from the boot file can be seen, The current DNS server is the primary server for the hexun.com zone and the primary server for the 16.99.202.in-addr.arpa zone. But not the root domain of the DNS server, in order to resolve the root domain, you need to rely on the Cache.dns,chache.dns record 13 root server domain name and IP address.  202.99.16.2 is a secondary server for hexun.com, let's see what its boot file is. As shown, secondary represents a secondary server for the current zone, the primary server is 202.99.16.1, and the root domain resolution is dependent on the 13 root servers in the Cache.dns. Summary: Looking at two examples, we found that the boot file in the DNS server is actually very simple, that is, the current DNS server is responsible for which areas, is the zone's primary server or secondary server, where the zone data files and so on. We can use the boot file to control the zone data that is loaded at DNS startup, or you can change the role of the DNS server, such as changing from a secondary server to a primary server.   two Cache.dnswe used to describe the process of domain name resolution when we introduced the DNS architecture: The DNS server discovers that a domain name cannot be parsed, it submits the query to the root server, and the root server iterates through the DNS server to finally find the answer. There is a critical issue in this process, how does the DNS server know who is the root server on the Internet? The answer is now, Cache.dns stores the domain name and IP address of 13 root servers! These 13 root servers have one in Tokyo, London and Stockholm, and the rest are in the United States. as shown, the fully qualified domain name and IP address of 13 servers are described in Cache.dns, where @ is an abbreviation that represents the current region, which is the root domain. Each server is described by two records, one record is the NS record type, and one is the a record type. The NS record describes who is the DNS server for the root domain, and a record describes how much the IP address of this DNS server is.  The contents of the Cache.dns can also be viewed through the "root hints" in the DNS server properties, as shown in, we look at the properties of the DNS server, switch to the "Root hints" tab in the properties, and see what is described in Cache.dns as the 13 root servers.  Summary: Cache.dns recorded in the Internet 13 root server domain name and IP, we have a lot of places to use Cache.dns, such as Beijing to add a new DNS root server, but Win2003 do not know this change, then we need to modify the Cache.dns to do this work 。 Or if a large enterprise uses a private root and makes a root server, it is also necessary to modify Cache.dns to let the DNS server know the existence of this private root.   three   Zone Data FilesThe next step is to introduce the most important area data files, the zone data file holds all the DNS records in the zone, and is the core data of the DNS server. As can be seen from the previous boot file, the data for the hexun.com area is stored in the Hexun.com.dns file, and then we open the C:\windows\system32\dns\hexun.com.dns with Notepad, as shown in the results.  we can see from the zone data file how the DNS records are stored, first we analyze the SOA records in the file, and record the contents as shown. @ is abbreviated, representing the current region, equivalent to hexun.com , SOA is a record type, Ns1.hexun.com. Represents the Hexun.com master server, 12 is the updated serial number of the record, 900 seconds is the 15-minute refresh interval, the secondary server and the primary server are contacted every 900 seconds, 600 seconds is 10 minutes of retry time, if the secondary server and the primary server lose contact, every 10 minutes Contact the primary server; 86400 is the expiration time, if the secondary server is not connected with the primary server for a day, the secondary server considers its data to expire, and 3,600 seconds is the lifetime of the DNS record in the cache.  What you just analyzed is exactly the same as the SOA record in.  Take a look at a few other records, as shown, and note the a record. DNS records are in the form of a fully qualified domain name, if the domain name does not end with a point, then DNS will automatically append the domain name at the end of the current region, the format is supplemented by the form of a fully qualified domain name. For example, mail will be added as mail.hexun.com . we use DNS zone data files to complete two common tasks, DNS null domain name resolution and pan domain name resolution. Airspace name resolution is to parse hexun.com, pan-domain name resolution is to all the hexun.com end but not appear in the DNS zone of the domain name to parse, such as ww.hexun.com. In general, the site for these two domain name resolution will be processed, because sometimes visitors like to save trouble in the browser directly input hexun.com to access, but also may be [Url]www.hexun.com[/url] mistakenly lost to ww.hexun.com. empty domain name resolution is relatively simple, if we want to resolve the empty domain name to 202.99.16.80, then you can enter @ A 202.99.16.80 in the zone data file, just now we mentioned, @ represents the current region, equivalent to hexun.com .. Pan-Domain name resolution is not difficult, for example, we want to resolve the pan domain name to 202.99.16.80, then we can enter in the zone data file * A 202.99.16.80,* is a wildcard character, representing any combination of characters, as shown in.  before you can save a DNS zone data file, it is a good idea to stop the DNS service and then start the DNS service before you save the file. As shown, we found that empty domain name resolution and pan domain name resolution are in effect.  then use the zone data file to complete a common task, DNS delegation! When we introduced the DNS architecture, we mentioned that it was because of the great delegation that DNS was developed today. We are going to delegate Shanghai.hexun.com's resolution to the DNS server ns.shanghai.hexun.com, the IP of this server is 211.99.213.1, then we write the following two records in the zone data file OK.  as you can see in DNS Manager, the delegation that we set up is already in effect.  Summary: After contacting the zone data file, we found that all of the DNS records can be easily created in the zone data file, and efficient, with Notepad, you can create all the DNS! After understanding the background files of DNS, we will use these files in the next post to create our own DNS private root! Please look forward to!

This article is from the "Yuere Microsoft Online Classroom" blog, make sure to keep this source http://yuelei.blog.51cto.com/202879/109657

< turn > Uncover DNS background files: The five of the DNS series

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.