When we are doing network development, we often hear about various protocols, such as: TCP, UDP, HTTP, ICMP, RTSP, etc. These protocols are actually very different. In order to better understand these protocols, we need to be familiar with the network layering model. There are currently three ways to divide the network model:
Do you also have doubts, why do network models have so many classifications? How are they specifically layered? Today we will take a look at the questions. OSI seven-layer model The OSI (Open System Interconnection) seven-layer network model is called the Open System Interconnection Reference Model. It is a logical definition and a specification that logically divides the network into seven layers. Each layer has related and corresponding physical devices, such as routers and switches. The OSI seven-layer model is a framework-based design method. The main purpose of establishing a seven-layer model is to solve the compatibility problems encountered when heterogeneous networks are interconnected. Its main function is to help different types of hosts achieve data transmission. Its biggest advantage is that it clearly distinguishes the three concepts of service, interface and protocol, and enables reliable communication between different systems and networks through seven hierarchical structural models. As shown below: 1. Physical layer The third or third layer of the OSI model, this layer includes the physical networking media, such as cable connectors. The protocols of the physical layer generate and detect voltages in order to send and receive signals that carry data. Although the physical layer does not provide error correction services, it can set the data transmission rate and monitor the data error rate. Physical problems in the network, such as a broken wire, will affect the physical layer. 2. Data Link Layer I have explained this in my book "Do You Really Understand the Data Link Layer" and will not repeat it here. You can refer to it for yourself. 3. Network layer The third layer of the OSI model, whose main function is to translate network addresses into corresponding physical addresses and decide how to route data from the sender to the receiver. The network layer determines the best path from node A in one network to node B in another network by taking into account the priority of sending, the degree of network congestion, the quality of service, and the cost of the optional routes. Routers belong to the network layer because the network layer handles and intelligently guides data transmission and routers connect network segments. In the network, "routing" is to guide the transmission of data based on addressing schemes, usage patterns, and reachability. The network layer is responsible for establishing the routes used by the source and destination machines. This layer does not have any error detection and correction mechanisms of its own, so the network layer must rely on the reliable transmission service provided by the DLL between the ends. IP belongs to this layer. 4. Transport layer The most important layer in the OSI model. The transport protocol also performs flow control or specifies the appropriate sending rate based on how fast the receiver can receive data. In addition, the transport layer forces long data packets to be split into the maximum size that the network can handle. The most common ones are TCP and UDP. 5. Session layer Responsible for establishing, maintaining, and terminating communications between two nodes in the network. The functions of the session layer include: establishing a communication link, keeping the communication link unblocked during the session, synchronizing the conversation between the two nodes, determining whether the communication is interrupted, and deciding where to resend when the communication is interrupted. For example: DNS 6. Presentation Layer The translator between the application and the network. In the presentation layer, data is formatted in a way that the network can understand; this formatting also varies depending on the type of network used. The presentation layer manages the decryption and encryption of data, such as the processing of system passwords. For example: telnet 7 Application Layer This *** understands, no need to explain. What is the seven-layer model used for? The implementation of the Internet is divided into several layers, each with its own functions, just like a building, each layer is supported by the next layer. The OSI model is such a layered model. It is a conceptual model proposed by the International Organization for Standardization, which attempts to provide a standard framework for interconnecting various terminals and network types worldwide. It is divided into seven layers, each of which can provide a well-abstracted interface. TCP/IP four-layer model TCP/IP and OSI model groups cannot be matched exactly, but we can refer to the OSI model as much as possible and find the corresponding position of TCP/IP in it. As shown in the figure below, the mapping relationship between the OSI model and the TCP/IP model. It is usually believed that the top three layers of the OSI model (application layer, presentation layer, session layer) are an application layer in TCP/IP. Since TCP/IP has a relatively weak session layer, which consists of opening and closing connections under TCP and RTP, and provides different port numbers for various applications under TCP/UDP, these functions are added by individual applications. In the fourth layer, the data of the transport layer is called segments; the data of the third layer network layer is called packages; the data of the second layer data link layer is called frames; the data of the first layer physical layer is called bits. The transport layer and the network layer are completely preserved, so the core technologies in the network are the transport layer and the network layer technologies. What is the difference between the TCP/IP four-layer model and the OSI model? OSI is a complete and perfect macro-theoretical model; the TCP/IP (reference) model focuses more on the layering of the Internet communication core (that is, a series of communication protocols based on the TCP/IP protocol), so it does not include the physical layer and some other unwanted protocols; secondly, it is called a reference model because it is also part of the OSI model, so it is layered with reference to the OSI model. Five-layer model The five-layer architecture includes: application layer, transport layer, network layer, data link layer and physical layer. The five-layer protocol is just a combination of OSI and TCP/IP, and the actual application is still the four-layer structure of TCP/IP. The following figure shows the mapping relationship between the OSI model, TCP/IP model, and the five-layer model. What is the significance of the five-layer model? The so-called five-layer protocol network architecture is actually adopted to facilitate the study of computer network principles. It is a five-layer model that combines the OSI seven-layer model and the TCP/IP four-layer model. |
<<: How to deliver security as code: 11 tips to get started
>>: Network Programming - Another Look at TCP's Four Waves
AkkoCloud is a Chinese hosting company founded in...
The broadband access at home now often starts at ...
edgeNAT has launched a promotion for this month. ...
[51CTO.com original article] Guess what the first...
China Unicom recently released its financial resu...
RackNerd has released a number of promotional pac...
Since 5G was officially put into commercial use i...
[51CTO.com original article] On June 5, 2018, the...
At this year's Broadband World Forum (BBWF 20...
Many people have encountered this problem when co...
Campus networks have a large number of users and ...
[51CTO.com original article] The 2018 11.11 Shopp...
AkkoCloud has launched a large number of VPSs in ...
Recently, the three major telecom operators have ...
[[395022]] In 1840, during the reign of Emperor D...