DEV Community

KILLjoy
KILLjoy

Posted on

OSI Model

WHAT IS OSI MODEL - OSI model is just a 7 layers framework that standardizes a network communication. i meant to establish a common format or set of rules that ensures consistency and compatibility. so OSI model set a standard for network communication so ensuring the data travels sender to receiver efficiently or we can say he OSI model has 7 layers that help computers talk to each other in a structured way.

What if we do not follow network standards-
The communication between devices and network would be chaotic like-
Different companies will create their own networking protocols so it makes impossible to communicate other companies manufactured devices. Ex-A Dell laptop might not be able to connect to an HP printer or a Cisco router.

Without standardization, different regions or companies might use separate protocols, making global internet communication difficult or impossible.Ex-Websites hosted in one country might not be accessible in another due to differing network structures.

1️⃣ Physical Layer (Wires & Signals) – "How to send data?"
Transmits raw bits (0s & 1s) through cables, fiber, or radio signals.(because computer networks data travels two main transmission mediums- (1).Data travels through a physical medium (cables). (2).Data travels through the air using electromagnetic waves.).

Devices: Hubs, Repeaters, Cables (Ethernet, Fiber).
Protocols: Ethernet (Physical part), Bluetooth, Wi-Fi (Radio signals).

Functions:

  • Bit Transmission – Converts data into electrical, optical, or radio signals.
  • Modulation & Encoding – Converts digital signals for transmission.
  • Transmission Medium – Uses copper, fiber optics, or wireless.
  • Synchronization – Ensures sender and receiver are in sync.

2️⃣ Data Link Layer (Direct Connection) – "Who am I connected to?"

  • Ensures error-free data transfer between two directly connected devices using MAC addresses.

** Devices:** Switches, Bridges, Network Interface Cards (NICs).
Protocols: MAC, ARP, PPP, Ethernet (Frame handling).

Functions:

  • MAC Addressing – Identifies devices in a local network.
  • Error Detection & Correction – Uses CRC (Cyclic Redundancy Check).
  • Frame Synchronization – Divides data into frames. Flow Control – Prevents overwhelming slower devices.

3️⃣ Network Layer (Routing & IP Address) – "Where is it going?"
Finds the best path for data using IP addresses and handles packet forwarding.

Devices: Routers, Layer 3 Switches.
Protocols: IP (IPv4/IPv6), ICMP (Ping), OSPF, RIP.

Functions:
Logical Addressing (IP) – Assigns unique IPs to devices.
Routing – Finds the best path for data.
Fragmentation & Reassembly – Splits large packets for transmission.
Error Handling – Uses ICMP for troubleshooting (Ping).

4️⃣ Transport Layer (Delivery Control) – "How to send it?"
Ensures data is fully delivered using TCP (reliable) or UDP (fast).

Devices: Firewalls (manage traffic flow).
Protocols: TCP (WhatsApp messages), UDP (Live streaming, gaming).

Functions:
Segmentation & Reassembly – Splits data into segments and reassembles it.
Flow Control – Ensures the receiver isn’t overwhelmed.
Error Control – Ensures complete and correct data delivery.
Multiplexing – Handles multiple connections at once.

5️⃣ Session Layer (Connections & Communication) – "How long do we talk?"
Manages sessions (start, maintain, and end) between applications.

Devices: Application servers, Proxy servers.
Protocols: NetBIOS, RPC, PPTP (VPNs).

Functions:
Session Establishment – Starts and maintains sessions.
Synchronization – Saves session data in case of disconnection.
Session Termination – Ends communication properly.
Token Management – Prevents multiple applications from interfering.

6️⃣ Presentation Layer (Data Formatting & Encryption) – "How to present it?"
Converts, encrypts, and compresses data for the application layer.

Devices: Encryption devices (SSL/TLS terminators).
Protocols: SSL/TLS (HTTPS security), JPEG, MP3, GIF.

Functions:
Data Formatting – Converts data for different systems (ASCII, Unicode).
Compression – Reduces file sizes for faster transmission.
Encryption & Decryption – Protects data from hackers (SSL/TLS).
Character Encoding – Ensures different languages are correctly displayed.

7️⃣ Application Layer (User Interaction) – "What does the user see?"
Provides the interface for users to interact with network services.

Devices: Web servers, Email servers, DNS servers.
Protocols: HTTP/HTTPS (Web), FTP (File transfer), SMTP (Email), DNS (Domain names).

Functions:
User Interaction – Provides web browsing, email, file sharing, etc.
Data Representation – **Ensures proper formatting for applications.
**Authentication –
Verifies users before accessing services.
Error Handling – Displays proper messages for failed requests.

Top comments (0)