PracticeLabs
Week 1Lesson 2Required15 min estimated0% progress

How Two Devices Actually Communicate

Follow one message from application to wire and back, name the PDU and layer at every step, and learn the single rule that explains most routing questions: Layer 3 addresses survive the journey, Layer 2 addresses do not.

Lesson orientation

What you'll learn (6 objectives)~15 min: video → lesson → check → apply → lab prep

Learning objectives

  • Explain encapsulation and decapsulation in terms of headers added and removed
  • Name the PDU produced at each layer: data, segment or datagram, packet, frame, bits
  • Map the seven OSI layers to the four TCP/IP layers
  • Trace a send to a device on the same network and to one on a different network
  • State which addresses a router rewrites at every hop and which it preserves end to end
  • Use the layer stack as a troubleshooting map to decide what to check first

Terms you will see

EncapsulationDecapsulationOSI modelTCP/IP modelSegmentPacketFrameSubnet maskMAC addressARP

Time breakdown

  • Read the notes8 min
  • Packet Walk tool5 min
  • Pause and predict2 min

Assigned video

Opens on YouTube
Recommended video

The Life of a Packet (Day 12)

By Jeremy's IT Lab · Opens externally on YouTube

Watch time not yet confirmed for this video — the notes below cover everything this lesson requires.

The link opens in a new browser tab. Return here when you finish watching.

Watch for these concepts

  • One message followed all the way down the stack and back up
  • Where the headers get added, and what each one carries
  • Why the destination MAC changes at every router but the destination IP never does
  • How the routing table decision fits into the journey

Go beyond the video

The assigned video introduces the idea. CCNA Practice Labs completes the learning path: clarify core concepts, explore how each device behaves, visualize the communication path, check your understanding, and prepare for hands-on lab work.

Watch the concept → understand it → visualize it → practice it → apply it.

Communication is wrap, send, unwrap

When an application has something to send, the data does not go straight onto the cable. It passes down through a series of layers, and each layer attaches its own header — a small block of information meant for the matching layer on the receiving device. Adding those headers on the way down is called encapsulation. The receiver strips them off on the way up, in reverse order, which is decapsulation.

Nothing mysterious happens at any layer. Each one simply writes down what its counterpart at the other end will need to know: which process this belongs to, which host it is for, which device should pick it up next.

MAC address — the neighbour's address
A MAC address is the hardware address burned into a network interface. Think of it as the name of one specific device on one specific local network. It gets a full treatment in Lesson 4; for now you only need to know that it identifies the next device that should physically receive the data, not the final destination.

One wrapper per layer

Each row below is the row above it, plus one new header. The name of the unit changes as it goes — that name is the PDU you met in Lesson 1.

Encapsulation, top to bottom
Step down the stackHeader addedResulting PDUKey addresses
ApplicationDataNone yet
TransportTCP or UDPSegment / DatagramSource and destination ports
NetworkIPPacketSource and destination IP — end to end
Data LinkEthernet header + FCSFrameSource and destination MAC — this hop only
PhysicalBitsSignals on the wire

Read the last column carefully, because it contains the whole lesson. The IP addresses are written once and describe the two ends of the conversation. The MAC addresses describe only the current step of the journey, and they get replaced at every step.

Sending to a device on the same network

Before a device can send anything, it has to answer one question: is the destination on my own network, or somewhere else? Everything that follows depends on that answer.

How the device decides — the mask comparison
Every device is configured with an IP address and a subnet mask. The mask marks which leading part of the address identifies the network, and which trailing part identifies the individual device on it. The sender takes its own address, takes the destination address, and compares the network portion of each — the part the mask marks as network. If the two network portions match, the destination is on the same network and can be reached directly. If they differ, it cannot, and the traffic must go to the default gateway. Lesson 6 shows how the mask is written and Week 2 works through the arithmetic; here, what matters is that this comparison happens before every single send.

Suppose PC-A wants to reach PC-C, and the comparison says they are on the same network. PC-A can deliver the frame itself, but it needs PC-C's MAC address to address that frame:

  1. PC-A compares the network portions and sees that PC-C is local.
  2. PC-A looks in its ARP cache — a small table of the IP-to-MAC mappings it has already learned — for PC-C's entry.
  3. If the entry is missing, PC-A uses ARP (Address Resolution Protocol) to ask the whole local network “who has this IP address?” The owner answers directly with its MAC address. Lesson 4 covers exactly what those two messages look like.
  4. PC-A builds a frame addressed to PC-C's MAC, containing a packet addressed to PC-C's IP, and sends it.
  5. The switch forwards the frame to the port where PC-C lives. PC-C replies, running the same process in reverse.

Sending to a device on a different network

Now suppose the mask comparison says the destination is somewhere else. PC-A has no way to reach it directly — it only knows how to talk to devices on its own network. So it hands the traffic to the one device whose job is to forward things onward: its default gateway.

  1. PC-A compares the network portions and sees the destination is not local.
  2. PC-A resolves the MAC address of its default gateway — not the MAC of the faraway destination, which it could never reach anyway.
  3. PC-A sends a frame addressed to the gateway's MAC. Inside that frame, the packet is still addressed to the final destination's IP.
  4. The router receives the frame, discards the frame header, and reads the packet's destination IP.
  5. The router consults its routing table to decide where to send it next, wraps the packet in a brand-new frame for the next link, and forwards it. The new frame's source MAC is the router's outgoing interface; the destination MAC is the next device along the path.
  6. Every router along the way repeats step 5 until the packet reaches a router directly attached to the destination's network, which delivers it to the destination itself.
The classic Week 1 mistake
On a send to a remote network, the frame's destination MAC is the gateway's, while the packet's destination IP is the final host. Those two fields point at different devices, and they are supposed to. Mixing them up is the single most common error in this part of the course.

The rule that explains the rest of the course

Put the two journeys side by side and one rule falls out of them:

Layer 3 preserved, Layer 2 rewritten
The IP addresses in a packet are written by the sender and arrive unchanged at the destination — they describe the conversation as a whole. The MAC addresses in a frame describe one hop only, so every router strips them off and writes new ones for the next link. Source and destination IP: constant. Source and destination MAC: replaced at every hop.

Once that rule is solid, a large share of early routing questions answer themselves. If a question asks what a packet looks like after three router hops, the IP addresses are whatever the sender put there; the MAC addresses belong to the two devices on either end of the third link.

The layer stack as a troubleshooting map

The seven OSI layers are worth learning, but not as a memory exercise. Their value is diagnostic: when something is broken, the layers give you an order to check things in, so you are not guessing. Real networks are usually described with the four-layer TCP/IP model instead, and CCNA questions use both, so learn the mapping between them.

OSI layers, their PDUs, and the TCP/IP equivalent
OSI layerPDUWhat lives hereTCP/IP layer
7 Application (with 6 and 5)DataHTTP, DNS, SSHApplication
4 TransportSegment (TCP) / Datagram (UDP)Ports, reliabilityTransport
3 NetworkPacketIP addressing, routingInternet
2 Data LinkFrameMAC addresses, VLANs, ARPNetwork Access
1 PhysicalBitsCables, optics, signalsNetwork Access

Worked example. A user reports that a web page will not load. Rather than guessing, walk up the stack. Is the interface up and the cable connected? That is Layer 1, and it is where most real faults live. Is the device on the right VLAN and able to reach its neighbours? Layer 2. Can it reach its default gateway and get a reply from an address on another network? Layer 3 — and this is the step where a wrong mask or a missing gateway shows up. Is the connection to the server's port getting through, or is something blocking it? Layer 4. Does the name resolve to the right address? Layer 7. Five checks, in order, each with a definite answer — that habit is the backbone of every troubleshooting lesson later in this course.

Which layer first?
Start at Layer 1 unless you have a reason not to. It takes ten seconds to confirm and it is wrong more often than anything else. The one exception: if several devices on one segment fail at once, jump to Layer 2 or 3 — a single cable rarely explains a group failure.

What you should retain

  • Encapsulation adds one header per layer on the way down; decapsulation removes them on the way up.
  • PDU order: data → segment or datagram → packet → frame → bits.
  • Every send begins with a mask comparison: same network, or not?
  • Same network: resolve the destination's MAC. Different network: resolve the default gateway's MAC.
  • Layer 3 IP addresses are preserved end to end; Layer 2 MAC addresses are rewritten at every hop.
  • Use the layers as a checking order when something breaks — start at Layer 1.
Pause and predictNot scored — nothing is recorded

Before you read on

A packet leaves your laptop, crosses one router, and arrives at a server on another network. Across that router hop, which addresses in the message changed, and which stayed exactly as they were?

Interactive tool
Required~5 min

Packet Walk

Step a packet across each hop and watch the Layer 2 addresses change while the Layer 3 addresses stay fixed. This is the one idea in the lesson that is genuinely easier to see than to read.

Section quiz

Check this section before moving on

Required8 questions~8 min

Network Foundations & Traffic Flow

The quiz opens on its own page so you can focus on it. It is a Week 1 milestone, tracked separately from this lesson's own completion.

Topics covered

  • Device roles and what each one examines
  • Hubs, collision domains, and why switches replaced them
  • PDU names and the layer each belongs to
  • Which addresses a router rewrites and which it preserves
Start the quiz

Study deeper

Topic guides extend this lesson — they do not replace the first-party walkthrough above.

OSI Model & Packet Flow

For the per-layer field reference and the full bottom-up troubleshooting workflow — this lesson gives you the map, the guide gives you every field on it