Computer network notes: computer network architecture (OSI seven-layer model, TCP/IP five-layer protocol)

computer network architecture

Computer network is a complex and comprehensive technology system, which is composed of computer system, communication processor, communication line and communication equipment, operating system and network protocol. In order to better describe the computer network structure and make the computer network system handle work in an orderly manner, it is necessary to define a better network architecture. Hierarchical structure is a better way to describe the network architecture.

Computer network architecture can be described from three aspects: network architecture, network organization and network configuration.
● Network architecture is a functional description of computer networks.
● Network organization describes the computer network from two aspects: the physical structure of the network and the realization of the network.
● Network configuration describes the computer network layout, hardware and software, and communication line configuration from the aspect of network application.

Principles of Computer Network Architecture Hierarchy Division

● The functions of each layer are relatively independent.
● Adjacent layer functions have certain dependencies.
● Clearly specify the services to be completed at each layer and the implementation process.
● The same hierarchical division of systems in different regions in the network.
● Equal layers of different systems have the same functions (services).
● When the upper layer uses the service provided by the lower layer, it does not need to know the specific implementation method of the lower layer service.

The main advantages of computer network division hierarchy

● Each layer is relatively independent. Each layer in the hierarchical structure is relatively independent, and a layer only needs to use the services provided by its lower layer through the interface to complete the functions of the layer and provide services to the upper layer. It only needs to know what services the lower layer can provide, but does not need to know how the lower layer implements these functions.
● Simplifies the difficulty of architecture design. Since each layer implements a certain function relatively independently, a huge and complex large-scale problem is dismantled and processed, and the difficulty of the problem is simplified.
● The flexibility of the network system is better. Because the layers of the network structure are relatively independent, when the function of a certain layer changes, as long as the upper and lower interfaces do not change, that is, the services provided to the upper layer and the services required by the lower layer remain unchanged, the changes above or below the layer levels will not be affected. The flexibility between layers ensures that each layer can be continuously improved according to its own needs without affecting the design of other layers.
● The structure is easy to implement and maintain. The layered structure makes it easy to implement a huge system, because the big problem of the whole system is transformed into a number of small problems that can be handled easily.

OSI seven layer model

  • application layer

The application layer is the highest layer of the OSI reference model. It serves users and is the only layer that directly provides means and services for user application processes to access the OSI environment. The layers below the application layer indirectly provide services to application processes through the application layer. Therefore, the service provided by the application layer to the application process is the sum of the services provided by all layers. The application layer needs to identify and ensure the availability of both communication parties, ensure the synchronization between applications, establish a transmission error correction mechanism and a data integrity control mechanism. The application layer contains various protocols that users usually need.

  • presentation layer

The task of the presentation layer is to deal with the presentation of information exchanged between two communication systems. The presentation layer is concerned with the syntax and semantics of the information. Different data structures must be defined in the same abstract way to enable communication between these computers. The presentation layer is used to define and manage these abstract data structures, mainly including functions such as data format conversion, data encryption and decryption, data compression and recovery. Currently, there is no specific protocol for the presentation layer.

  • session layer

The task of the session layer is responsible for maintaining the establishment, management and termination of sessions between two nodes. The session layer allows user sessions to be established on different machines. Sessions can provide a variety of services, including dialog control, token management, and synchronization capabilities. Currently, there is no specific protocol for the session layer.

  • transport layer

The task of the transport layer is to provide users with an end-to-end service. The transport layer is a key layer in the communication system, because it realizes the shielding of all the details of the lower layer data communication from the higher layer. The transport layer receives data from the upper layer, divides the data into smaller units, and transmits these data units to the network layer. The transport layer takes data from source to destination all the way. That is to say, the source end uses the message header and control information to communicate with the similar program of the destination end at the transport layer, and the lower layers communicate with the same layer through the protocol. The transport layer does not need to know how many routes are involved in the communication process. Neither source nor destination is involved.

  • Network layer

The task of the network layer is to select the most suitable path for the subnet communication for the group through the routing algorithm, so as to realize network interconnection and congestion control. Routing can be based on static tables or in an auto-updated fashion to avoid faulty components in the network. Routing can be highly dynamic, such that the route is re-routed for each datagram, reflecting the current load on the network. The unit of transmission at the network layer is the packet.

  • data link layer

The task of the data link layer is to establish a real data link connection for communication between entities based on the services provided by the physical layer. The sender splits the data into data frames and sends these data frames sequentially. After the receiver correctly receives the sent data frame, it sends an acknowledgment frame to the sender as a reply message. The transmission unit of the data link layer is a frame, and adopts error control and flow control methods to ensure error-free transmission of data lines.

  • physical layer

The job of the physical layer is to transmit raw bits over a physical communication line. When the sender sends 1 (or 0), the receiver should receive 1 (or 0), not 0 (or 1). Therefore, what the physical layer needs to consider is how much voltage to use to represent 1 or 0, and how the receiver uses to identify the bit data of the sender, so as to realize the transparent transmission of the bit stream and provide data transmission services for the data link layer. The transmission unit of the physical layer is a bit.

OSI seven-layer model and TCP/IP five-layer protocol relationship diagram

insert image description here

TCP/IP five-layer protocol

  • 应用层(application layer)
    The application layer is the highest layer in the architecture. The task of the application layer is to complete specific network applications through the interaction between application processes. The application layer protocol defines the rules for communication and interaction between application processes. The process here refers to the program running in the host. Different application layer protocols are required for different network applications. There are many application layer protocols in the Internet, such as the HTTP protocol supporting World Wide Web applications, the SMTP protocol supporting e-mail, the FTP protocol supporting file transfer, and so on. We call the data unit exchanged by the application layer a message.

  • 运输层(transport layer)
    The task of the transport layer is to provide general data transmission services for the communication between the processes in the two hosts.

The transport layer mainly uses the following two protocols

● Transmission Control Protocol TCP (Transmission Control Protocol)—provides connection-oriented and reliable data transmission services, and the unit of data transmission is segment.
● User Datagram Protocol UDP (User Datagram Protocol)—provides connectionless, best-effort data transmission services (does not guarantee the reliability of data transmission), and the unit of data transmission is User Datagram.

  • 网络层(network layer)
    The network layer is responsible for providing communication services for different hosts on the packet switching network. When sending data, the network layer encapsulates the message segments or user datagrams generated by the transport layer into groups or packets for transmission. In the TCP/IP system, since the network layer uses the IP protocol, packets are also called IP datagrams, or datagrams for short.

  • 数据链路层(data link layer)
    The data link layer is often referred to simply as the link layer. We know that the data transmission between two hosts is always transmitted on a link of a link, which requires the use of a special link layer protocol. When transmitting data between two adjacent nodes, the data link layer assembles the IP datagram handed over by the network layer into a frame (framing), and transmits the frame (frame) on the link between two adjacent nodes . Each frame includes data and necessary control information (such as synchronization information, address information, error control, etc.). When receiving data, the control information enables the receiving end to know which bit a frame starts and ends with. In this way, after the data link layer receives a frame, it can extract the data part from it and hand it over to the network layer.

  • 物理层(physical layer)
    The unit of data transmitted on the physical layer is bit. When the sender sends 1 (or 0), the receiver should receive 1 (or 0) instead of 0 (or 1). Therefore, the physical layer should consider how much voltage to use to represent "1" or "0", and how the receiver can identify the bits sent by the sender. The physical layer also determines how many pins the plug of the connecting cable should have and how the pins should be connected. Of course, it is not the task of the physical layer to interpret what the bits represent.
    Please note that some physical media used to transmit information, such as twisted pair, coaxial cable, optical cable, wireless channel, etc., are not within the physical layer protocol but below the physical layer protocol. Therefore, some people also regard physical media as layer 0.

Data transfer process between layers

insert image description here
Assume that the application process AP1 of the host 1 transmits data to the application process AP2 of the host 2 . AP1 first hands over its data to layer 5 (application layer) of the host. Layer 5 plus the necessary control information H5 becomes the data unit of the next layer. After the fourth layer (transport layer) receives this data unit, it adds the control information H4 of this layer, and then hands it over to the third layer (network layer) to become the data unit of the third layer. So on and so forth. However, after reaching the second layer (data link layer), the control information is divided into two parts, which are respectively added to the header (H2) and tail (T2) of the data unit of this layer; and the first layer (physical layer) is a bit stream transmission, so the control information is no longer added. Note that when transmitting the bitstream, it should be transmitted from the header.

Guess you like

Origin blog.csdn.net/weixin_40119412/article/details/130447724