Layer 6 — Presentation
Syntax and encryption: encoding, compression, TLS as it is often taught at this layer.
Level: beginner
What is it?
Layer 6 is the translation layer in the OSI picture: character encodings, serialization, compression, and encryption so layer 7 can speak a canonical form. On the internet this work is folded into the application (TLS, JSON, gzip, protobuf).
Why does it matter?
Interviewers still place TLS here. Real RFCs place TLS above TCP. Knowing both sentences is the adult answer.
Mental model
Agreeing on a language and whether the envelope is opaque (encrypted) before the post office sees it.
How it works
- Purpose: make data understandable and, often, confidential/integrity-protected.
- PDU: still 'data'. No extra addressing.
- Examples: UTF-8, JPEG, TLS records, ASN.1, gzip.
- Devices: hosts. Middleboxes that terminate TLS pretend to be the presentation layer.
Real-world usage
- Codecs
- TLS libraries
- Serialization formats
Common mistakes
- Saying 'TLS is layer 6' as if the kernel had an L6 module
Interview questions
Where does TLS sit?
Teaching OSI: presentation. TCP/IP: application, over TCP. QUIC: crypto is in the transport.
Name two presentation-layer jobs.
Encoding (UTF-8 vs UTF-16) and encryption (TLS). Compression is the third textbook one.