Hua Ke Xiao Tao, http://www.cnblogs.com/hust-ghtao/
There are two ways to identify a host: by host name or IP address. People, of course, like the host names that are easy to remember, while routers prefer fixed-length, hierarchical IP addresses. In order to compromise, a directory service that can host name-to-IP address translation is required. This is the DNS of the domain Name System.
DNS has two meanings: (1) A distributed database implemented by a hierarchical DNS server, and (2) an application-layer protocol that allows the host to query a distributed database, and the DNS protocol runs above UDP and uses port 53rd.
1. Distributed, hierarchical database
Root DNS server: There are 13 root DNS servers (A-M) on the Internet, each in fact a cluster of redundant servers to provide security and reliability.
Top-level domain (TLD) servers: responsible for top-level domains (COM, org, net, edu, and Gov) and top-level domains (CN, UK, JP, etc.) for all countries.
authoritative DNS server: records the mappings of accessible host names to IP addresses, provided by each fabric that has a publicly accessible host on the Internet.
2. Domain Name resolution process
A general query pattern is used: queries from the host to the local DNS server are recursive, and the rest of the queries are iterative.
3.DNS Cache
In order to improve latency performance and reduce the number of DNS messages that are transmitted over the Internet, the caching technology is widely used in DNS. In a request chain, when a DNS server receives a DNS response, the DNS server can cache the information in the answer on the local storage. If a host name/IP address pair is cached in the DNS server, and another query for the same hostname arrives at the DNS server, the server can provide the required IP address, even if it is not an authoritative server for that host.
DNS: Directory services for the Internet