Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
The OSI model describes network communication as seven layers. Real networks do not implement it, but it remains the vocabulary defenders use to place attacks and controls.

What Is the OSI Model?
The Open Systems Interconnection model, standardised as ISO/IEC 7498-1, divides network communication into seven layers, each providing a service to the one above it. It was developed as a blueprint for an actual protocol suite that lost to TCP/IP, so nothing you run implements it. What survives is the vocabulary: when an engineer says a problem is at layer two, or a product is described as a layer seven firewall, this is the reference being used, and it remains the most convenient way to place attacks and controls against each other.
| Layer | Function | Typical attacks | Controls |
|---|---|---|---|
| 7 Application | Protocols users interact with: HTTP, SMTP, DNS | Injection, broken access control, phishing | WAF, secure coding, email authentication |
| 6 Presentation | Encoding, encryption, compression | TLS downgrade, padding oracles, deserialisation | Modern cipher policy, safe parsers |
| 5 Session | Establishing and managing dialogues | Session hijacking, fixation | Secure cookies, session timeouts, rebinding |
| 4 Transport | TCP and UDP, ports, reliability | SYN floods, port scanning, reflection | SYN cookies, rate limiting, stateful filtering |
| 3 Network | IP addressing and routing | IP spoofing, BGP hijacking, ICMP abuse | IPsec, ingress filtering, RPKI |
| 2 Data link | Frames, MAC addresses, switching | ARP spoofing, VLAN hopping, rogue DHCP | 802.1X, DHCP snooping, dynamic ARP inspection |
| 1 Physical | Cables, radio, signalling | Tapping, jamming, cable access | Physical security, fibre monitoring |
Three reasons, all practical.
It separates concerns. TLS protects data at layers five and six and above; it does nothing about a forged frame at layer two. An engineer who understands this does not propose HTTPS as a remedy for ARP spoofing, which is a conversation that happens more often than it should.
It structures defence in depth. An attack that passes one layer may be caught at another. A volumetric flood is handled at layers three and four by upstream scrubbing; an application-layer flood that mimics real users needs layer seven rate limiting. Buying one and assuming it covers the other is a recurring and expensive mistake.
It speeds diagnosis. Working from the bottom up — link established, address assigned, route present, port reachable, handshake completing, application responding — isolates a fault far faster than guessing. The same discipline applies to a security incident: establishing which layer the anomaly sits at narrows the candidate causes immediately.
There is a fourth use that gets less attention: the model is a decent audit checklist. Walk a network design layer by layer and ask what authenticates, what encrypts, and what logs at each one. Most organisations find a confident answer at layers three, four, and seven, and silence at layers one and two — no port authentication, no switch hardening, no record of which device plugged into which socket. That silence is where an attacker with building access begins.
Be clear about this, because treating the model as literal truth causes its own confusion.
Layers five and six barely exist in practice. TLS is habitually called a layer six protocol, but it runs over TCP and carries session semantics, so it spans four, five, and six depending on how you squint. QUIC is worse for the model: it is a transport protocol that includes its own cryptographic handshake and runs over UDP, deliberately crossing three layers at once.
The real internet uses the four-layer TCP/IP model, which maps onto OSI only loosely. And modern security tooling ignores layers entirely: an identity-aware proxy makes decisions using user identity, device posture, and request content simultaneously.
Treat the model as a map rather than the territory. It is useful for placing a control and for making sure nothing has been left uncovered, and it stops being useful the moment someone argues about whether a product is layer four or layer seven instead of about what it actually inspects.
When we scope an engagement we describe coverage in these terms for exactly that reason — it makes gaps visible. Our Penetration Test Services cover the stack from the switch port upwards.
Because it is the shared vocabulary. Firewall capabilities, load balancer modes, attack categories, and product datasheets are all described in OSI layer terms even though no implementation follows the model. It also gives a systematic order for troubleshooting and a checklist for making sure controls exist at every level rather than clustering at the application.
There is no clean answer, which is itself instructive. TLS is commonly placed at layer six because it handles encryption, but it runs on top of TCP, manages sessions, and in the case of QUIC incorporates the transport itself. The practical question is not which layer it occupies but what it protects: data in transit between two endpoints, not frames on the local network.
An attack against the application protocol rather than the network beneath it. HTTP floods that issue expensive, legitimate-looking requests, SQL injection, and API abuse are all layer seven. They matter because network-level defences see valid traffic and let it through, so they require application-aware controls such as a web application firewall and request rate limiting.
The layering concept does, though you no longer control the lower layers. A cloud provider owns the physical and data link layers, you configure the network layer through virtual networks and security groups, and you own everything above. The model is still useful for deciding which controls are yours under the shared responsibility model.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.