First, DNS overview
In an earlier TCP/IP network, name resolution was usually performed by a computer that maintained a ' list ' of host names and IP addresses (Hosts file)
When communication between the hosts in the network, the source main opportunity through the query hosts file, the host name of the host resolution to the IP address
"The shortcomings of the hosts file"
A) Duplicate host name: Hosts file is a planar structure, host more easily duplicate
(b) Host maintenance difficulties: maintain all host records in a flat-structured file so that the files are too large and difficult to maintain when the host record is increased or updated
"The formative features of DNS"
A hierarchical, distributed feature: The huge amount of information is planned into many smaller parts by hierarchy, storing each part on different computers
B To resolve the unity of information: the spread of information data is wide, will not create bottlenecks, improve access efficiency
"Location of Hosts file"
C:\windows\system32\drivers\etc
"DOS Mapping Command"
echo www.99.com 1.1.1.1 >> c:\windows\system32\drivers\etc\hosts
(1), the function of DNS
The most basic function of the DNS protocol is to establish mapping management between the host name and the corresponding IP address.
DNS is a set of protocols and services that allow users to use hierarchical, user-friendly names to replace IP addresses when looking for network resources
"Host name (domain name) is more beneficial than direct use of IP address"
A) host name for easy memory
b The IP address in digital form may vary for a variety of reasons, and the hostname can remain unchanged
(2), the composition of DNS
The core of the DNS system is the DNS server, which is the computer that provides the domain name lookup service, which maintains DNS name data and handles DNS client host name queries
The DNS server holds the database containing the host name and corresponding IP address
DNS compared to the directory structure of the disk file system:
#定位一个文件位置: From the root directory to the subdirectory and then to the filename, such as ' C:/windows\explorer.exe '
#定位一个主机名: From host name to parent domain to root domain, such as ' news.sina.com.cn '
DNS domain names include: root domain, top-level domain, level two domain, and host name
1, root domain
The root domain is the • (dot), which is managed by an Internet name Registry authority
There are 13 roots in the world: 10 in the United States, one in England, one in Japan, one in Sweden.
2, top-level domain
The next level of the DNS root domain is the top-level domain, managed by an Internet name authority
"Composition type of top-level domain"
Organization Domain: A three-character code that identifies the primary functions or activities of an organization contained in a DNS domain
National domain or region top-level domain name: two-character country or region code