OSI Reference Model
The Open Systems Interconnection model (ISO) divides network communication into 7 layers. A common mnemonic, bottom to top, is "Please Do Not Throw Sausage Pizza Away".
| # | Layer | Data unit | Responsibilities | Examples |
|---|---|---|---|---|
| 7 | Application | Data | Network services to users | HTTP, FTP, SMTP, DNS |
| 6 | Presentation | Data | Translation, encryption, compression | SSL/TLS, JPEG |
| 5 | Session | Data | Dialog control, synchronization (checkpoints) | RPC, NetBIOS |
| 4 | Transport | Segment | End-to-end delivery, port addressing, flow and error control | TCP, UDP |
| 3 | Network | Packet | Logical addressing, routing | IP, ICMP, OSPF |
| 2 | Data link | Frame | Framing, MAC addressing, error detection, access control | Ethernet, PPP |
| 1 | Physical | Bits | Transmission of raw bits, voltages, cables | RJ45, fibre |
Encapsulation
Sender: Data → [TCP hdr|Data] → [IP hdr|TCP|Data] → [Eth hdr|IP|TCP|Data|FCS] → bits
Receiver: bits → frame → packet → segment → data (headers removed layer by layer)
Quick Check
Which layer is responsible for routing?
Track your progress through the Computer Networks course