OSI model, TCP/IP, data solution, encapsulation
1. OSI (Open System Interconnection) model
The International Organization for Standardization (ISO) developed the OSI (Open System Interconnection) model. This model divides the work of network communication into 7 layers: application layer, presentation layer, session layer, transport layer, network layer, data link layer and physical layer. The first three layers are considered high-levels and contain application-level data. The last four layers are lower layers, and these layers are closely related to data movement. Each of the last four layers is responsible for a specific task, and then transmits the data to the next layer.
Comparison of OSI model and TCP/IP model
The hierarchical idea is to decompose a complex process into several sub-processes with a single function. Just like the assembly line, each part has its own clear function to simplify the process. At the same time, when a problem occurs, the source of the problem can be detected in time and resolved quickly.
Application layer : Determine the nature of communication between processes to meet user needs and provide interface services between the network and user application software, which is the window of human-computer interaction.
Typical protocols: SMTP, SNTP, DNS, FTP, HTTP, SSH, TFTP;
Equipment: Computer
Presentation layer : Convert the exchanged data from the user's language into a computer language composed of binary numbers suitable for the OSI system, and complete data compression and decompression, encryption and decryption, etc.
Typical protocol: ASCII, JPEG, PNG, MP3, WAV, AVI;
Session layer : The session layer does not participate in specific transmissions. It provides mechanisms for establishing and maintaining communication between applications including access verification and session management. If the server authenticates the user login, it is done by the session layer.
Typical protocols: NFS, SQL, ASP, PHP, JSP, RSVP (resource reservation protocol), windows;
Transport layer : Responsible for obtaining all information. Therefore, it must track data unit fragments, data packets arriving out of order and other hazards that may occur during transmission. It provides end-to-end communication management .
Typical protocols: TCP, UDP, SPX, OSPF, port (65535 ports);
PDU: fragment segment
Equipment: firewall
Network layer : Choose appropriate routing and switching nodes between networks to ensure timely data transmission. The communication at the network layer and below is point- to -point communication .
Typical protocols: IP, IPX, ICMP, IGMP, ARP (IP->MAC), IARP;
PDU: packet/data packet;
Equipment: Router
Data link layer : Run protocols such as Ethernet. Physical (MAC) addresses, switches or network cards, and drivers all belong to the category of the data link layer.
Typical protocols: IEEE802.3 wired LAN (Ethernet) standard, IEEE802.11 wireless LAN standard, frame relay (antique VPN);
PDU:frame帧
Equipment: Ethernet, switch;
Physical layer : The physical layer is actually wiring, optical fiber, network card and other equipment used to connect two network communication devices together.
PDU (Protocol Data Unit): bit/bit stream
Equipment: hub HUB, network card;
Stratification | Features | |
---|---|---|
Application layer | An interface between network services and end users | application |
Presentation layer | Data representation, security, compression | application |
Session layer | Establish, manage, and terminate sessions | application |
Transport layer | Define the protocol port number for data transmission, as well as flow control and error checking | logic |
Network layer | Perform logical address addressing to achieve path selection between different networks | logic |
data link layer | Establish logical connection, perform hardware address addressing, error checking and other functions | hardware |
Physical layer | Establish, maintain, and disconnect physical connections | hardware |
Second, the composition of the TCP/IP protocol suite
TCP: (Transmission Control Protocol) protocol application port and its protocol function-transmission is more stable and reliable
80 HTTP (Hypertext Transfer Protocol): used for the interaction of requests and responses between the browser and the web server
21 FTP (File Transfer Protocol): used to control the connection to the FTP server
53 DNS (Domain Name System): used to connect to DNS server
25 SMTP (Simple Mail Transfer Protocol): used to send mail
110 POP3 (Post Office Protocol Version 3): used to receive mail
22 SSH (Secure Shell Protocol): used for remote encrypted login between computers
UDP (User Datagram Protocol) protocol application port and its protocol function-higher transmission efficiency
69 TFTP (Simple File Transfer Protocol): used for small file transfer, higher efficiency
53 DNS (Domain Name System): used to resolve DNS
111 RPC (Remote Call Protocol): used for remote procedure calls
161 SNMP (Simple Network Management Protocol): used for the management of network equipment
123 NTP (Network Time Protocol): used for network time synchronization
Different DNSs have different functions
IP (Internet Protocol) protocol and its functions
ARP (Address Resolution Protocol): used to obtain the physical address based on the IP address in the LAN
RARP (Reverse Address Resolution Protocol): used to request an IP address based on the physical address through the ARP table in the local area network
ICMP (Internet Control Message Protocol): used to verify whether the network is unblocked
IGMP (Internet Group Management Protocol) is used for multicast communication between hosts and multicast routers
Three, data encapsulation process and data unsealing process
Data encapsulation process
data unencapsulation process