Open In App

Session Layer in OSI model

Last Updated : 28 Jan, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

The Session Layer is the 5th layer in the Open System Interconnection (OSI) model which plays an important role in controlling the dialogues (connections) between computers. This layer is responsible for setting up, coordinating, and terminating conversations, exchanges, and dialogues between the applications at each end. It establishes, manages, and terminates the connections between the local and remote applications.

  • The Session Layer is responsible for establishing active communication sessions between two devices.
  • In the OSI model, the transport layer is not responsible for releasing a connection. Instead, the session layer is responsible for that. However, in modern TCP/IP networks, TCP already provides orderly closing of connections at the transport layer.
  • Dialogue Control is also implemented in the Session Layer of the OSI model but in TCP/IP the dialogue control is implemented in the Application Layer.
  • Session-layer services are commonly used in application environments that use remote procedure calls (RPCs).
  • Zone Information Protocol in AppleTalk is an example of Session Layer Implementation.
  • Session Layer has synchronization and resynchronization techniques that ensure reliable and orderly communication over networks, which is particularly important in applications requiring high levels of data integrity and continuity.
  • Synchronization points are markers or tokens inserted into the data stream that allow communication sessions to have checkpoints and on the other hand Resynchronization involves restoring a session to a known state after a disruption, such as a network failure or session timeout.
27

Session Layer in OSI Model

In Session Layer, data streams are received and further marked, which is then resynchronized properly, so that the ends of the messages are not cut initially and further data loss is avoided. This layer establishes a connection between the session entities. This layer handles and manipulates data that it receives from the Session Layer as well as from the Presentation Layer.

Functions of Session Layer

The session layer performs several different as well as important functions that are needed for establishing as well as maintaining a safe and secure connection:

  1. Session Establishment : It establishes and manages sessions between communicating parties that cab be connection-oriented or connectionless. It also maps sessions to transport connections.
  2. Communication Synchronization : It ensures reliable connectivity and recovery by using synchronization bits and checkpoints in data stream.
  3. Activity Management : It allow the user to divide data into logical units called activities. An activity can be processed on its own and each activity is independent of activities that come before and after it.
  4. Dialog Management : It refers to deciding whose turn it is to talk. Some applications uses a token mechanism for half-duplex mode, where only one party holds the token to transmit data while other supports full-duplex mode for simultaneous data transmission.
  5. Data Transfer : It manages data exchange between systems.
  6. Resynchronization : In this,  all the tokens are restored to the positions that were set during synchronization. The various options for resynchronization includes set, abandon and restart.

Read in detail about Functions of Session Layer.

Working of Session Layer

  • The Session Layer manages communication sessions between applications over a network.
  • It establishes connections, negotiating session parameters like authentication and communication direction (full-duplex or half-duplex).
  • It oversees data exchange by using tokens to manage transmission rights and prevent collisions.
  • Synchronization techniques are implemented, inserting checkpoints for recovery in case of disruptions.
  • It ensures orderly communication, reducing message loss, duplication, or errors caused by overlapping communication.
  • The Session Layer gracefully terminates the session, ensuring all data is exchanged and both sides agree to close

Session Layer Protocols

Session Layer uses some protocols which are required for safe, secure and accurate communication which exists between two-ender user applications. Following are some of the protocols provided or used by the Session Layer:

  • AppleTalk Data Stream Protocol (ADSP): ADSP is that type of protocol which was developed by Apple Inc. and it includes a number of features that allow local area networks to be connected with no prior setup. This protocol was released in 1985. This protocol rigorously followed the OSI model of protocol layering. ADSP itself has two protocols named: AppleTalk Address Resolution Protocol (AARP) and Name Binding Protocol (NBP), both aimed at making system self-configuring.
  • Real-time Transport Control Protocol (RTCP): RTCP is a protocol which provides out-of-band statistics and control information for an RTP (Real-time Transport Protocol) session. RTCP’s primary function is to provide feedback on the quality of service (QoS) in media distribution by periodically sending statistical information such as transmitted octet and packet counts or packet loss to the participants in the streaming multimedia session.
  • Point-to-Point Tunneling Protocol (PPTP): PPTP is a protocol which provides a method for implementing virtual private networks. PPTP uses a TCP control channel and a Generic Routing Encapsulation tunnel to encapsulate PPP (Point-to-Point Protocol) packets This protocol provides security levels and remote access levels comparable with typical VPN (Virtual Private Network) products.
  • Password Authentication Protocol (PAP): It is a password-based authentication protocol used by Point to Point Protocol (PPP) to validate users. Almost all network operating systems, remote servers support PAP. PAP authentication is done at the time of the initial link establishment and verifies the identity of the client using a two-way handshake (Client-sends data and server in return sends Authentication-ACK (Acknowledgement) after the data sent by client is verified completely).
  • Remote Procedure Call Protocol (RPCP): It is a protocol that is used when a computer program causes a procedure (or a sub-routine) to execute in a different address space without the programmer explicitly coding the details for the remote interaction. This is basically the form of client-server interaction, typically implemented via a request-response message-passing system.
  • Sockets Direct Protocol (SDP): It is a protocol that supports streams of sockets over Remote Direct Memory Access (RDMA) network fabrics. The purpose of SDP is to provide an RDMA-accelerated alternative to the TCP protocol. The primary goal is to perform one particular thing in such a manner which is transparent to the application.

What devices are in the session layer?

Devices associated with the Session Layer include:

  • Firewalls: Manage session control by monitoring and filtering network connections.
  • Proxy Servers: Establish and manage sessions between clients and servers.
  • Session Border Controllers (SBCs): Used in VoIP to manage and secure communication sessions.
  • Application Servers: Handle session creation and management for applications.

How does the Session Layer differ from the Transport Layer?

The Session Layer manages sessions (logical connections), while the Transport Layer ensures reliable data delivery.

How does the Session Layer handle synchronization?

It uses checkpoints to allow data recovery in case of communication failure.



Next Article
Article Tags :

Similar Reads