The Seven OSI Layers
The OSI model divides network communication into seven distinct layers, each responsible for a specific function. From bottom to top: Physical (Layer 1), Data Link (Layer 2), Network (Layer 3), Transport (Layer 4), Session (Layer 5), Presentation (Layer 6), and Application (Layer 7). The mnemonic 'Please Do Not Throw Sausage Pizza Away' reads bottom-to-top; reversed: 'All People Seem To Need Data Processing.'
Layer 1 (Physical) deals with raw bits — electrical signals, light pulses, or radio waves. It defines cables, connectors, voltage levels, and signal timing. Hubs operate at Layer 1 by blindly repeating signals. Layer 2 (Data Link) handles frames and physical addressing (MAC addresses). Switches and bridges work at Layer 2, making forwarding decisions based on MAC tables. The LLC and MAC sub-layers exist here.
Layer 3 (Network) is responsible for logical addressing (IP addresses) and routing between networks. Routers operate at Layer 3. Layer 4 (Transport) manages end-to-end communication, segmentation, flow control, and error recovery. TCP (reliable) and UDP (connectionless) are the key Layer 4 protocols.
Layers 5–7 are often collapsed in practice. Layer 5 (Session) establishes, maintains, and terminates sessions between applications. Layer 6 (Presentation) handles data translation, encryption/decryption, and compression — SSL/TLS operates conceptually here. Layer 7 (Application) provides network services directly to applications — HTTP, DNS, SMTP, FTP are all Layer 7 protocols.
Protocol Data Units (PDUs)
Each OSI layer uses a specific term for its data unit. Knowing PDU names helps answer troubleshooting questions. Layer 1: Bits. Layer 2: Frames. Layer 3: Packets. Layer 4: Segments (TCP) or Datagrams (UDP). Layers 5–7: Data. When a host sends data, it encapsulates at each layer going down; the receiving host decapsulates going up.
Network+ exam questions often ask: 'A technician captures traffic and sees malformed frames — at which OSI layer is the problem?' Answer: Layer 2. If IP addresses are incorrect: Layer 3. If a port is unreachable: Layer 4. If a web page won't load but ping works: Layer 7.
Devices and Their OSI Layers
Matching devices to layers is a frequent exam question. Hub: Layer 1 (repeats electrical signals). Switch: Layer 2 (forwards by MAC address). Router: Layer 3 (routes by IP address). Multilayer switch: Layers 2 and 3. Firewall: typically Layer 3–4 (packet filtering) or Layer 7 (application-aware). Wireless access point: Layer 2. Proxy server: Layer 7. Network adapter (NIC): Layers 1–2.
A question stating 'which device operates at the same layer as a switch?' — the answer is a bridge (both Layer 2). A hub and a repeater both operate at Layer 1.