How Data is Sent Over the Internet and OSI Model

Jul 21, 2024

How Data is Sent Over the Internet and the OSI Model

Introduction

  • OSI model (Open Systems Interconnect model) is a theoretical framework for networking.
  • It splits network communication into 7 abstraction layers.
  • Related to how data is transmitted across the internet.

OSI Model Layers

1. Physical Layer

  • Bottom-most layer.
  • Responsible for transmitting raw bits of data across a physical connection.

2. Data Link Layer

  • Organizes raw bits from the physical layer into frames.
  • Ensures frames are delivered to the correct destination.
  • Ethernet operates in this layer.

3. Network Layer

  • Responsible for routing data frames across different networks.
  • IP (Internet Protocol) operates in this layer.

4. Transport Layer

  • Manages end-to-end communication between nodes.
  • TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) operate in this layer.
    • TCP:
      • Provides reliable, end-to-end communication.
      • Divides data into manageable segments with sequence numbers.
      • Uses error checking to ensure data integrity.
    • UDP:
      • Simpler and faster than TCP.
      • Less reliable as it lacks error-checking and reassembly.

5. Session Layer, 6. Presentation Layer, 7. Application Layer

  • Less useful in practice and often considered as a single application layer.
  • Application protocols like HTTP are considered layer 7 protocols.

Data Transmission Example

  • Sending an HTTP request to a web server.
    • Application Layer: HTTP header added to data.
    • Transport Layer: TCP header added, encapsulated into TCP segments.
      • Headers contain source port, destination port, and sequence number.
    • Network Layer: IP header added, encapsulated into IP packets.
      • Headers contain source and destination IP addresses.
    • Data Link Layer: MAC header added, encapsulated into frames.
      • Headers contain source and destination MAC addresses of routing devices (next hop).
    • Physical Layer: Frames are transmitted as raw bits.
  • Receiving process reverses these steps, stripping headers layer by layer.

Real-World Use and Educational Purpose

  • OSI model is primarily educational.
  • Layers don't perfectly match real-world networking but are used as shorthand by vendors and providers.
    • Example: Cloud load balancers categorized as L4 (TCP level) or L7 (application protocol level like HTTP).

Conclusion

  • OSI model provides a way to conceptualize networking.
  • Important for understanding how data is transmitted and received.
  • Networking products are often described using OSI model terminology.
  • Further learning resources available through books and newsletters.