Computer network (2)-layered structure and OSI reference model, TCP/IP reference model, 5-layer reference model

Computer network (2)-layered structure and OSI reference model, TCP/IP reference model, 5-layer reference model

1. Why is stratification required?

A lot of preparation work needs to be completed before sending files, and many big problems are solved. In order to solve these big problems, it is necessary to use a hierarchical structure to convert big problems into small ones and then solve them.
Insert picture description here

2. How to layer?

Insert picture description here
Insert picture description here
Each layer of the structure must wrap the SDU to generate a new PDU:
PDU (data unit transmitted between peer levels) = PCI (protocol control information) + SDU (actual data transmitted)
Insert picture description here

3. OSI Reference Model

Insert picture description here
Commonly used in production is the 4-layer TCP/IP reference model.
In order to solve the large and complex problems in the computer network, a hierarchical structure is required.
Purpose: Support the interconnection of heterogeneous network systems.
The International Organization for Standardization (ISO) proposed the Open System Interconnection (OSI) reference model in 1984, which is not conducive to production and use and is only suitable for theoretical research.

OSI reference model: The material data network transmission meeting table should
123层 belong to the communication subnet and used for data communication .
567层It belongs to the resource subnet and is used for data processing .

Insert picture description here
The communication process of the OSI reference model:
Insert picture description here
end-to-end : the last four layers send data packets without knowing how the data is sent in the middle or where the data packet passes, only the sending peer entity is required.
Point-to-point : The first three layers send data packets, and you must know to whom to send next.

The packaging and unpacking process of the OSI reference model:
Insert picture description here
Note:
① The data link layer needs to package the PDU sent from the upper layer head and tail, while other layers (except the physical layer) only need to head the data.
②The physical layer does not need to package the data transmitted from the data link layer, but only needs to convert the data into bits.

4. Detailed OSI Reference Model

4.1 Application layer

Programs that require networking belong to the application layer, and those that do not require networking do not belong to the application layer. For example, QQ and WeChat belong to the application layer, but Notepad does not belong to the application layer.
Insert picture description here

4.2 Presentation layer

Presentation layer: used to process 交换信息the presentation methods (syntax and semantics) in the two communication systems.
3 major functions:
①data format conversion
②data encryption and decryption
③data compression and recovery

4.3 Session layer

Session Layer: provides the presentation layer entity / user process 建立连接and the connection 有序of the 传输data. The established connection, that is 建立会话, is also called 建立同步. Multiple sessions that do not affect each other can be established at the same time.
2 major functions:
①Establish, manage, and terminate the session
②Use the checkpoint to enable the session to resume communication from the checkpoint/synchronization point when the communication fails, and realize data synchronization. Often used to transfer large files.

4.4 Transport layer

Transport layer : responsible for the communication between the two processes in the host, that is, end-to-end communication. The transmission unit is a segment or user datagram .
4 major functions:
①Reliable transmission, unreliable transmission : Reliable transmission based on confirmation mechanism, if no confirmation is received, it will be resent.
② Error control : When the sent message segment or user datagram is lost or the sequence is wrong, it will be repaired and corrected.
③Flow control : control the sending rate of the sender
④Multiplexing :
Multiplexing : Multiple application layers can use transport layer services at the same time [such as qq and WeChat sending messages to another qq and information at the same time, qq and WeChat have respectively Respective 端口号, so qq and WeChat can use the transport layer to transmit message segments at the same time without causing confusion.
Decentralization : The transport layer delivers the received information to the corresponding process on the application layer according to the port number. [Another QQ and WeChat received the message segment sent over, according 端口号to which application layer program the message segment should be handed over for processing.
Main protocols: TCP, UDP

4.5 Network layer

Network layer : The main task is to transfer 分组from 源端to 目的端, provide communication services for different hosts on the packet switching network . The network layer transmission unit is datagram . [Datagram is too long and can be cut into multiple packets for transmission]
Insert picture description here

4 major functions:
①Routing selection : find an optimal path for routing and forwarding
②Flow control : control the sending rate of the sender
③Error control : check whether the received packet is wrong, and ensure that the received data is correct.
④ Congestion control : When all nodes are too late to receive packets, a large number of packets will be lost, and the network will be in congestion at this time. Measures need to be taken to alleviate this state, namely congestion control.
Main protocol : IP IPX ICMP IGMP ARP RARP OSPF

4.6 Data Link Layer

Data link layer : Assemble data from the network layer into frames. The transmission unit of this layer is .
4 major functions:
① framing (define the start and end of the frame)
② error control: frame error, bit error
③ flow control
④ access (access) control: control access to the channel, the frame is broadcast on the data link layer Other hosts can only be used for monitoring, so only one host can access the data link layer at a time.
Main protocol : SDLC HDLC PPP STP

4.7 Physical layer

Insert picture description here
Simplex : The sender and receiver have been confirmed, and only one sender can send at the same time.
Half-duplex : The sending and receiving parties can exchange roles, but only one sender can send at the same time.
Duplex : The sending and receiving parties can exchange roles, and both parties can send data at the same time.

5. TCP/IP Reference Model

Insert picture description here
OSI reference model and TCP/IP reference model similarities:
Insert picture description here
OSI reference model and TCP/IP reference model differences:

6. 5-layer reference model

Insert picture description here
Insert picture description here
OSI Reference Model : Material Data Network Transmission Meeting Table Application
TCP/IP Reference Model : Network Network Transmission Application
5-layer Reference Model : Material Data Network Transmission Application

Guess you like

Origin blog.csdn.net/weixin_36522099/article/details/109293915