01 - Layering

ucla | CS 118 | 2024-10-01 14:36


Table of Contents

TCP vs OSI Model

Layering

  • Data packet is wrapped at each layer with a new header for that layer
  • Each hop consumes/allocates a new header until all headers are consumed and data arrives at dest:
  • Each layer must only look into its header, else a layer violation occurs, but this may not always be bad
    • e.g., a firewall looks into the TCP layer despite residing on IP layer to ensure the TCP port is permissible. This is a layer violation, but is ok.
  • In some cases this requires new specs, e.g. congestion at a router requires it to inform the src that there is congestion and must reduce its rate but it can only modify IP, so we add an Explicit Congestion Notification (ECN) added to the IP & TCP
    • This requires sending forward to dest then dest sending back to src, bc packet switching is asymmetric and may not result in the same path backward from the congested router to the src