What is Session Layer in OSI Model

What is Session Layer in OSI Model

Session Layer in OSI Model

Functions of the Session Layer

The Session Layer primarily focuses on managing and controlling the session between two devices.
Its functions can be categorized into several key areas:
  • Session Establishment
  • Session Maintenance
  • Session Termination
  • Dialog Control
  • Synchronization

Session Establishment

  • It ensures that both parties agree on the terms and conditions of the session before data transfer begins.
  • A common example is the setup of a secure connection between a web browser and a web server using HTTPS.

Session Maintenance

  • Once a session is established, the Session Layer is responsible for maintaining it throughout the communication process.
  • It monitors the session's health, checks for timeouts, and handles any disruptions that may occur.
  • For instance, in a video conferencing application, if a participant experiences a brief loss of internet connection, the Session Layer attempts to restore the session seamlessly.

Session Termination

  • When the communication session is no longer needed, the Session Layer ensures its proper termination.
  • This involves releasing any resources associated with the session and ensuring that both parties agree to end the session gracefully.
  • In a file transfer application, after the user finishes uploading a file, the session is terminated to free up resources.

Dialog Control

  • The Session Layer manages the flow of data between the two devices by defining how the communication will take place.
  • It determines which device can transmit at a given time, whether the communication will be full-duplex or half-duplex, and how error handling and flow control will be managed.
  • In a real-time online game, the Session Layer might decide which player gets to make a move in a turn-based game.

Synchronization

  • Synchronization involves coordinating actions between the sender and receiver to ensure data integrity.
  • The Session Layer may insert checkpoints in the data stream to allow for resynchronization in case of errors.
  • In a live streaming service, if a few video frames are lost due to network congestion, the Session Layer can help the receiver catch up by synchronizing and reordering the data.

Protocols of the Session Layer

NetBIOS (Network Basic Input/Output System)

  • Purpose: NetBIOS enables the communication between devices on a local area network (LAN).
  • Example: Used in early Windows networking for file and print sharing.

RPC (Remote Procedure Call)

  • Purpose: RPC allows programs to execute code on a remote server as if it were a local procedure call.
  • Example: Commonly used in client-server applications, like distributed databases.

PPTP (Point-to-Point Tunneling Protocol)

  • Purpose: PPTP is used for creating secure VPN connections over public networks.
  • Example: Employed by businesses to provide remote access to corporate networks.

SMB (Server Message Block)

  • Purpose: SMB facilitates file and printer sharing, as well as communication between networked devices.
  • Example: Utilized in Windows file sharing and print services.

Conclusion

Session Layer in the OSI Model serves as a critical intermediary that manages sessions, ensuring their establishment, maintenance, and graceful termination.