OSI Model
OSI (Open Systems Interconnection) model is a conceptual framework used to understand and standardize how different networking protocols and technologies interact. It consists of 7 layers, each with specific functions and responsibilities. Below is a table summarizing the OSI model:
Layer
Name
Function
Protocols/Examples
Devices
7
Application Layer
Provides network services directly to end-user applications.
HTTP, HTTPS, FTP, SMTP, DNS, Telnet, SSH
PCs, Servers, APIs
6
Presentation Layer
Translates, encrypts, and compresses data for the application layer.
SSL/TLS, JPEG, MPEG, ASCII
Gateways, Encryption Devices
5
Session Layer
Establishes, manages, and terminates sessions between applications.
NetBIOS, RPC, SIP, PPTP
Session Management Tools
4
Transport Layer
Ensures reliable data transfer, error recovery, and flow control.
TCP, UDP, SCTP
Firewalls, Load Balancers
3
Network Layer
Handles logical addressing and routing of data between devices.
IP, ICMP, ARP, OSPF, BGP, RIP
Routers, Layer 3 Switches
2
Data Link Layer
Provides node-to-node data transfer and error detection on the physical layer.
Ethernet, MAC, VLAN, PPP, Frame Relay
Switches, Bridges, NICs
1
Physical Layer
Transmits raw bit streams over a physical medium (cables, wireless, etc.).
Ethernet, USB, Bluetooth, DSL, Fiber Optics
Hubs, Repeaters, Cables, Modems
Key Points About Each Layer
Application Layer (Layer 7):
Closest to the end user.
Provides interfaces for applications to access network services.
Examples: Web browsers (HTTP/HTTPS), email clients (SMTP), file transfers (FTP).
Presentation Layer (Layer 6):
Ensures data is in a readable format for the application layer.
Handles encryption, compression, and translation (e.g., converting text to ASCII).
Session Layer (Layer 5):
Manages sessions between applications (e.g., starting, stopping, and maintaining connections).
Example: A remote desktop session or a VoIP call.
Transport Layer (Layer 4):
Ensures reliable data delivery between devices.
Uses protocols like TCP (reliable, connection-oriented) and UDP (fast, connectionless).
Network Layer (Layer 3):
Handles logical addressing (IP addresses) and routing.
Determines the best path for data to travel across networks.
Data Link Layer (Layer 2):
Provides node-to-node data transfer.
Uses MAC addresses to identify devices on the same network segment.
Ensures error-free transmission over the physical layer.
Physical Layer (Layer 1):
Deals with the physical connection between devices.
Transmits raw bits over a physical medium (e.g., cables, radio waves).
How Data Flows Through the OSI Model
When data is sent from one device to another, it moves down the OSI layers on the sender's side and up the layers on the receiver's side. Each layer adds its own header (encapsulation) or removes it (decapsulation) as the data passes through.
Example: Sending an Email
Application Layer: The email client (e.g., Outlook) creates the email.
Presentation Layer: The email is encrypted (if using SSL/TLS).
Session Layer: A session is established with the email server.
Transport Layer: The email is broken into segments (TCP).
Network Layer: IP addresses are added to route the email.
Data Link Layer: MAC addresses are added for local delivery.
Physical Layer: The data is converted into electrical signals and sent over the network.
Last updated