StudyToCert

All certifications / Network+ / Lessons

CompTIA Network+ N10-009 · Domain 1: Networking concepts

OSI model layers and the data unit at each layer

▶ Watch the overview video

Last reviewed October 6, 2026 · Leer en español

Explain it simpler

Sending data across a network is a big job, so engineers split it into seven smaller jobs stacked on top of each other, called layers. Each layer does one thing and hands its work to the next. Think of mailing a gift: you wrap it (the content), put it in a box with a packing slip, write the street address on the label, and the truck physically carries it. Each step adds its own wrapping, and the person who receives it unwraps in reverse order. In networking, the bottom layer moves raw signals on a wire, the middle layers handle local delivery and addresses, and the top layers deal with the programs that use the network. Each layer also has its own name for its chunk of data: bits, frames, packets, segments and data.

It is 2:10 a.m. and your phone buzzes: the order-entry site at Ridgeway Outfitters is down for the warehouse night shift. Priya, the shift lead, is on the line saying 'the network is broken.' The server team says it is the network, the network team says it is the server, and nobody has looked at anything yet. You could start pulling cables, rebooting switches or restarting the web service at random. Or you could ask a sharper question: at which layer did the conversation between the warehouse PC and the server actually stop? A shared map of those layers is what turns a vague 'it is broken' into a short, ordered checklist. Which layer would you check first, and what would you expect to see there?

The Open Systems Interconnection (OSI) model is a seven-layer reference model that splits the job of moving data between two computers into separate responsibilities. Nobody implements the OSI model exactly as written (the internet actually runs on the simpler TCP/IP model), but every network professional uses OSI as a shared vocabulary. When a colleague says 'it is a Layer 2 problem' they mean the fault is in switching, MAC addresses or VLANs, not in routing or the application. CompTIA Network+ uses the model constantly, both directly (which layer does X work at?) and indirectly, because troubleshooting questions expect you to reason layer by layer.

OSITCP/IPExamples · PDU7 Application6 Presentation5 Session4 Transport3 Network2 Data link1 PhysicalApplicationTransportInternetLinkHTTP DNS SSH TLSdataTCP UDPsegment / datagramIP ICMPpacketEthernet 802.11frameCable, fiber, radiobits
OSI and TCP/IP models with example protocols

Start with the order of the layers. From the bottom up they are: 1 Physical, 2 Data Link, 3 Network, 4 Transport, 5 Session, 6 Presentation and 7 Application. A common memory aid bottom-up is 'Please Do Not Throw Sausage Pizza Away'; top-down, 'All People Seem To Need Data Processing'. Layer 1 moves raw bits as electrical, light or radio signals over cables, connectors and airwaves, so it cares about voltage, wavelength, pinouts and signal strength. Layer 2 frames those bits for delivery on the local segment using MAC (Media Access Control) addresses, and it detects corruption with a frame check sequence (FCS), a trailer holding a cyclic redundancy check (CRC) value. Layer 3 gives logical, routable addresses (IPv4 and IPv6) and chooses paths between networks. Layer 4 provides end-to-end delivery between applications using port numbers, with TCP (Transmission Control Protocol) for reliable, ordered delivery or UDP (User Datagram Protocol) for lightweight, connectionless delivery.

The upper layers are often blurred together in practice, and the TCP/IP model merges them into a single Application layer. Layer 5, Session, sets up, maintains and tears down conversations between applications, such as keeping track of which request belongs to which dialogue. Layer 6, Presentation, handles data formatting, character encoding, compression and encryption, which is why TLS (Transport Layer Security) is sometimes placed here. Layer 7, Application, is the network-facing interface that programs use: HTTP, DNS, SMTP, SSH and similar protocols. Layer 7 does not mean the application itself, such as the web browser; it means the protocol the browser speaks. Keeping that distinction clear saves you from a common distractor.

Next comes the idea that ties the layers together: encapsulation. As data travels down the stack on the sender, each layer adds its own header (and Layer 2 also adds a trailer, the FCS). The receiver strips headers in reverse order, which is de-encapsulation. The name for the chunk of data at each layer is its protocol data unit (PDU). Layers 5 to 7 simply call it data. Layer 4 produces a segment for TCP (a UDP unit is usually called a datagram). Layer 3 produces a packet. Layer 2 produces a frame. Layer 1 transmits bits. A useful detail: as a packet crosses routers, the Layer 2 frame is rebuilt on every hop with new source and destination MAC addresses, while the Layer 3 source and destination IP addresses stay the same end to end (unless NAT, Network Address Translation, changes them). That is why a capture taken on one side of a router shows different MAC addresses than a capture of the same packet taken on the other side.

Walk through a real request to see it. You type a web address and press Enter. The browser builds an HTTP request (Layer 7 data), TLS encrypts it (Layer 6), and TCP wraps it in a segment with source port 51544 and destination port 443 (Layer 4). IP adds a packet header with your address and the server's address (Layer 3). Ethernet adds a frame header with your MAC and your default gateway's MAC, plus the FCS trailer (Layer 2). The network card turns the frame into electrical signals on the cable (Layer 1). The switch reads only the frame header; the router reads the packet header, picks the next hop and builds a new frame; the server unwraps everything in reverse. In Wireshark each captured packet shows exactly these sections stacked: Ethernet II, Internet Protocol Version 4, Transmission Control Protocol and then the application protocol.

Devices map to layers, and the exam likes these pairings. Hubs, repeaters, cables, patch panels and media converters are Layer 1: they just pass signals without understanding them. Switches and bridges forward frames by MAC address at Layer 2; wireless access points also operate largely at Layer 2, bridging wireless frames onto the wired LAN. Routers forward packets by IP address at Layer 3, and a multilayer (Layer 3) switch can do both switching and routing. Load balancers, proxies and next-generation firewalls can inspect all the way up to Layer 7. A basic stateless packet filter works at Layers 3 and 4 because it reads addresses and ports, nothing deeper.

Several traps catch learners here. They mix up segment and packet (segment is Layer 4, packet is Layer 3), assume a switch uses IP addresses (a plain switch does not), or think Layer 7 means the browser program. Another trap is putting ARP (Address Resolution Protocol) neatly in one layer; it resolves Layer 3 addresses to Layer 2 addresses, so it is usually described as working between Layers 2 and 3. Remember too that the model is a reference: real protocols such as TLS do not always fit exactly one layer, and the exam accepts the conventional placement.

The model is also your troubleshooting map. A bottom-up approach starts with link lights and cables, then MAC addresses and VLAN membership, then IP addressing and routing, then ports and services. A top-down approach starts at the application and works down, which suits problems where one program fails while others work. A divide-and-conquer approach starts in the middle, often with a ping at Layer 3, and moves up or down depending on the result. Each approach is valid; what matters is that you test one layer at a time and record what you rule out.

Exam questions frame this topic in a few predictable ways. They name a device or protocol and ask its layer, name a PDU and ask the layer, or describe a symptom and ask which layer to investigate. Clue words help: 'bits', 'signal', 'cable', 'attenuation' point to Layer 1; 'MAC', 'frame', 'VLAN', 'switch' to Layer 2; 'IP', 'packet', 'route', 'subnet' to Layer 3; 'port', 'segment', 'reliable', 'connectionless' to Layer 4; 'encryption', 'encoding', 'compression' to Layer 6; and named application protocols such as HTTP or DNS to Layer 7.

Think of it like this Encapsulation works like sending a letter through a company mailroom. You write the letter (data), put it in an envelope with the recipient's department (port), the mailroom adds a shipping label with the street address (IP), and the courier slaps on a route sticker for the next depot (MAC). At each depot the route sticker is replaced, but the street address never changes. The analogy stops working at Layer 1: real networks do not move a physical object, they turn every layer's wrapping into one stream of signals.

Memory trick Bottom-up, Layer 1 to 7: Please Do Not Throw Sausage Pizza Away (Physical, Data Link, Network, Transport, Session, Presentation, Application). PDUs from Layer 1 up: bits, frames, packets, segments, data.

Key terms

PDU
Protocol data unit: the name for the chunk of data at a given layer (bits, frame, packet, segment or datagram, data).
Encapsulation
The process of each layer adding its header (and at Layer 2, a trailer) to the data it receives from the layer above.
De-encapsulation
The receiver removing each layer's header in reverse order to recover the original data.
MAC address
A 48-bit hardware address used at Layer 2 to deliver frames on the local network segment.
Frame check sequence
The Layer 2 trailer field containing a CRC value that the receiver uses to detect corrupted frames.
TCP/IP model
The four-layer model the internet actually uses (Link, Internet, Transport, Application), which merges OSI Layers 5 to 7 into one.
Multilayer switch
A switch that forwards frames at Layer 2 and can also route packets between VLANs at Layer 3.
Real-world example

A user cannot reach an internal web site. You check the switch port and see the link light on and no interface errors, so Layer 1 looks fine. You confirm the PC is in the correct VLAN and its MAC address appears on the right port (Layer 2), then ping the server's IP successfully (Layer 3). Finally you run a port test and find nothing is listening on TCP 443, so the fault is the web service itself at Layers 4 to 7. Working methodically through the layers took you straight to the server team instead of wasting time on cables.

Common mistakes

You decide

A help-desk ticket says a laptop on the third floor shows 'network cable unplugged.' The switch port it connects to shows no link light, and the laptop works fine on a different desk. Another technician suggests checking the DHCP server. Which OSI layer should you focus on, and is the DHCP suggestion a good next step?

Show the answer

Focus on Layer 1. No link light and a 'cable unplugged' message mean no signal is reaching the port, so check the patch cable, wall jack and switch port. DHCP is a higher-layer service; it cannot work until the physical link is up, so checking it now wastes time.

You capture traffic on both sides of a router while a PC talks to a server. In both captures the destination IP is 10.50.8.20, but the destination MAC address is different. A colleague thinks the capture is corrupted. Is it?

Show the answer

No. The router de-encapsulates the frame, reads the packet, and builds a new frame for the next hop with new source and destination MAC addresses. The IP addresses stay the same end to end, so the captures are exactly what the model predicts.

Exam tip: Memorize the PDU names in order: bits (1), frames (2), packets (3), segments or datagrams (4), data (5 to 7). Also remember that switches are Layer 2 and routers Layer 3 unless the question says multilayer switch.

Check yourself

As a packet crosses three routers to reach a server, which addresses change at each hop and which stay the same?

The Layer 2 source and destination MAC addresses change on every hop because each router builds a new frame; the Layer 3 source and destination IP addresses stay the same (unless NAT is involved).

A technician finds that CRC errors are climbing on a switch port. Which OSI layer is most likely at fault and why?

Layers 1 and 2. The CRC is checked against the Layer 2 frame check sequence, and failures usually come from physical problems such as a damaged cable, interference or a duplex mismatch.

A firewall blocks traffic based only on source IP and destination port. Up to which OSI layer is it inspecting?

Layer 4. IP addresses are Layer 3 and port numbers are Layer 4; it is not reading application content at Layer 7.

Why is TLS sometimes described as a Layer 6 function even though it runs over TCP?

Because it encrypts and formats data for the application, which is the Presentation layer's job in the OSI model; the model is a reference, so real protocols do not always fit one layer.

Study Network+ for free
A week-by-week plan with every lesson, quizzes, checkpoint tests, a practice exam and hands-on labs.
Open the Network+ study plan