Networking Fundamentals

OSI Model Complete Guide — All 7 Layers Explained [2025]

G Gurpreet Singh July 28, 2026 5 min read
OSI Model Complete Guide — All 7 Layers Explained

What is the OSI Model?

The OSI (Open Systems Interconnection) model is a conceptual framework that standardizes how different network protocols and systems communicate. Developed by the ISO (International Organization for Standardization) in 1984, the OSI model divides network communication into 7 distinct layers, each with a specific function. Every layer communicates with the layer directly above and below it, creating a clean separation of responsibilities that makes network troubleshooting and design much easier.

The OSI model is the foundation of all networking knowledge — it is tested in every major networking certification including CCNA, Network+, and Security+.

The 7 Layers of the OSI Model

LayerNamePDUKey Protocols/DevicesFunction
7ApplicationDataHTTP, HTTPS, FTP, DNS, SMTP, DHCPUser-facing network services
6PresentationDataSSL/TLS, JPEG, MPEG, ASCII, EncryptionData translation, encryption, compression
5SessionDataNetBIOS, RPC, SQL, NFSSession establishment and management
4TransportSegmentsTCP, UDP, port numbersEnd-to-end delivery, flow control, error recovery
3NetworkPacketsIP, OSPF, BGP, EIGRP, RoutersLogical addressing and routing
2Data LinkFramesEthernet, MAC, ARP, Switches, NICsPhysical addressing, error detection
1PhysicalBitsCables, Hubs, Fiber, Wireless signalsRaw bit transmission over physical media

Memory tip (top to bottom): “All People Seem To Need Data Processing”
Memory tip (bottom to top): “Please Do Not Throw Sausage Pizza Away”

Layer 1 — Physical Layer

The Physical layer is the lowest layer and deals with the actual physical transmission of raw bits (1s and 0s) over a physical medium. It defines the electrical, mechanical, and procedural specifications for activating and maintaining physical links between network devices.

  • PDU: Bits
  • Devices: Hubs, repeaters, cables (Cat5e, Cat6, fiber optic), wireless radio signals, NICs
  • Responsibilities: Bit synchronization, line encoding, signal modulation, physical topology
  • Standards: Ethernet (IEEE 802.3), Wi-Fi (IEEE 802.11), USB, Bluetooth

Layer 2 — Data Link Layer

The Data Link layer provides node-to-node delivery of data within the same network segment. It packages raw bits from the Physical layer into frames, adds MAC addresses for source and destination, and handles error detection (not correction). It is divided into two sublayers: LLC (Logical Link Control) and MAC (Media Access Control).

  • PDU: Frames
  • Devices: Switches, bridges, NICs, APs (access points)
  • Addressing: MAC addresses (48-bit, hardware address)
  • Key protocols: Ethernet, ARP, PPP, HDLC, STP, VTP
  • Error detection: CRC (Cyclic Redundancy Check) in frame trailer

Layer 3 — Network Layer

The Network layer handles logical addressing and routing — determining the best path for data to travel from source to destination across multiple networks. Unlike Layer 2, which works within a single network segment, Layer 3 works across different networks using IP addresses.

  • PDU: Packets
  • Devices: Routers, Layer 3 switches, firewalls
  • Addressing: IP addresses (IPv4 and IPv6)
  • Key protocols: IP, BGP, OSPF, EIGRP, ICMP, NAT
  • Function: Routing, fragmentation, logical addressing

Layer 4 — Transport Layer

The Transport layer provides end-to-end communication between applications running on different hosts. It is responsible for segmentation, reassembly, flow control, error recovery, and multiplexing using port numbers. The two main Transport layer protocols are TCP (reliable, connection-oriented) and UDP (unreliable, connectionless).

  • PDU: Segments (TCP) / Datagrams (UDP)
  • Key protocols: TCP, UDP
  • Port numbers: HTTP (80), HTTPS (443), FTP (21), SSH (22), DNS (53)
  • TCP features: 3-way handshake, sequence numbers, acknowledgments, flow control
  • UDP use cases: DNS, VoIP, streaming, online gaming, DHCP

Layer 5 — Session Layer

The Session layer establishes, manages, and terminates communication sessions between applications. It handles session checkpointing, recovery, and dialog control (full-duplex vs half-duplex). In practice, many modern protocols combine Session, Presentation, and Application layer functions.

  • PDU: Data
  • Key protocols: NetBIOS, RPC (Remote Procedure Call), NFS, SQL sessions, SIP
  • Function: Session setup, maintenance, teardown, authentication, reconnection

Layer 6 — Presentation Layer

The Presentation layer translates data between the application format and the network format. It handles data encoding, encryption/decryption, and compression so that data sent by one application can be read by another, regardless of the underlying data format differences.

  • PDU: Data
  • Key functions: Encryption (SSL/TLS), data compression, character encoding (ASCII, Unicode), format conversion (JPEG, MPEG, GIF)
  • Example: When you visit an HTTPS website, SSL/TLS encryption operates primarily at the Presentation layer.

Layer 7 — Application Layer

The Application layer is the topmost layer and the one that end users interact with directly. It provides network services to user applications. Note that the Application layer does not refer to the actual application software (like Chrome or Outlook) — it refers to the protocols that applications use to communicate over the network.

  • PDU: Data
  • Key protocols: HTTP/HTTPS, FTP, SMTP, POP3, IMAP, DNS, DHCP, SNMP, Telnet, SSH
  • Function: Network services for applications — file transfer, email, web browsing, remote access

OSI Model vs TCP/IP Model

OSI LayerTCP/IP LayerProtocols
Application (7)ApplicationHTTP, FTP, DNS, SMTP
Presentation (6)SSL/TLS, encoding
Session (5)NetBIOS, RPC
Transport (4)TransportTCP, UDP
Network (3)InternetIP, ICMP, ARP
Data Link (2)Network AccessEthernet, Wi-Fi
Physical (1)Cables, signals

OSI Model Encapsulation

As data travels down the OSI model from Layer 7 to Layer 1 (sending), each layer adds its own header (and sometimes trailer) — this process is called encapsulation. As data travels up the OSI model at the receiving end, each layer removes its header — this is called de-encapsulation.

Which Devices Operate at Which OSI Layer?

DeviceOSI LayerReason
Hub / RepeaterLayer 1Simply repeats electrical signals
Switch (basic)Layer 2Uses MAC addresses to forward frames
RouterLayer 3Uses IP addresses to route packets
Layer 3 SwitchLayers 2–3Switches frames AND routes packets
FirewallLayers 3–7Can inspect up to application layer (NGFW)
Load BalancerLayers 4–7Works with ports and application data
NICLayers 1–2Physical connection + MAC addressing

OSI Model Troubleshooting Approach

The OSI model provides a systematic approach to network troubleshooting. Start at Layer 1 and work your way up:

  1. Layer 1: Is the cable plugged in? Are the lights on?
  2. Layer 2: Can you ping the default gateway? Is the ARP table correct?
  3. Layer 3: Is the IP address correct? Is routing working?
  4. Layer 4: Is the correct port open? Is a firewall blocking TCP/UDP?
  5. Layers 5–7: Is the application/service running? Is DNS resolving?

Frequently Asked Questions

Why does the OSI model have 7 layers?

The 7-layer structure was designed to separate different networking functions into manageable, independent modules. This allows vendors to develop products for specific layers without worrying about other layers — for example, switch manufacturers focus on Layer 2, while router manufacturers focus on Layer 3.

Is the OSI model still used today?

The OSI model is primarily used as a reference and teaching tool. Real-world networks use the TCP/IP model. However, OSI model terminology (Layer 2, Layer 3, etc.) is universally used by network engineers to describe protocols, devices, and troubleshooting approaches.

What layer does a ping operate at?

Ping uses ICMP (Internet Control Message Protocol) which operates at Layer 3 (Network layer). A successful ping confirms Layer 1, 2, and 3 connectivity between two devices.

Test your OSI knowledge with our free OSI Model Quiz — 20 questions. Also read: TCP Complete Guide | IP Address Guide | Subnet Calculator

GU
Written by

Gurpreet Singh

Hey! I"m Gurpreet Singh and I Have 7+ Years of experience in the Network & Security Domain as well as the Cloud Infra Domain. I am Certified with Cisco ( CCNA ), CheckPoint ( CCSA ), 1xAWS, 3xAZURE, and 3xNSE. So I love to share my tech knowledge with you.

Leave a Reply

Your email address will not be published. Required fields are marked *