This paper is participating in theNetwork protocols must be known and must be known”Essay campaign

Introduction to the

  • The Open System Interconnection (OSI) model is a standard System developed by the International Organization for Standardization (ISO/IEC 7498-1) for Interconnection of computers and communication systems.
  • It is a worldwide network standardThe conceptual modelOSI’s efforts led to the gradual standardization of Internet protocols

OSI seven layer model

Application layer, presentation layer and session layer are combined into application layer

Application Layer

Provide advanced apis

  • Defines the methods and interfaces (business protocols, advanced protocols, etc.) provided by the network host
  • Often directly corresponding to user behavior
  • HTTP, FTP, SMTP, etc

Presentation Layer

  • Also called Syntax Layer
  • Convert data in the application layer into transmission format, preserving semantics (e.g., serialization, encryption and decryption, string encoding and decoding, etc.)
  • Ensure that the data can be understood by the recipient after being sent

Session Layer

  • Provide methods to manage the session (Open/Close/ReOpen/ check state, etc.)
  • Provides intermittent hiding of underlying connections and even multiple underlying streams (provides data synchronization points)

Transport Layer

Provides host-to-host data communication capabilities

  • Establishing a connection ensures that data packets are sent and received in the same sequence
  • Provide reliability (sender knows whether the data has been delivered in full)
  • Provide flow control (sender and receiver synchronize rates)
  • Multiplexing provides Multiplexing

Network Layer

Provides data transfer capability between logical units (such as IP addresses)

  • Routing: Determining where data goes next
  • Addressing: Adds header information to a data packet

Data Link Layer

Provides the ability to transfer data between devices

  • Flow control: Synchronizes the speed and amount of data sent and received between sender and receiver
  • Error control: detect whether the data is wrong and retry

Physical Layer

How does the underlying data become physical signals

  • The data transfer behavior of data link layer is transformed into the signal recognized by physical devices
  • Encapsulates the capabilities of a large number of underlying physical devices

Actual Scenario Application

A and B send wechat messages

  • The input submitted by A is stored in some internal protocol format by wechatThe application layer
  • The data is converted into a format (encrypted, compressed, etc.) for transmissionThe presentation layer
  • Wechat client to establish a connection with the server —The session layer
  • The wechat client transmits data to the server —The transport layer
  • Data packets are transferred from the host to the serverThe network layer
  • Data frames are transmitted between devicesData link layer
  • Data is ultimately transmitted between devices in the form of photoelectric signalsThe physical layer

The data view