Linux tcp/ip theoretical model OSI concepts and protocols corresponding to different levels, can not be layered packet unpacking routing explanation

Yuxian: CSDN content partner, CSDN new star mentor, full-stack creative star creator, 51CTO (Top celebrity + expert blogger), github open source enthusiast (go-zero source code secondary development, game back-end architecture https: https://github.com/Peakchen)

Both TCP/IP and OSI are theoretical models of computer network communication. They both divide network communication into different levels, and each level is responsible for different tasks, thus realizing the reliability, stability and scalability of network communication.

The TCP/IP model is the basis of Internet communication and consists of four layers, namely the application layer, transport layer, network layer and data link layer. Each level has a corresponding protocol, such as HTTP protocol, DNS protocol, TCP protocol, UDP protocol, IP protocol and so on. The underlying structure of the TCP/IP model is the physical layer and the data link layer, which are responsible for converting data into physical signals and sending them to the receiver through physical media.

 

The OSI model is a more detailed network communication model consisting of seven layers, namely application layer, presentation layer, session layer, transport layer, network layer, data link layer and physical layer. Each level has a corresponding protocol, such as SMTP protocol, FTP protocol, HTTP protocol, TCP protocol, UDP protocol, IP protocol, ARP protocol and so on. The underlying structure of the OSI model is also the physical layer and the data link layer, which are responsible for converting data into physical signals and sending them to the receiver through physical media.

The difference between the TCP/IP model and the OSI model lies in the differences in layer division and protocol selection, but their common goal is to achieve reliability, stability and scalability of network communication.

In terms of usage scenarios, the TCP/IP model is more widely used in Internet communications, such as Web browsers, emails, file transfers, remote logins, and more. The OSI model is more used in enterprise internal network communication, such as local area network, wide area network, virtual private network and so on.

In terms of practical application methods, both the TCP/IP model and the OSI model realize network communication based on hierarchical encapsulation and unpacking. The sender encapsulates the data from the application layer into data packets of the transport layer, network layer, data link layer, and physical layer in turn, and sends them to the receiver through the physical medium. The receiver unpacks the data packets in turn to restore the original data.

The following are the protocols corresponding to each layer of the TCP/IP model and the OSI model:

TCP/IP model:

  1. Application layer: Responsible for communication and data exchange between applications, such as HTTP, FTP, SMTP and other protocols.
  2. Transport layer: Provides end-to-end data transmission and error detection, the most commonly used protocols are TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).
  3. Network layer: deals with IP addressing and routing, and is responsible for transferring data packets from source hosts to destination hosts, the most commonly used protocol of which is IP (Internet Protocol).
  4. Link layer: responsible for physical transmission and encapsulation and decapsulation of data packets, Ethernet is one of the most commonly used protocols.

OSI model:

  1. Application layer: Similar to the application layer of the TCP/IP model, it is responsible for communication between applications.
  2. Presentation layer: Responsible for data format conversion, data encryption and compression, etc., to ensure that data from different systems can be interpreted correctly.
  3. Session layer: responsible for establishing and managing sessions and the sequence of data transmission.
  4. Transport layer: Similar to the transport layer of the TCP/IP model, it provides end-to-end data transmission and error detection.
  5. Network layer: Similar to the network layer of the TCP/IP model, it handles IP addresses and routing.
  6. Data link layer: Similar to the link layer of the TCP/IP model, it is responsible for physical transmission and encapsulation and decapsulation of data packets.
  7. Physical layer: responsible for the transmission of physical transmission media and bit streams.

The main difference between the TCP/IP model and the OSI model lies in the layer division and different choices of protocols. The TCP/IP model is the more commonly used model in practice, and its set of protocols is widely used in the Internet and many corporate and personal networks.

references:

Regarding the flow chart of the underlying architecture and the usage scenarios of specific products, the specific situation will vary with different applications and environments. Here are some links to relevant literature material for further study:

  1. "TCP/IP Illustrated, Volume 1: The Protocols" by W. Richard Stevens: This book is a classic work on the detailed introduction of the TCP/IP protocol stack, which contains detailed explanations and diagrams of the underlying architecture and protocols.

  2. "Computer Networks: A Systems Approach" by Larry L. Peterson and Bruce S. Davie: This book covers a wide range of topics in computer networking, including detailed explanations and practical applications of TCP/IP and the OSI model.

  3. "TCP/IP Protocol Suite" by Behrouz A. Forouzan: This book is a detailed introduction to the TCP/IP protocol suite, including detailed explanations and diagrams of the underlying architecture and protocols.

Regarding current products using TCP/IP, the following are some common products and scenarios using TCP/IP:

  1. Web browser: Web browsers (such as Chrome, Firefox) use the TCP/IP protocol stack to communicate with the server, obtain and display web page content.

  2. Email client: Email clients (such as Outlook, Gmail) use the TCP/IP protocol stack to communicate with the mail server through the SMTP and POP3/IMAP protocols to send and receive emails.

  3. File Transfer Protocol (FTP) client: The FTP client uses the TCP/IP protocol stack to communicate with the FTP server through the FTP protocol to upload and download files.

  4. Remote login tools: Remote login tools (such as SSH, Telnet) use TCP/IP protocol stack to communicate with remote hosts through SSH or Telnet protocol, execute remote commands and manage remote systems.

  5. Cloud computing and virtualization platforms: Cloud computing and virtualization platforms (such as AWS, Azure, VMware) use the TCP/IP protocol stack to realize network communication between virtual machines and connections with external networks.

  6. IoT devices: IoT devices use the TCP/IP protocol stack to communicate with cloud servers or other devices to achieve data transmission and remote control.

Guess you like

Origin blog.csdn.net/feng1790291543/article/details/131833586