OSI Model and Data Transmission Over the Internet

OSI Model and Data Transmission

Introduction

  • Explanation of how data is sent over the internet, relating to the OSI model and TCP/IP.

OSI Model

  • The OSI (Open Systems Interconnect) model is a theoretical framework for networking.
  • It divides network communication into seven abstraction layers.

Layers of the OSI Model

  1. Physical Layer: Transmits raw bits of data across a physical connection.
  2. Data Link Layer: Organizes raw bits into frames and ensures delivery to the correct destination. Ethernet operates primarily at this layer.
  3. Network Layer: Routes data frames across different networks. IP from TCP/IP is a key example.
  4. Transport Layer: Handles end-to-end communication between two nodes. TCP and UDP reside here.
  5. Session Layer
  6. Presentation Layer
  7. Application Layer

TCP

  • Provides reliable, end-to-end communication.
  • Divides data into segments and sends each individually.
  • Each segment has a sequence number for reassembly in the correct order.
  • Provides error checking to ensure data integrity.

UDP

  • A transport layer protocol, simpler and faster than TCP.
  • Does not provide the same level of error-checking and reliability as TCP.
  • Sends packets of data; the receiving end checks for errors and discards faulty packets.

Higher Layers

  • The session, presentation, and application layers are often collapsed into a single layer in practice.
  • Application protocols like HTTP are considered layer 7 protocols.

Data Transmission Example

  • Scenario: User sends an HTTP request to a web server.
    • Application Layer: HTTP header is added.
    • Transport Layer: Data is encapsulated into TCP segments with a TCP header (source port, destination port, sequence number).
    • Network Layer: IP header is added (source and destination IP addresses).
    • Data Link Layer: MAC header is added (source and destination MAC addresses).
    • Physical Layer: Encapsulated frames are sent as raw bits.
  • The web server reverses this process upon receiving the data, removing headers layer by layer to process the HTTP request.

Real-World Nuances

  • MAC addresses are not always those of the sending and receiving ends; they often belong to routing devices in the next hop.

Conclusion

  • The OSI model is primarily an educational tool.
  • Networking vendors and cloud providers use it as a shorthand to describe where their products sit.
  • Example: Cloud load balancers are categorized as L4 (TCP level) or L7 (application protocol layer like HTTP/HTTPS).

Load Balancers

  • L4 Load Balancers: Operate at the TCP level.
  • L7 Load Balancers: Operate at the application protocol layer (e.g., HTTP or HTTPS).