OSI seven-layer model and an overview of the functions of each layer (easy to understand)

This article will provide a complete description of the concepts and functional overview of each layer of the OSI seven-layer model

1 OSI seven-layer model

1.1 OSI model concept

  • OSI (Open System Interconnect), that is, open system interconnection. The architecture standard defines the seven-layer framework of network interconnection ( physical layer, data link layer, network layer, transport layer, session layer, presentation layer and application layer ), that is, the OSI Open System Interconnection Reference Model.
  • OSI is a logical model rather than a physical model . It is a set of guiding principles that developers can use to develop applications running on the network. It also provides a framework that can be used to guide how to make and implement network standards. Devices and how to develop a network interconnection profile

1.2 Advantages of reference models

  • Divide the network communication process into smaller, simpler components, which facilitates component development, design, and troubleshooting.
  • By standardizing network components, multiple vendors can collaborate on development.
  • The functions performed by each layer of the model are clearly defined , thereby supporting industry standardization.
  • Enables different types of network hardware and software to communicate with each other.
  • Prevent changes to one layer from affecting other layers, thereby avoiding the impact of development work.

1.3 Observation from the perspective of network functions

insert image description here

  • The upper three layers specify how applications in the terminal communicate with each other and with the user
application layer Provide user data interface
presentation layer Indicates that the data provides encryption and other processing
session layer Separate data from different applications
  • In addition, the upper three layers are also responsible for application communication between hosts . All three layers know nothing about networking and network addresses , so that's the responsibility of the next four layers.
transport layer Provide reliable or unreliable transmission Perform error correction before retransmission
Network layer Provides logical addresses, which are used by routers for path selection
data link layer Split packets into bytes and assemble bytes into frames
physical layer Transfer bits between devices to specify level, cable speed and cable pinout

1.3.1 Layering

upper layer Function
application layer File, print, message database and application services
presentation layer Data encryption, compression and transformation services
session layer dialogue control
Middle Function
transport layer end-to-end connection
Network layer routing
lower level Function
data link layer framing
physical layer physical topology
  • I divided the seven layers into three groups: upper, middle, and lower . The upper layer is responsible for communicating with the user interface and applications; the middle layer is responsible for communicating reliably with and routing to the remote network; and the lower layer is responsible for communicating with the local network.

  • Armed with this knowledge, it's time to explore the functionality of each layer in detail .

2 OSI network model overview

insert image description here

2.1 Application layer

  1. The application layer is where the user communicates with the computer, and it only comes into play when there is an immediate need to access the network . The application layer is also responsible for determining the availability of targeted communications and determining whether sufficient resources are available for the desired communications.
  2. Provides an interface for application software to enable applications to use web service APIs

2.1.1 Presentation layer

  1. The presentation layer gets its name from its purpose, it provides data to the application layer and is responsible for data transformation and code formatting. Think of it as a translator in the OSI model, providing encoding and translation services.
  2. Data decoding and encoding, encryption and decryption, compression and decompression

2.2 Session layer

  1. The session layer establishes, manages, and terminates sessions between presentation layer entities; separates user data; and controls dialogs of devices .
  2. The session layer provides three modes: simplex, half-duplex, and full-duplex.

2.2.1 Simplex Half Duplex Full Duplex

  • Simplex

Simplex is a one-way communication, a bit like when you finish speaking, no one responds after you finish speaking.

  • Half Duplex Half Duplex is like a walkie talkie that someone responds but cannot respond to you when you speak it does not support data transmission in both directions at the same time.
  • full duplex

Full-duplex is similar to everyday conversation, devices can send and receive data at the same time, like two people arguing on the phone.

2.3 Transport layer

  1. The transport layer segments and reassembles data into data streams . Services at the transport layer receive various data from applications and combine them into one data stream. These protocols provide end-to-end data transmission services to establish logical links between sending hosts and destination hosts in the Internet.
  2. Provide users with reliable end-to-end error and flow control to ensure the correct transmission of messages , and at the same time shield the details of lower-layer data communication from the upper layers, that is, transparently transmit messages to users.

2.4 Network layer

  1. The network layer manages device addressing, keeps track of a device's location on the network and determines the best path for data transmission.
  2. Perform route selection and maintain routing tables .
  3. Responsible for transporting packet data from source to end to destination

2.4.1 Router

  • Router A router is a representative of the network layer and provides routing services in the Internet.

The specific process is as follows: After receiving a packet on an interface, the router first checks the IP address of the packet destination . If the destination of the packet is not in the current route, it will look up the destination network address in the routing table . After selecting an outbound interface, the router will packet The latter will encapsulate the packet into a frame and transmit it in the local network. If the corresponding interface of the target network cannot be found in the routing table, the router will discard the packet.

There are two types of packets used by the network layer: data packets and routing update packets

  • The following points must be kept in mind for routers

  • By default, routers do not forward any broadcast or multicast packets .

  • Routers can use administrator-created access lists to control the types of grouping that can enter and exit an interface for added security .

  • The router determines which next-hop router to forward the packet to according to the logical address in the header of the network layer

  • Routers can provide quality of service for certain types of network traffic

2.5 Data Link Layer

  1. The data link layer provides the physical transmission of data , and handles error notification, network topology, and flow control, which means that the data link layer will use hardware addresses to ensure that the message file is transmitted to the correct device in the LAN and will also send messages from the network layer. Convert text to bits. For physical layer transmission.
  2. On unreliable physical links, frames are moved from one hop node to another hop node according to reliable data transmission services.
  3. Representative: switch

2.6 Network layer

  1. The physical layer has two functions : sending and receiving bits. Bit values ​​can only be 0 and 1. The physical layer communicates directly with various communication media.
  2. The physical layer defines the physical characteristics of the interface and media.
  3. Define bit representation, data transfer rate, and signaling mode.
  • Physical Structure Topology
    Physical Structure Topology Has Bus Type Ring Star Mesh Hybrid Topology

3.1 Summary (review questions)

In this article, we have learned a lot of basic knowledge about the OSI model and fully introduced the details of each layer. After understanding the functions and advantages of the router, I will write three review questions to let everyone consolidate the basic knowledge.

  1. You need to link 150 computers to the network. These computers are on the same subnet, but each computer must be given dedicated broadband. To do this, what kind of equipment should be used to connect them?
    A. hub B. switch C. router D. bridge
  2. Which of the following devices only operates at all 7 layers of the OSI model?
    A. Network host B. Switch C. Router D. Bridge
  3. Which of the following OSI model layers is not involved in specifying how applications in a terminal communicate with each other and with the user?
    A. Transport layer B. Application layer C. Presentation layer D. Session layer

Answer BAA

Guess you like

Origin blog.csdn.net/2201_75288693/article/details/129197449