What is the Internet? The simplest way to think about it is as a way for two computers to communicate with each other.

The Internet in the picture is an abstract concept. Two computers can communicate with each other through the Internet. To be more vivid, the Internet is the Courier, helping us deliver information to others. And what the Internet industry on general sense does actually is information express.

Since it is an express, it is necessary to have an address, the Courier only know the address of the other party, in order to send the information to the past. The computer’s address is called #IP address.

An IP address is a string of numbers that humans are not very good at remembering. To make it easier for you to remember, there are # domains, such as Google.com. A domain name is the name of an IP address.

But more troublesome than using an IP address, a domain name is actually a set of indexing system. When we enter a domain name in the browser, we then need to go to the indexing system to find the corresponding domain name, in order to confirm the corresponding address behind the domain name.

The index system is hierarchical, with the root server at the top, the domain name at the next level, the domain name at the second level, and so on. The browser will start with the domain name first and work its way down to the IP address.

Now that we have the IP address, we can officially transmit the message. But the journey has only just begun.

In the express industry, when the Courier gets the address of the goods to be sent, then he needs to drive a bus to different provinces over mountains, which is a long journey.

The Internet, though not as long a journey, has a complex logic.

The Internet is made up of many large networks that have # Internet Service Providers (NSPs) behind them, and the average of us who want to get online have to go through these providers.

NSPs are interconnected through network access Points (NAP or MAE), making the Internet a whole. Large NSPs have small Regional Internet Service Providers (ISPs), which have local providers.

Now, let’s focus on you and your computer:

If you want to transmit information to 5.6.7.8, you need to have the local network to the LAN, then the LAN to the NSP, then the NAP to another NSP area, then the NSP down to the LAN, then the local network, and finally find 5.6.7.8.

This is of course the longest case, and it would be much more convenient if another computer were on the same local network.

The black box in the picture is the # router, which connects the different layers of the network.

That’s an architectural question. Finally, let’s talk about how two computers send and receive messages.

Computers send and receive messages through something called the protocol stack.

The protocol stack consists of four layers:

The first layer: application layer; Second layer: transmission layer; Layer 3: Internet Protocol layer Layer 4: Hardware layer;

Application Layer When a message is sent, it passes through the application layer. Application layer protocols mainly communicate the connection rules between two computers.

Common protocols, such as HTTP, are used to access the Internet on the Web. After we enter the URL address in the browser, the URL will get the IP address through DNS, and then the browser sends an HTTP request to the IP address. After receiving the request, the server will return the corresponding file if the requested data exists. At this point the HTTP request is disconnected.

Other protocols, such as SMTP (mail protocol), have a different request mode than HTTP, and the server will go through multiple rounds of confirmation to ensure that the message is sent and received successfully. In this process, the connection is not broken until the letter is sent or abandoned.

Transport layer The transport layer follows the application layer.

The transport layer generally uses THE TCP protocol, which is mainly responsible for the application layer protocol to guide the target application on the target computer.

The target application is marked with # port number, for example, HTTP port number is 80, SMTP port number is 25, different protocols correspond to different ports.

Internet Protocol layer The Internet protocol layer follows the transport layer

The Internet Protocol layer, mainly THE IP protocol, is used to deliver packets (the means by which information is delivered) to the target computer.

Hardware layer And finally the hardware layer.

The hardware layer is to convert the text we type on the computer into electrical signals and send them over the network. For example, we say “cat” is such existence.

It should be noted that the transmission of information is based on the application layer, transport layer, Internet protocol layer, hardware layer, and the reception will be reversed, first the hardware layer, then the protocol layer, then the transmission layer, and finally the application layer.

In addition, during the transmission of information, the information will be divided into small packets, these packets through the TCP layer and IP layer, will add relevant header information, to represent the port number and address, and these information will be removed from the packet when receiving, and finally the packet is merged into a complete state.


References:

How Does the Internet Work?