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".

#LayerData unitResponsibilitiesExamples
7ApplicationDataNetwork services to usersHTTP, FTP, SMTP, DNS
6PresentationDataTranslation, encryption, compressionSSL/TLS, JPEG
5SessionDataDialog control, synchronization (checkpoints)RPC, NetBIOS
4TransportSegmentEnd-to-end delivery, port addressing, flow and error controlTCP, UDP
3NetworkPacketLogical addressing, routingIP, ICMP, OSPF
2Data linkFrameFraming, MAC addressing, error detection, access controlEthernet, PPP
1PhysicalBitsTransmission of raw bits, voltages, cablesRJ45, fibre
SenderReceiver7 Application7 Application6 Presentation6 Presentation5 Session5 Session4 Transport4 Transport3 Network3 Network2 Data Link2 Data Link1 Physical1 Physicalpeer-to-peertransmission medium (cable, fibre, radio)
Data moves down the sender's stack, across the medium, and up the receiver's stack

Encapsulation

Text
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