🔹 Layer 7 – Application
Function: Interface for user applications to access the network
Analogy: You writing or reading a letter
Examples: HTTP, HTTPS, DNS, FTP, SMTP, Telnet, SSH
🔹 Layer 6 – Presentation
Function: Data translation, encryption, compression
Analogy: Translating the letter into another language
Examples: SSL/TLS, JPEG, PNG, MP3, ASCII
🔹 Layer 5 – Session
Function: Controls sessions (start, maintain, end communication)
Analogy: The ongoing phone call between two people
Examples: NetBIOS, RPC, session tokens, login state
🔹 Layer 4 – Transport
Function: Ensures complete and reliable data transfer
Analogy: Mail service that guarantees delivery and order
Examples: TCP (reliable), UDP (faster, no checks)
🔹 Layer 3 – Network
Function: Routing, addressing, and forwarding
Analogy: The post office deciding the best route to deliver your mail
Examples: IP, ICMP, IPsec, routers
🔹 Layer 2 – Data Link
Function: Error detection, MAC addressing, frame delivery in LAN
Analogy: Putting a mailing address and return label on the envelope
Examples: Ethernet, Wi-Fi (802.11), ARP, switches
🔹 Layer 1 – Physical
Function: Transmits raw bits over a physical medium
Analogy: Roads, trucks, and traffic signals for delivering letters
Examples: Cables, NICs, hubs, radio waves, fiber optics