>_
EngineeringNotes
Back to Computer Networks
Module 06 • Session Layer

Session Layer

The 5th layer of the OSI model, responsible for establishing, managing, and terminating communication sessions between applications.

01

Overview & Functions

The Session Layer works between the Transport Layer (Layer 4) and the Presentation Layer (Layer 6).

A session is a temporary communication connection between two devices or applications. It remains active until the communication ends (e.g., logging into a website, video conferencing, online gaming).

The Manager

Creates, manages, and cleanly closes communication.

Main Functions

1. Establishment

Creates a communication session between sender and receiver. (e.g., User logs into a server).

2. Management

Keeps the session active during communication, handling synchronization and coordination.

3. Termination

Properly closes the session when communication ends. (e.g., Logging out from a website).

4. Dialog Control

Controls who can send data and when. Supports Half-Duplex (one at a time) and Full-Duplex (both simultaneously).

5. Synchronization

Adds checkpoints. If connection fails at 4GB during a 5GB transfer, it resumes from 4GB instead of 0.

6. Token Management

Prevents two devices from sending data at the same time using a token system.

02

Working Process

1

Session Creation

Connection between applications is established.

2

Authentication

User identity may be verified (e.g., validating credentials).

3

Data Exchange

Actual communication takes place between the client and server.

4

Synchronization

Checkpoints are created periodically to ensure data integrity during transfer.

5

Session Closing

Session is cleanly terminated after completion.

03

Session Layer Protocols

NetBIOS

Allows applications on different computers to communicate over a LAN. Widely used in Windows networking.

  • Naming
  • Session management
  • Data transfer

RPC (Remote Procedure Call)

Allows one computer to execute functions on another computer.

  • Cloud services
  • Distributed systems

SMB (Server Message Block)

Used primarily in Windows networks for sharing resources.

  • File sharing
  • Printer sharing
  • Resource sharing

PPTP

Point-to-Point Tunneling Protocol.

  • VPN communication
  • Secure tunneling
04

Comparisons & Architecture

Transport Layer vs Session Layer
FeatureTransport (L4)Session (L5)
Main RoleEnd-to-end deliverySession management
Data UnitSegmentData
ReliabilityError & flow controlSession synchronization
Session Layer vs Presentation Layer
Session LayerPresentation Layer
Manages sessionsManages data format
SynchronizationEncryption/compression
Dialog controlTranslation
Session establishmentData representation

OSI vs TCP/IP Regarding Session Layer

OSI Model
  • • Separate Session Layer exists (Layer 5)
  • • Dedicated session management
TCP/IP Model
  • • No separate session layer
  • • Functions are combined in the Application layer and Transport layer.
05

Real-Life Analogy

Imagine a Phone Call

Calling someoneSession establishment
Talking continuouslySession management
Saying "your turn"Dialog control
Call disconnected and resumedSynchronization
Hanging upSession termination