Computer reference model

Hierarchical model

Stratified thinking

Hierarchical thinking helps to simplify and clarify complex issues. Just like the important position of enterprise organization structure in enterprise management, computer networks are given different layers. Each layer has a certain function. Through the interface to communicate, the lower layer provides services for the upper layer. Once a network failure occurs, it is easy to determine where the problem lies, which greatly saves troubleshooting costs.

OSI seven-layer model

Previously, various computer manufacturers used private network models, which caused troubles in communication. In 1984, the International Organization for Standardization (ISO) promulgated the Open System Interconnection Reference Model (OSI).
OSI Reference Model
Application layer: Contains a large number of protocols commonly needed by people. During human-computer interaction, input human language into the computer, such as inputting characters in the dialogue window of WeChat chat.

Presentation layer: It is used to complete certain specific functions. For these specific functions, people often hope to find general solutions, instead of having to be implemented by each user. Therefore, the computer will translate the received data into a computer language composed of binary numbers. , And work on data compression and decompression, data encryption and decryption.

Session layer: Allows users on different machines to establish a session connection relationship.

Transport layer: Realize data communication between user processes on different hosts in the network, fragment upper layer application data and add port numbers to encapsulate them into data segments, or identify the port in the message header.

Network layer: Realize the transmission of data from the source to the destination, and encapsulate the upper layer data with the logical (IP) addresses of the source and the destination into a data segment.

Data link layer: Responsible for encapsulating the upper layer data into a fixed format frame, and encapsulating the upper layer data plus the physical (MAC) addresses of the source and destination parties into a data frame.

The physical layer: completes the transmission of the original bit stream between adjacent nodes; the header of the message and the upper layer data information are composed of binary numbers, and the physical layer converts the bit stream composed of binary numbers into electrical signals for transmission in the network.

TCP/IP protocol suite

Insert picture description here
TCP/IP is the abbreviation for Transmission Control Protocol/Network Interconnection Protocol. The early TCP/IP model was a four-layer structure, from top to bottom in turn were the application layer, the transport layer, the Internet layer, and the network interface layer. Later, learning from the OSI seven-layer model, the Internet interface layer was divided into the physical layer and the data link layer, forming a new five-layer structure. TCP/IP is a collection of a series of protocols, so it is strictly called the TCP/IP protocol cluster.

Insert picture description here
IP (Internet Protocol) protocol and its functions:
ARP (Address Resolution Protocol): used to obtain the physical address based on the IP address in the local area network
RARP (Reverse Address Resolution Protocol): used to request the IP address based on the physical address in the local area network through the ARP table
ICMP (Internet Control Message Protocol): used to verify the smoothness of the network
IGMP (Internet Group Management Protocol): used for multicast communication between hosts and multicast routers

Data transfer process

Data encapsulation

  • Application layer-data is "translated" into binary data
  • Transport layer-the upper layer data is divided into small data segments, and the TCP packet header is encapsulated after each data
  • Network layer-upper layer data is encapsulated in IP header
  • Data link layer-upper layer data is encapsulated in the MAC header
  • Physical layer-the bit stream composed of binary data is converted into an electrical signal to propagate in the network

Data decapsulation

  • Physical layer-electrical signals are converted into binary data and sent to the data link layer
  • Data link layer-check the MAC address, whether it is your own, remove the MAC header if it is, and send the data to the upper layer; if not, discard the data
  • Network layer-check the IP address, whether the address is one's own, remove the IP header, and continue uploading; if not, discard the data
  • Transport layer-look at the TCP header, determine where it should be transmitted, then reorganize the data, and transmit it to the application layer
  • Application layer-binary conversion into original information

TCP and UDP protocol

TCP protocol

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 Web services
21 FTP (File Transfer Protocol) ): used to control the connection to the FTP server
53 DNS (Domain Name System): used to connect to the 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 protocol

UDP (User Datagram Protocol) protocol application port and its protocol function-higher transmission efficiency
69 TFTP (Simple File Transfer Protocol): used for the transmission of small files
53 DNS (Domain Name System): used to resolve DNS
111 SNMP ( Simple Network Management Protocol): used for network equipment management
123 NTP (Network Time Protocol): used for network time synchronization

Guess you like

Origin blog.csdn.net/weixin_55609819/article/details/114315476