OSI seven-layer model and TCP/IP protocol stack | Computer Network

1.OSI seven-layer model

1.1 OSI seven-layer model

Layer name Transmitted data Features
Application layer Message Provide inter-application process communication
Presentation layer Message Processing data format, data encryption, etc.
Session layer Message Establish, maintain and manage sessions
Transport layer Segment Establish host end-to-end connection
Network layer Package Addressing and routing
data link layer Frame Provide media access, link management, etc.
Physical layer Bit stream (bit) Transport bit stream

Note: In the high-level session layer and above, the unit of data transmission is no longer named separately, collectively referred to as message

1.2 Description of each layer

Lower four floors

  • Physical layer
    The original bit stream transmitted on the communication channel is the basis of the OSI reference model, which implements the mechanical and electrical functional characteristics required for data transmission. The physical layer does not care about the meaning of each bit stream, but only pays attention to how to transmit the bit stream to the opposite end through different physical links. Typical devices such as repeaters and hubs are physical layer devices.
  • The data link layer
    provides control over the physical layer, detects and corrects possible errors, makes it appear an error-free line to the network layer, and performs flow control.
  • The network layer
    checks the network topology to determine the best route to transmit packets and forward data packets. The key issue is to determine how the data packet is routed from the source to the destination. The network layer device calculates the best route to the destination by running the routing protocol, finds the next network device to which the data packet should be forwarded, then uses the network layer protocol to encapsulate the data packet, and uses the services provided by the lower layer to send the data to The next network device.
  • The transport layer
    provides effective and reliable services to users (generally referring to the process of the application layer).

Upper three floors

  • Session layer The
    session layer does not participate in specific transmissions. It provides mechanisms for establishing and maintaining communication between applications, including access authentication and session management. If the server verifies the user login is completed by the session layer.
  • The presentation layer
    mainly solves the problem of grammatical presentation of user information. It converts the data to be exchanged from an abstract syntax suitable for a certain user to a transfer syntax suitable for internal use in the OSI system. That is to provide formatted representation and conversion data services. The presentation layer is responsible for data compression and decompression, encryption and decryption.
  • The application layer
    provides an interface for the operating system or network applications to access network services.

2. TCP/IP protocol stack

The openness and ease of use of the TCP/IP (Transfer Control Protocol/Internet Protocol) model has been widely used in practice, making the TCP/IP protocol stack the de facto standard protocol

2.1 TCP/IP protocol stack

Layer name Typical agreement effect
Application layer HTTP、Telnet、FTP、TFTP、DNS Provide application network interface
Transport layer TCP、UDP Establish an end-to-end connection
Network layer IP、ICMP、IGMP、ARP、RARP Addressing and routing
Network interface layer Ethernet、802.3、PPP、HDLC、FR Physical media access

2.2 Introduction to TCP/IP Protocol Stack Protocol

  • Application layer
    • HTTP (Hypertext Transfer Protocol): used to access various pages on the WWW server.
    • FTP (File Transfer Protocol): Provides a way for file transfer, which allows data to be transferred from one host to another.
    • DNS (Domain Name Service System): Used to realize the conversion from host domain name to IP address.
  • Transport layer
    • TCP (Transmission Control Protocol): Provides reliable connection-oriented communication services for applications, suitable for
      applications that require a response. Currently, many popular applications use TCP.
    • UDP (User Datagram Protocol): Provides connectionless communication and does not guarantee reliable transmission of data packets
      . It is suitable for transmitting a small amount of data at a time, and the reliability is the responsibility of the application layer.
  • Network layer
    • IP (Internet Protocol): IP protocol and routing protocol work together to find the optimal path that can transmit data packets to the destination. The IP protocol does not care about the content of the data message and provides a connectionless and unreliable service.
    • ARP (Address Resolution Protocol): resolve a known IP address into a MAC address.
    • RARP (Reverse Address Resolution Protocol): Used to resolve IP addresses when the data link layer address is known.
    • ICMP (Internet Control Message Protocol): Defines the function of network layer control and message delivery.
    • IGMP (Internet Group Management Protocol): Used for multicast group member management.
  • Data link layer The
    data link layer is divided into two sublayers: Logic Link Control Sublayer (LLC) and Media Access Control Sublayer (MAC, Media Access Control Sublayer). (There is also a five-layer structure, which separates the physical layer from the data link layer)

3. Correspondence between TCP/IP and OSI

OSI TCP/IP
Application layer, presentation layer, session layer (upper three layers) Application layer
Transport layer Transport layer
Network layer Network layer
Data link layer, physical layer Network interface layer

Guess you like

Origin blog.csdn.net/qq_40759015/article/details/115330007