The OSI Model is one of the most important networking concepts on the CompTIA A+ exam. It breaks networking into 7 layers so we can understand how data moves from one device to another — and how to diagnose what went wrong when it doesn't.


The 7 Layers at a Glance

🧠 Memory Trick (top → bottom)
All People Seem To Need Data Processing
Application · Presentation · Session · Transport · Network · Data Link · Physical
7
Application
User-facing protocols — HTTP, FTP, SMTP, DNS
User Interface
6
Presentation
Encryption, formatting, compression
SSL / TLS
5
Session
Opens, manages, and closes connections
Sessions
4
Transport
TCP and UDP live here — reliability and port numbers
TCP · UDP
3
Network
IP addresses and routing between networks
Routers
2
Data Link
MAC addresses and switching within a network
Switches
1
Physical
Cables, signals, voltage, connectors — Ethernet, fiber, Wi-Fi
Cables · NICs

How It Appears on the A+ Exam

Concept OSI Layer Why
Port numbers Layer 4 — Transport TCP/UDP operate here
IP addresses Layer 3 — Network Routing between networks
MAC addresses Layer 2 — Data Link Switching within a network
Cables / signals Layer 1 — Physical Hardware-level transmission

Real Troubleshooting Examples

🔴 No link light on NIC or switch port
Layer 1 — Physical
🟡 169.254.x.x APIPA address assigned
Layer 3 — Network
🔵 Ping works but website won't load
Layer 7 — Application
⚡ CompTIA A+ Exam Tip

The exam loves asking you to identify which layer a problem or component belongs to. Memorize: cables = Layer 1, MAC = Layer 2, IP = Layer 3, TCP/UDP = Layer 4, and HTTP/DNS = Layer 7.

When in doubt, work bottom-up — start at Layer 1 (is it plugged in?) and work your way up.


OSI Model — Network+ Deep Dive: Protocols at Each Layer

The Network+ exam maps specific protocols, devices, and technologies to OSI layers. You need to know not just what each layer does, but which protocols live there and what devices operate at each layer.

LayerNameProtocolsDevicesPDU
7ApplicationHTTP, HTTPS, FTP, SMTP, DNS, DHCP, SNMP, SSH, Telnet, LDAPProxy, Load balancer, NGFWData
6PresentationTLS/SSL, JPEG, MPEG, ASCII, encryption formatsData
5SessionNetBIOS, RPC, SQL sessions, NFSData
4TransportTCP, UDP, TLS (session establishment)Firewall (ports)Segment
3NetworkIP (IPv4/IPv6), ICMP, OSPF, BGP, RIP, EIGRP, IPsecRouter, Layer 3 switchPacket
2Data LinkEthernet, Wi-Fi (802.11), ARP, PPP, STP, VLANs (802.1Q)Switch, Bridge, WAPFrame
1PhysicalEthernet (physical), USB, Bluetooth (physical), DSLHub, Repeater, Cable, NICBit
⚡ Network+ exam tip — Layer 2 vs Layer 3 switches: A standard switch operates at Layer 2 using MAC addresses. A Layer 3 (multilayer) switch can also route between VLANs using IP addresses — it's a switch with routing capability. Exam questions often ask which device operates at which layer.

Encapsulation — How Data Travels Down the Stack

When data is sent, each layer adds its own header (and sometimes trailer). This is called encapsulation. On the receiving end, each layer strips its header — called de-encapsulation.

Layer 7–5 Application Data ← HTTP request, email, file
Layer 4 [TCP/UDP Header] + Data ← adds port numbers → Segment
Layer 3 [IP Header] + Segment ← adds IP addresses → Packet
Layer 2 [Ethernet Header] + Packet + [FCS Trailer] ← adds MAC → Frame
Layer 1 101001011... ← Frame converted to bits on wire

OSI Model — Security+ Attack Mapping

Security+ maps attacks to the OSI layer where they occur. Understanding which layer an attack targets tells you which layer the defence needs to operate at.

LayerAttackHow It Targets This LayerDefence Layer
7 — ApplicationSQL injection, XSS, CSRFExploits application logic and input handlingWAF, input validation, secure coding
7 — ApplicationPhishing, social engineeringTargets the human user of the applicationUser training, email filtering
6 — PresentationSSL stripping, downgrade attacksForces plaintext by removing TLS encryptionHSTS, TLS pinning, strong cipher policy
5 — SessionSession hijacking, replay attackSteals or replays valid session tokensEncrypted sessions, short token lifetimes
4 — TransportSYN flood, port scanningExploits TCP handshake or probes open portsSYN cookies, firewall port filtering
3 — NetworkIP spoofing, route poisoning, DDoSForges source IPs or manipulates routing tablesBCP38, OSPF authentication, rate limiting
2 — Data LinkARP spoofing, MAC flooding, VLAN hoppingPoisons ARP cache or floods switch CAM tableDAI, port security, private VLANs
1 — PhysicalWiretapping, jamming, hardware keyloggerIntercepts or disrupts physical mediumPhysical security, fibre (harder to tap), TEMPEST shielding
⚡ Security+ exam tip: When a scenario describes an attack, identify the layer first — then match the defence. A WAF operates at Layer 7. A firewall filtering ports operates at Layer 4. A switch with port security operates at Layer 2. The exam tests whether you can match controls to the correct layer.

Network+ and Security+ Exam Scenarios

A technician adds a source IP address and destination IP address to a packet. At which OSI layer is this occurring?
Layer 3 — Network. IP addresses are added at the Network layer during encapsulation. MAC addresses are added at Layer 2. Port numbers are added at Layer 4.
An attacker is sending forged ARP replies to redirect traffic through their machine. Which OSI layer is being attacked?
Layer 2 — Data Link. ARP operates at Layer 2, mapping IP addresses to MAC addresses. ARP spoofing poisons the ARP cache so traffic is forwarded to the attacker's MAC. Dynamic ARP Inspection (DAI) on a managed switch defends against this.
You plug a new device into a network switch. The switch learns the device's address and starts forwarding traffic. What address did the switch learn, and at which layer?
MAC address, Layer 2. Switches build a CAM (Content Addressable Memory) table mapping MAC addresses to switch ports. This is a Layer 2 function. Routers make forwarding decisions at Layer 3 using IP addresses.

Related Networking Articles

Preparing for the A+ Exam?

See the books, practice exams, and free resources that actually work.

See Best Study Resources →