OSI & TCP/IP Models

Layered models split networking into responsibilities so each layer serves the one above it.

Cheat sheet

  • ▸OSI (7): Physical, Data Link, Network, Transport, Session, Presentation, Application.
  • ▸Mnemonic: Please Do Not Throw Sausage Pizza Away.
  • ▸TCP/IP (4): Link, Internet, Transport, Application.
  • ▸PDU: Bits → Frames → Packets → Segments → Data.
  • ▸Devices: Hub/Repeater (L1), Switch/Bridge (L2), Router (L3).
  • ▸Encapsulation adds headers going down; decapsulation removes them going up.

Layer mapping

OSI layerProtocolsDevicePDU
7 ApplicationHTTP, DNS, SMTP, FTP—Data
4 TransportTCP, UDP—Segment
3 NetworkIP, ICMP, ARP*RouterPacket
2 Data LinkEthernet, Wi-Fi MACSwitchFrame
1 PhysicalCables, signalsHubBits

Top 10 campus interview questions

Quick quiz

1. Router works at layer:

2. PDU at transport layer:

3. How many layers in TCP/IP model?

4. MAC addresses are used at:

5. ARP maps: