Octet

Walk me through the OSI model, layer by layer.

Show the answer

Say this first

Seven layers, bottom to top. 1 Physical moves bits as signals over copper, fiber or radio. 2 Data link frames those bits and delivers them on one segment using MAC addresses (Ethernet, Wi-Fi). 3 Network gives logical addresses and routes packets between networks (IP). 4 Transport carries data between processes using ports, with or without reliability (TCP, UDP). 5 Session, 6 Presentation and 7 Application cover dialog control, data formats and encryption, and the protocols users touch (HTTP, DNS, SMTP).

Go deeper

Layer by layer

LayerNameJobPDUExamplesDevices
7ApplicationProtocols the application speaksDataHTTP, DNS, SMTP, SSHProxies, L7 load balancers
6PresentationEncoding, compression, encryptionDataTLS (often placed here), ASCII, JPEG
5SessionOpening, managing and closing dialogsDataRPC, NetBIOS sessions
4TransportProcess to process delivery, ports, reliability, flow controlSegment (TCP), datagram (UDP)TCP, UDPStateful firewalls, L4 load balancers
3NetworkLogical addressing, routing between networksPacketIPv4, IPv6, ICMPRouters, L3 switches
2Data linkFraming, MAC addressing, error detection on one linkFrameEthernet, 802.11, PPPSwitches, bridges, APs
1PhysicalBits as electrical, light or radio signalsBits1000BASE-T, 10GBASE-LRHubs, repeaters, cables, transceivers

How I say it in the room

I describe each layer by what problem it solves, not by memorized names. Layer 2 answers "how do I get this frame to the next box on this wire". Layer 3 answers "how do I get this packet to the right network anywhere". Layer 4 answers "which program gets it, and does it arrive complete and in order".

A common mnemonic from the bottom is "Please Do Not Throw Sausage Pizza Away". Use it to recall the order, then talk about function.

Traps

  • Reciting the names without saying what each layer does. Interviewers want function and examples.
  • Putting switches at layer 3 by default. A plain switch is layer 2. A layer 3 switch also routes.
How did you do?Book 1.3 Architecture