Today, I will give you a long article about web addresses, URLs, IP addresses, domain names, DNS, and domain name resolution in plain language, and use a simple question-answer format to help readers have a deeper understanding of web addresses, URLs, IP addresses, domain names, DNS, and domain name resolution. I hope it will be helpful for readers' study, interviews, and work! 1. A question Before pointing out this problem, we must first clarify the following points:
After understanding the above content, let's take the simplest communication method between two hosts - surfing the Internet as an example to explain what this question is! Everyone in the 21st century should be familiar with the process of surfing the Internet (I don’t know if anyone still uses this term). The essence of surfing the Internet is to obtain the data on the host corresponding to the URL and display it on the user’s host (on the browser). Then we should doubt a question: Any two hosts on the Internet communicate with each other through IP addresses. When we go online, we just enter the URL, not the IP address. How can we find the other host and get its data? A question Therefore, there must be some mechanism to resolve the URL into an IP address and then communicate through the IP address! This mechanism is also the main thread throughout all the technical knowledge in this article! 2. Website 1. What is the URL? A website address, also called a domain name or URL, is a name used by Internet users to identify a host. The name is unique and hierarchical. Its literal meaning can represent the host's account, function, nature, region or organization, making it easy for all Internet users to remember and use it! URL, or Uniform Resource Locator, is used to indicate the server of an Internet host and the specific location of a web page. The composition strategy and examples of URLs are as follows: URL structure and examples Features: URL naming follows Internet domain name rules and is easy to manage, including allocation, confirmation, and recovery. It is also bound to the host IP address, and can efficiently map the URL to the IP address when the user accesses the domain name (efficiency is guaranteed by the domain name server, see below for details). Website 2. What problem did the emergence of URLs solve? The emergence of web addresses/domain names/URLs solves the following two problems:
IP addresses are difficult to remember 3. The structure of the URL The host name mentioned above, that is, the naming of the URL/domain name follows certain rules, which are formulated by the "name management agency" in the Internet, namely the Domain Name System DNS. Here is an introduction to the composition of the URL: The domain name of a host on the Internet is composed of the domain names at all levels to which it belongs and its own name (that is, it is composed of subdomains). The levels increase from left to right. The rightmost is the top-level domain name, and the leftmost is the host's own name. The subdomains at all levels are separated by ".". The common format is as follows:
The domain name of USTC The following will introduce the domain name system DNS mentioned in the above figure in detail, including what problems DNS solved when it was born, the history of domain name development, domain name hierarchy, some top-level domain name objects, domain name servers, domain name resolution process and IP technology expansion! 3. DNS Domain Name System 1. What is DNS? DNS, which stands for Domain Name System in English, means domain name system in Chinese. It is a distributed database that provides mapping between domain names and IP addresses on the Internet. 2. DNS Development History History of DNS 3. What problem does DNS solve? As mentioned earlier, the DNS domain name system is the host domain name management system on the Internet, acting as an "administrator"! Before the birth of DNS (in the ARPANET era), each host on the Internet used a file to record all host names and their IP addresses. This file was hosts.txt (now it is a hosts file without a suffix). All hosts must regularly update this file from the corresponding site to synchronize the addition, change, and disappearance of hosts on the Internet. Hosts file contents It is conceivable that as the number of hosts on the Internet increases, the hosts file will become larger and larger, the difficulty of maintenance and updating will increase dramatically, and host name conflicts will occur more frequently. In order to solve this problem, the DNS domain name system came into being in 1983. What Problems Does DNS Solve? 4. DNS Domain Name Hierarchy DNS is a hierarchical tree structure, each layer consists of domains. The meanings of domains are as follows:
The DNS domain name tree consists of the root domain, top-level domain, second-level domain and its subdomains. The structure diagram and example are as follows: Domain name structure The following describes each level of domain one by one:
Generic top-level domain
As mentioned in the previous article, the emergence of domain names is to solve the problem of users' difficulty in memorizing. In fact, domain names cannot be used for communication between hosts on the Internet, and IP addresses are still needed for data exchange. Therefore, the DNS system not only provides domain name functions, but also has the greater role of efficiently mapping domain name resolution to the IP address of the corresponding host. This is the role of the domain name server that will be introduced to you soon. 5. Domain Name Server Domain name servers constitute a distributed network system in DNS. Their main function is to provide domain name and IP address resolution and mapping services for internal and external hosts. Domain name servers are distributed in various subnets of the Internet. Each domain name server is responsible for managing all hosts connected to this subnet and providing services for them. The service content is: The client application sends the target host domain name to the domain name server of the subnet to which it belongs, and the domain name server returns the corresponding target host IP address to the client; if the domain name server in this subnet cannot query the IP of the target host domain name, it provides further query services according to the standard IP address resolution process of DNS. This process will be described in detail in the "Domain Name Resolution Process" below. 4. Domain Name Resolution Process The process of obtaining the corresponding IP address through a domain name is called domain name resolution. The most important unit involved in the domain name resolution process is the domain name server. The architecture of the domain name server is as follows: The structure of a domain name server
☆Local domain name server is not in the domain name server system in the figure above, but it plays an important role in domain name resolution. The DNS domain name query request sent by each host will first be sent to the local domain name server. The local domain name server can be set up in various scopes such as individuals, universities, companies, etc. It is also called the preferred DNS (very familiar), which is the preferred DNS in our computer network connection: Local DNS Server One picture to understand the whole process of domain name resolution: Domain name resolution detailed process The above figure takes the user visiting the Toutiao website as an example, and briefly describes the whole process from the user entering the URL to obtaining the IP address. Let's explain the process in detail below:
Summarize This article uses easy-to-understand language and combines practical problems to elaborate on the technical principles of web addresses, domain names, IP addresses, URLs, domain name servers, domain name resolution, etc., and configures detailed schematic diagrams to make the content easier for readers to understand and remember. I hope it will be helpful for readers' study and work! |
<<: STP Spanning Tree Protocol Working Principle
>>: In-depth understanding of the working principle of VLAN with pictures and texts, don't miss it
In 2019, people inside and outside the industry s...
1. Computer Network Architecture Layering Compute...
LOCVPS offers special events for different packag...
Since 5G networks are still being deployed around...
With the continuous development of enterprise IT ...
Methods for Identifying Fiber Link Problems There...
Edge computing trends play a key role in business...
【51CTO.com Quick Translation】 Data science career...
The May Day holiday is coming. I believe many fri...
[[377345]] Some time ago, China Telecom launched ...
In the early days of 5G, we often saw various hig...
Before 2014, a lot of people used Google, Faceboo...
Experts say that while 5G technology is a huge im...
At the "Joining Inspur's Thinking and In...