Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Networking for Defenders  ›  Lesson

The OSI Model: Seven Layers to Guard

Understand the OSI Model 15 minThe OSI model splits network communication into seven layers, which lets defenders say exactly where a problem or attack sits and place a defence at each layer.

The OSI Model: Seven Layers to Guard

A customer in another city opens the Hollow Oak Books website and buys a novel. In a fraction of a second that order passes through cables, radio waves, routers and programs. The OSI model splits that journey into seven layers, so that when something breaks, or someone attacks, you can say exactly where.

The rule

Data goes down the layers, across the wire, and back up.

The sender's data is wrapped layer by layer on the way down; the receiver unwraps it on the way up. From the bottom:

# Layer What it deals with A security example
1 Physical Cables, radio, electrical signals Someone plugs into a spare socket
2 Data link Devices on the same local network, MAC addresses A device pretends to be another on the LAN
3 Network IP addresses and routing between networks Traffic sent to a fake destination
4 Transport TCP and UDP, port numbers A service left listening on an open port
5 Session Keeping a conversation going A stolen login session reused
6 Presentation Formats and encryption Data sent without encryption
7 Application The programs people use: web, email A flaw in the website's login form

A made-up memory line, bottom to top: Please Don't Neglect The Shop's Password Audit.

Real networks mostly use the simpler TCP/IP model, which folds some of these together, but the OSI names are what professionals use when they talk about "a layer 3 problem" or "a layer 7 attack".

The shortcut

For any problem or threat, ask "What is it touching: a wire, an address, a port, or a program?" That points straight at layer 1, layer 3, layer 4 or layer 7, and the other layers fill in around them.

Placing the shop's defences on the layersStep 1 of 4
  1. Wire (layer 1)

    Lock the back office and the network cabinet so nobody can plug in.

No single layer's defence covers the others. A great firewall does not help if the website itself has a flaw.

Drills

Answer fast — trust the rule.

quick drill

Which OSI layer deals with IP addresses and routing?

quick drill

A stranger plugs a laptop into an unused network socket in the shop. Which layer is being abused first?

quick drill

Port numbers belong to which layer?

quick drill

The shop has a strong firewall. Why can a flaw in the website's login form still be dangerous?

Remember

  • Data goes down the layers, across the wire, and back up.
  • Ask: wire, address, port or program? That names layer 1, 3, 4 or 7.
  • Trap: trusting one layer's defence to protect all seven.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainOne defence per layer

Explain to Priya why the shop needs defences at several OSI layers rather than just a firewall. Use at least three layers and give one concrete defence for each.