Description of OSI levels

Physical level (Level 1)

The first layer of OSI describes the physical environment necessary for the transfer of raw binary data between nodes (i.e. machines). The physical layer, among others, includes the following components:

cable characteristics (for example, thin coaxial cable, twisted pair of categories 3, 4, 5, optical fiber);

repeater;

network adapter;

main bus adapter;

network interface controller (network card);

wireless technologies

Layer 1 protocols — RS-232, PON, DSL, Bluetooth, USB, Ethernet, IR port, etc.

Physical layer functions

Bit synchronization.

With node-to-node communication, bit streams “flow” between the sender and the receiver, and vice versa. To ensure perfect synchronization of the signal (i.e. to know where the signal starts and ends), we use a clock. This is called phase-locked frequency (PLL).

Bitrate management.

So that a small flow does not occur during the transfer from node to node, a speed control mechanism is needed. The bitrate control function serves exactly this purpose: it determines how many bits are sent or received every second.

Physical topologies.

The physical layer also gives an idea of how various nodes and devices are organized in the network. There are 4 types of network topologies:

physical (describes the physical scheme of the network);

logical (describes how this network is designed, i.e. network architecture);

information (describes the direction of information flows transmitted over the network);

exchange management (the principle of transferring the right to use the network).

Transmission mode.

The first layer also handles the way data is transferred between nodes. At the physical level , 3 data transmission modes are defined:

simplex (communication is one-way, i.e. the recipient cannot respond to the sender’s message);

half-duplex (the action is two-sided, but one at a time, for example, the sender and receiver sequentially switch places and send messages in turn);

full duplex (sender and receiver can receive and send responses simultaneously).

  1. Channel layer (Level 2)

The Data Link Layer (DLL) helps to understand how to send data from one node to another through the physical layer (layer 1). For example, the first level works with bits and symbols, and the second level processes frames (containers for network packets).

Since the link layer is built on top of the physical layer, it must ensure that data sent from one node actually reaches the other node without errors. Since the second layer handles everything from transmission to error control, it needs additional efforts in the form of two sublevels: LLC (logical channel management) and MAC (media access management). Let’s take a closer look at each of them.

Sublevels of the channel layer

Logical Link Control (LLC)

The task of the topmost sublevel of the DLL is to provide a connection between the DLL and the second sublevel (MAC). LLC also plays a key role in multiplexing (combining multiple analog or digital signals into a single signal that passes through a common medium), provides flow control, identifies network layer protocols and encapsulates them.

Medium Access Control (MAC)

The second sublevel of the DLL is responsible for managing the hardware aspect of the interaction between devices. MAC also provides network cards with unique tags – MAC addresses, which are important for delivering data to the correct computer connected inside the network. MAC allows computers located on only one network to interact.

Layer 2 protocols — ATM, ARP, MAC, SLIP, L2TP, PLIP, etc.

Channel Layer functions

Framing.

Framing means creating a container for data transferred between two devices. The frame consists of four elements:

header (contains the sender and recipient addresses);

payload field (message body);

trailer (contains bits used to detect and correct errors);

flag (used to indicate the beginning and end of the frame).

Physical addressing.

The frames can be compared to an envelope. In order for the letter to reach the addressee, we need to specify the correct address on the envelope. In the network, the channel layer encloses the sender/recipient’s MAC address in the frame header so that the information reaches a specific recipient.

Error control.

The channel layer provides the means to identify and correct errors that may occur during transmission. If it detects lost or corrupted frames, it will automatically retransmit them.

Flow control.

If too much data is sent, the message itself may be corrupted. Flow control is necessary to optimize data transfer between nodes.

Access control.

When multiple devices attempt to exchange data over the same channel, the second sublayer (MAC) will select which device can control the communication channel at the moment.

  1. Network Layer (Layer 3)

This layer allows devices located on different networks to interact with each other. The network layer uses IP addresses and packet routing to ensure that the correct message reaches the right side.

Layer 3 protocols — Ipv4, IPv6, ICMP, IPX, PLP, AppleTalk, etc.

Network Layer functions

Routing

The shortest distance between two points is a straight line, but it works differently in networks, because sometimes the shortest route may not be viable. To solve this problem, the network layer uses protocols to build the best possible route.

Logical addressing

IP refers to the network layer in the same way that MAC refers to the link layer. IP allows the system to identify each host connected to the unified network and develop an addressing scheme. Similar to physical addressing at the second level, with logical addressing, the IP addresses of the sender and recipient will be placed in the header.

  1. Transport level (Level 4)

The transport layer handles everything related to the transportation of packages. This includes end-to-end delivery, confirmation of successful data transfer, and flow and error control. The task of the fourth level is to retransmit data if an error is detected. Since this is a software-oriented layer, in addition to the usual functions, there are also services in it.

Layer 4 protocols — TCP, UDP, SCTP, DCCP, SPX.

Transport layer functions

Segmentation and reassembly

In most cases, the message transmitted between the sender and the recipient may be too large to be transmitted in a single session. The transport layer uses the segmentation function to split the message transmitted from the session layer (layer 5). The broken message is then sent down to the transport layer (layer 4), which reassembles the message.

Addressing a service point

Network functions use a variety of applications and processes. To find out which application should receive the message, the service point addressing is used. This function allows the transport layer to add a special type of address to the message header. This way the level will know exactly where the message should be delivered. This address is called the service point address (port address).

Transport layer services

Service with connection setup.

This is a simplified version of the TCP/IP three-way handshake at the transport layer. The service consists of three stages: connection, data transfer and disconnection. The sender connects to the recipient, the message is transmitted, and the recipient confirms the transmission. If everything is in order, the connection is broken.

A service without establishing a connection.

Services without establishing a connection process only part of the data transfer, i.e. the recipient does not need to confirm receipt of the packet. A service without a connection is less secure and reliable, but significantly faster than a service with a connection.

  1. Session Layer (Layer 5)

The session layer is the second host layer (software-oriented) and is responsible for security, authentication, session maintenance and connection establishment.

Layer 5 protocols — NetBIOS, SAP, PPTP, RTP, SOCKS, etc.

Session-level functions

Setting up and ending a session

The session layer tells the two parties (sender and receiver) how to interact, as well as how to establish and terminate communication.

Synchronization

The session-level error control mechanism allows the process to add control points (flags) to the transmission in order to identify and correct any inconsistencies by label.

Dialog management

The session layer can “force” a process to transmit messages in half-duplex or full-duplex mode.

  1. Presentation Level (Level 6)

This layer is responsible for translating information received from the application layer (level 7). For this reason, the presentation level is also called the translation level. In other words, level 6 represents data in a form understandable to humans and machines, including text, images and audio/video data.

Layer 6 protocols — MIME, XDR, ASN.1, ASCII, PGP.

Representation Level functions

Translation

The representation layer translates text from one encoding to another. For example, from ASCII to plain text.

Encryption/decryption

Encryption means using a key to convert plain text to ciphertext and using the same key to decrypt a message.

Compression

The presentation layer uses a compression function to remove a few bits from the message to make the transmission smoother.

  1. Application Level (Level 7)

The application layer (desktop layer) is an environment where we can actually work with OSI layers. This includes browsers, email clients, games, video players, and more.