Card 08/ 09

ExerciseDifficulty: Intermediate1 min

Practice: Placing Ten Protocols and Devices on the Stack

HTTP, DNS, TCP, UDP, IP, Ethernet, a switch, a router, a hub and a load balancer, each to its layer.

Placing protocols and devices on the OSI model is the first step whenever a network fault has to be located, and it is a skill that comes from practice. For each item, give its OSI layer number and say in a few words why: for a protocol, which job it does; for a device, which header it reads to decide where data goes.

  1. HTTP
  2. DNS
  3. TCP
  4. UDP
  5. IP
  6. Ethernet
  7. A switch
  8. A router
  9. A hub
  10. An application load balancer that routes /api to one group of servers and everything else to another
Show the layers and the reasons
Each protocol or device, its OSI layer, and the reason
ItemLayerReason
HTTP7Carries requests and responses between programs.
DNS7A program asks it a question and gets an answer; it is an application that other applications use.
TCP4Delivers a reliable stream to a port.
UDP4Delivers single datagrams to a port, with no delivery guarantee.
IP3Addresses packets and carries them across networks.
Ethernet2Frames with MAC addresses on one link; its cables and signals are layer 1.
Switch2Reads the destination MAC address.
Router3Reads the destination IP address.
Hub1Repeats every bit to every port without reading anything.
Load balancer routing by path7Reads the HTTP path, so it must unwrap every layer below.

The two that catch people are DNS and the load balancer. DNS feels like infrastructure, but it is a program answering questions, and its messages ride on UDP or TCP like any other application's. The load balancer's layer comes from what it reads: one that chose a server by port alone would be layer 4.