DNS Protocol Base Supplement

Source: Internet
Author: User

Types of DNS servers

When a website in the ISP successfully applied to the IP address, and then in the domestic domain name service providers (such as Ali million network) to apply for a domain name, and then the domain name and IP address bundled with the protocol is the so-called DNS protocol. In the million network where the application for the domain name payment, million network will provide 2 server Help URL to parse, the two servers are a master one from, this buy one free one of the purpose is: Once a collapse, the other can be on top.

Of course, trench can not use the network and other providers of DNS servers, large can build a DNS server. Note, however, that the DNS server is best to provide only recursive queries and not to provide iterative queries, because iterative queries are very bandwidth-consuming.

The DNS server types are divided into the following categories:
master server (Master): The soul of the DNS server, mainly responsible for parsing, the server must be high secrecy, and the data is the most up-to-date and full. DNS server lists exist in the Linux system/etc/resdv.conf, the DNS list of servers can not exceed three.


from the server (Slave): As the name implies, it is a backup of master, preventing master from crashing, such that the clone is used to improve the fault tolerance rate. Master can set up a period of time to update the data to the slave server, or once the master data has changed, immediately passed to the slave server, to ensure the latest replacement of data. And there are two kinds of data transmission, one is AXFR (full transfer) and the other is IXFR (incremental transfer).

From the server here to say a few more words, DNS has a forward parsing (FQDN-->IP), there are reverse parsing (IP-->FQDN). But these two parsing is not are nesting, but independent existence, that is, if there are three servers, then a server in the main server to do the forward resolution of the same time can also do the reverse resolution server from the server, B server can be similar to do a positive resolution from the server while doing reverse resolution of the primary server. The main from each other for backup. However, either forward or reverse, there can only be one primary server, but there could be multiple slave servers, like only one country president, but there could be several national vice-presidents. The third Server C server can focus on full-time secondary server.

When configuring the DNS server, the line code is called SOA, it involves 3 time, these three time is refresh (refresh time), Retry (retry time) and expire (expiration time), where the expiration time is from the server and the primary server exchange the baseline time of the data, If the expire setting is 1 weeks, if the server cannot connect to the primary server within 1 weeks, then the primary server is considered over by the server.

So what about the server? is Independence king? Like "named Port" in CCNP, do you turn on "root port"?

Surprisingly, if the primary server is hung up, the slave server will also hang up (without providing parsing services to any user).


caching Server (cache): If a DNS server does not have the ability to load parsing, then it is a cache server. Do not underestimate the cache server, the cache server is actually very cow. Because caching is the most intuitive way to conserve bandwidth, conserve resources, and save time and effort. In the previous article "The basis of the DNS protocol" has been an example of a normal user access to the site's DNS resolution process. But that's in the PC, what if a corporate company installs its own internal DNS server, and how does a corporate employee need to log on to the site? Here, I said:

1) Assume that a company's website is www.JQK123.com, and that it builds its own DNS server. That is to say the company's DNS is responsible for jqk123.com this domain, what BBS plate, news section, e-mail plate are jqk123.com here content. If the enterprise employee enters "XXX" in the address bar of the browser. jqk123.com "This URL, which happens to be in the DNS domain, the DNS server will directly query the zone data file, because this result is the most authoritative."
2) If a corporate employee searches for a URL that is not within the DNS domain, for example, news.sina.com. Then the DNS will go cache, in the cache to search for any other users have been connected to the news.sina.com, if any, directly to its IP to give you the use.
3) If the cache does not have this DNS resolution record, then petition directly, go to the root node, and then to. com, then to. Sina.com such a layer of check. Until finally get news.sina.com this IP address.
4) The user link succeeds, and the IP address of the news.sina.com domain name on the cache server is recorded for use by the next user who logged in to news.sina.com.

The cache is not as rigid as it might seem. If user a visited www.ABC.com, if someone to access bbs.ABC.com, then because the cache known abc.com address, you do not have to petition directly to the root node, but directly to the abc.com, in the abc.com responsible for the domain to find BBS this block. And if someone comes to visit www.123.com, then the cache will look directly at the. com node. If someone is visiting the www.007.net. This is not the same as the previous record a little overlap, then only from the root node on a layer of grilled.


forwarding Server (Forward): When a host in the network is communicating with a host outside the network, it needs to query the outside DNS server and provide the corresponding data. But for the sake of security, generally do not want to all the internal DNS servers directly with the external DNS servers to establish contact, but only one DNS server to establish direct contact with the outside world, other DNS servers in the network through this DNS server to the outside world indirectly contact. Then, the DNS server that is directly connected to the outside world is called a forwarder.


With forwarders, when a DNS client requests a query, the DNS server obtains the data from the external DNS server through the forwarder and provides it to the DNS client.

This article is from "Life is waiting for Gordo" blog, please make sure to keep this source http://chenx1242.blog.51cto.com/10430133/1748978

DNS Protocol Base Supplement

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.