In order to better standardize the computer network. We divide the network communication protocol layer into seven layers. This is also a well-known OSI model standard. Now, let's take a closer look at the relevant protocols at each layer. Let's see what the specific role of each of them is.
Network communication protocol layer 1: Physical Layer
The main function of the physical layer is to complete the original bit stream transmission between adjacent nodes. A typical concern of physical layer protocols is what physical signals are used to represent DATA 0 and 1. How long does one position last. Whether data transmission can be performed in both directions. How to establish the initial integrity and terminate the connection after the communication is completed. Physical Interface plug and socket) How many needles and the role of each needle. The design of the physical layer mainly involves the mechanical, electrical, functional, and electrical properties of the physical layer interface, as well as the transmission media connected to the physical layer interface. The physical layer also involves some problems in the field of communication engineering.
Network communication protocol layer 2: Data Link Layer
Data link layer) is used to transmit data reliably on unreliable physical lines. The data link layer completes reliable data communication between adjacent nodes in the network. To ensure reliable transmission of certificates, send the data needles and send them in sequence. Because the physical line is not reliable, the data needle sent by the sender may encounter errors or loss on the online Road, leading to the recipient's failure to receive data correctly. In order to ensure that the receiver can correctly judge the received data, each data block in the sending direction is used to calculate the CRC redundancy test, in this way, the receiver can re-calculate the CRC to determine whether the received data is correct. Once the recipient finds that the received data has an error, the sender must restransmit the data. However, the same data may be transmitted multiple times when the recipient receives duplicate data.
Another problem to be solved at the data link layer is to prevent high-speed senders from "drowning" low-speed receivers ". Therefore, a certain information traffic control mechanism is required to let the sender know how much cache space the recipient currently has. For ease of control, traffic control is often implemented together with error handling.
In the wide area network, the data link layer is responsible for reliable data transmission between the host IMP and IMP-IMP. In the LAN, the data link layer is responsible for reliable data transmission between and between systems.
Network communication protocol layer 3: Network Layer
The main function of network layer is to transmit packets between hosts in the network. One of the key problems is to use the data link layer service to transmit each packet from the source to the target. In the wide area network, this includes generating routes from the source end to the target end, and requiring this path to go through as few IMP as possible. If too many packets appear in the subnet at the same time, the subnet may be congested, because this situation must be avoided.
When packets have to span two or more networks, there will be many new problems. The network layer is more redundant than a single LAN, Because packets are directly transmitted from one computer to another, so the network layer does little work.
Network communication protocol layer 4: Transport Layer
Transport layer) is used to implement reliable data communication between user processes on different hosts in the network.
The Transport Layer determines what kind of service the Session Layer user provides to the network user. The best transmission connection is an error-free, ordered data transmission pipeline, that is, the real point-to-point during the transmission layer connection.
Because most hosts support multi-user operations, there are multiple programs on the machine, which means there will be multiple connections in and out of these hosts. Therefore, we need to identify which connection the packets belong to in some way. The information for identifying these connections can be put into the packet header of the transport layer. In addition to multiplexing several packet streams into one channel, the transport layer must also manage the establishment and cancellation of cross-network connections. In this case, a naming mechanism is required to enable the processes in the machine to specify the objects they want to talk. In addition, a mechanism is required to adjust the information flow so that high-speed hosts do not transmit data to low-speed hosts too quickly. Although the traffic control between hosts is different from that between IMP.
Network communication protocol layer 5: Session Layer
Session layer) allows users on different machines to establish SESSION relationships. The Session Layer transmits common data in a similar transmission layer sequentially. In some cases, it also provides some useful enhanced services. You can use a session to log on to the remote time-sharing system or transfer files between two machines.