OSI Model
The OSI (Open Systems Interconnection) model is a conceptual
framework used to understand and implement network protocols in
seven distinct layers. Each layer has a specific function and
communicates with the layers directly above and below it.
Layer Name Function Examples
Layer 7 Application Interfaces with end-user applications, HTTP, FTP, SMTP, DNS
providing services like email, file
transfer, and web browsing.
Layer 6 Presentation Translates data into a format the SSL/TLS, JPEG, GIF, data encoding
application can understand, handling
encryption, decryption, and data
compression.
Layer 5 Session Manages sessions or connections NetBIOS, RPC
between applications, establishing,
maintaining, and ending
communication sessions.
Layer 4 Transport Ensures reliable data transfer with TCP, UDP, port numbers
error checking, flow control, and data
retransmission.
Layer 3 Network Handles routing, addressing, and IP addresses, routers, IPv4/IPv6
packet forwarding between devices
across networks.
Layer 2 Data Link Manages node-to-node data transfer MAC addresses, Ethernet, switches
and error detection/correction on the
physical link.
Layer 1 Physical Deals with the physical connection Ethernet cables, USB, Wi-Fi
between devices, transmitting raw data
over physical media.
Application Layer (Layer 7)
• Function: The topmost layer where user applications interact with the
network. It provides network services directly to end-users, like file
transfer, email, and web browsing.
• Examples: HTTP, FTP, SMTP, DNS, and web browsers.
Presentation Layer (Layer 6)
• Function: Translates data between the application layer and the
network. It handles data encryption, decryption, compression, and
format translation, ensuring data is in a readable format for the
application layer.
• Examples: SSL/TLS encryption, JPEG, GIF, and data encoding formats.
Session Layer (Layer 5)
• Function: Manages sessions or connections between applications. It
establishes, maintains, and terminates communication sessions,
ensuring data is synchronized and properly exchanged.
• Examples: Session management protocols like NetBIOS, RPC.
Transport Layer (Layer 4)
• Function: Ensures reliable data transfer between devices, providing
error checking, data flow control, and retransmission of lost data
• Examples: TCP, UDP
Network Layer (Layer 3)
• Function: Handles data routing, addressing, and packet forwarding
between devices across multiple networks. It determines the best
path for data to travel from source to destination.
• Examples: IP addresses, routers, and IPv4/IPv6 protocols.
Data Link Layer (Layer 2)
• Function: Responsible for node-to-node data transfer and error
detection/correction. It ensures that data is transferred correctly
between two physically connected devices.
• Examples: MAC addresses, Ethernet, and switches.
Physical Layer (Layer 1)
• Function: Deals with the physical connection between devices,
including the transmission and reception of raw binary data over a
physical medium (like cables, fiber optics, or wireless signals).
• Examples: Ethernet cables, USB, Bluetooth, and Wi-Fi.
TCP/IP Model
• The TCP/IP model is a simplified version of the OSI model used to
facilitate communication over the internet. It has four layers,
compared to the seven layers of the OSI model.