OSI Model and Protocols

OSI Model and Protocols

·

4 min read

In today’s world, devices like mobile phones, computers, tablets, smart home gadgets, and wearables are constantly talking to each other. But have you ever wondered how they actually manage to understand each other?

It’s not enough to just know a device’s location using an address like an IP or MAC address. These addresses only tell us where a device is on a network.

Understanding Protocol

Imagine you are a Tamil speaker, and you want to talk to someone who speaks Hindi. You know who they are (you have their details), and you even know where they are (you have their location). But if you speak in Tamil, they might not understand you at all.

For the conversation to work, both of you need a common way to communicate—maybe by using a shared language or a translator.

Similarly, every device—like phones, computers, or tablets—is unique and "speaks its own language." Just knowing a device’s address (like an IP or MAC address) isn't enough to ensure smooth communication. Devices need a common set of rules, or protocols, to share and understand information correctly.

OSI Model

Let’s understand it with a scenario.

Yes, when you click a YouTube video, the OSI model (or its practical equivalent, the TCP/IP model) is followed in the background to enable communication between your device and YouTube's servers. Each layer of the OSI model plays a role in ensuring that the video reaches you smoothly.


1. Application Layer (Layer 7)

  • What Happens: You open YouTube in your browser and click a video. The browser (an application) sends a request to the YouTube server to stream the video using HTTP or HTTPS protocols.

  • Protocols Involved: HTTP, HTTPS.


2. Presentation Layer (Layer 6)

  • What Happens: The data from YouTube (e.g., video and audio) is encoded in formats like MP4 or VP9. The presentation layer ensures this data is properly formatted and compressed for your browser to display.

  • Tasks: Data encryption, compression, and format translation.

  • Examples: MP4,MP3,DOC,JPEG SSL/TLS for secure connections.


3. Session Layer (Layer 5)

  • What Happens: This layer establishes, manages, and terminates the session between your browser and the YouTube server.

  • Tasks: Ensures your connection remains open as long as the video is playing, allowing for continuous streaming.


4. Transport Layer (Layer 4)

  • What Happens: Data is divided into smaller chunks called data packers for transmission. The transport layer ensures these segments are delivered reliably.Here,

    • TCP is used for the initial request and communication (e.g., loading the webpage).

    • UDP is used for streaming the video because it's faster and tolerates minor data losses.

  • TCP: Used when quality of data is crucial but with higher delays (web browsing)

  • UDP: Prioritizes speed and less delays, used when continuous data flow is important and a bit of data loss is acceptable. ( video streaming , chat Systems)

  • Protocols Involved: TCP, UDP


5. Network Layer (Layer 3)

  • What Happens: This layer determines the best route to send data packets from YouTube's server to your device using IP addresses.

  • Tasks: Logical addressing (IP addresses), routing, and forwarding.

  • Protocol: IP (Internet Protocol).


  • What Happens: Now once your home network has received the data , it has to send to the correct device in your local network i.e from the device where the request was sent. (eg phone , laptop ,tablet) etc .Data is packaged into frames and sent over your local network (e.g., Wi-Fi or Ethernet). The frames contain the MAC addresses of your device and the router.

  • Tasks: Handles error detection and flow control for local data transmission.


7. Physical Layer (Layer 1)

  • What Happens: Raw binary data (0s and 1s) of the video is transmitted through physical media such as cables, fiber optics, or radio waves (for Wi-Fi).

  • Examples: Your Wi-Fi router transmits these signals to and from your device.

Now once you have received the data in format of 0’s and 1’s to convert it back to video format and display it on your screen , the OSI MODEL is again followed from the sender’s side ,but in this case it goes from layer 1 —> layer 7.

  • Physical Layer: "The signals are received and converted back into binary data."

  • Data Link Layer: "The data is checked for errors and passed up."

  • Network Layer: "The destination address is checked, and the data is routed to the correct application."

  • Transport Layer: "The data packets are reassembled."

  • Session Layer: "The communication session is maintained."

  • Presentation Layer: "The video data is decoded and prepared for playback."

  • Application Layer: "The video is displayed in your browser or media player, and you start watching it."

    NOTE: Data moves down from Layer 7 to Layer 1 on the sender's side, and up from Layer 1 to Layer 7 on the receiver's side.

This ensures that the data is processed and displayed correctly on your screen.

Thankyou!!