Layer 5: Session Layer - buaamer81/IT130-Networking-Wiki GitHub Wiki

Layer 5: Session Layer (OSI Model)


๐Ÿ“˜ Overview

The Session Layer is Layer 5 of the OSI Model.
It manages and controls conversations (sessions) between devices โ€” ensuring communication is properly started, maintained, synchronized, and ended.

Think of it as:
โ€œWho speaks, when, and for how long in a conversation between devices.โ€


๐Ÿ”ง Key Responsibilities

  • Establishing sessions between devices
  • Maintaining sessions during communication
  • Synchronizing data streams
  • Re-establishing interrupted sessions
  • Terminating sessions after communication ends
  • Managing multiple sessions at once

๐Ÿ“ฆ Data Unit: No Unique PDU

Layer 5 uses the segments (from Layer 4) but controls the logical sessions those segments belong to.


๐Ÿ•น๏ธ Real-World Examples

Scenario How Session Layer Works
Logging into a website Starts and maintains a session until logout
Online banking Manages secure sessions with timeouts
Remote desktop sessions Keeps connection alive, handles reconnection
VoIP Calls Maintains call sessions across devices

๐Ÿงฉ Protocols Associated with Layer 5

Protocol Purpose
NetBIOS Allows applications to communicate over LAN
RPC (Remote Procedure Call) Runs programs on remote systems
SQL Sessions Database client/server communication
SMB File sharing session control

Note: In TCP/IP Model โ†’ Session Layer functions are often handled by Application Layer protocols.


๐Ÿงช Troubleshooting at Layer 5

  • Sessions dropping unexpectedly โ†’ Check timeouts
  • Session conflicts โ†’ Verify proper session establishment rules
  • Repeated logouts โ†’ Session configuration error

๐Ÿง  Real-Life Scenario

When you log into your online banking portal:

  • Layer 5 ensures the session stays active for a specific time.
  • If you are inactive, it terminates the session automatically for security.

๐Ÿ“Š Visual Aids


๐Ÿ” Related Pages


Return to: OSI Model Overview