The OSI (Open Systems Interconnection) model splits network communication into seven layers. It is the first thing asked in networking and security interviews.
The 7 layers
| # | Layer | Job | Examples | Data unit |
|---|---|---|---|---|
| 7 | Application | Network services for applications | HTTP, DNS, SMTP, FTP | Data |
| 6 | Presentation | Format, encrypt, compress | TLS, JPEG, ASCII | Data |
| 5 | Session | Open, manage and close sessions | NetBIOS, RPC | Data |
| 4 | Transport | End-to-end delivery, ports | TCP, UDP | Segment |
| 3 | Network | Logical addressing and routing | IP, ICMP, routers | Packet |
| 2 | Data link | Node-to-node delivery, MAC addresses | Ethernet, ARP, switches | Frame |
| 1 | Physical | Bits on the wire or radio | Cables, hubs, Wi-Fi radio | Bits |
Memory trick (top to bottom): All People Seem To Need Data Processing.
OSI vs TCP/IP
The TCP/IP model used on the Internet has four layers: Application (OSI 5–7), Transport (4), Internet (3) and Link (1–2).
Attacks at each layer
- Layer 7: SQL injection, XSS, HTTP floods.
- Layer 6: SSL stripping, weak TLS configuration.
- Layer 5: session hijacking.
- Layer 4: SYN floods, port scanning.
- Layer 3: IP spoofing, ICMP floods.
- Layer 2: ARP spoofing, MAC flooding, VLAN hopping.
- Layer 1: wiretapping, jamming, physical damage.
Learn more
The Networking Fundamentals for Security course covers all of this in depth, with free practice questions.
Frequently asked questions
What are the 7 layers of the OSI model?
Physical, Data link, Network, Transport, Session, Presentation and Application.
At which OSI layer does a router work?
Layer 3, the Network layer, because it forwards packets using IP addresses.
At which layer does ARP spoofing happen?
Layer 2, the Data link layer, inside the local network.
Learn this topic properly
Scope In Science has theory notes and chapter-wise question banks with answers for Physics, Chemistry, Maths, Biology and Cybersecurity, in 18+ languages. Start with the free lessons and practice questions.