C

Networking › Module 1 › Lesson 3

BeginnerModule 1Lesson 3/4

How Data Travels in Networks

Follow a message from your browser to a server through encapsulation and routing

15 min+41 XP3 quiz
Module progress3 of 4
PCSwitchRouterServer
Sender → Router → Switch → Server

Opening

Your click becomes electricity, then light, then back again

You type a URL and hit Enter. In under a second, your request crosses Wi-Fi, your router, your ISP, several backbone routers, and a data center—then the response travels back. Understanding that journey is how defenders spot anomalies and how attackers know where to intercept traffic.

1. Encapsulation — Wrapping Data at Each Layer

As data moves down the stack, each layer adds its own header (and sometimes trailer) around the payload from the layer above. This is encapsulation—like putting a letter in an envelope, then that envelope in a box, then the box on a truck.

Going down the stack (sending):

  • Application data

    Your HTTP request starts as plain application data.

  • Segment (Transport)

    TCP adds source/destination ports and sequence numbers.

  • Packet (Network)

    IP adds source and destination IP addresses.

  • Frame (Data Link)

    Ethernet adds source/destination MAC addresses for the local hop.

  • Bits (Physical)

    Converted to electrical or radio signals on the wire or air.

2. Packet vs Frame — Know the Difference

A packet is an IP-layer unit—it has IP addresses and can travel across routers on different networks. A frame is a Data Link-layer unit—it has MAC addresses and only travels across one local segment (like your LAN). When a packet reaches a router, the frame is stripped and a new frame is built for the next hop. The IP packet inside usually stays the same until it reaches the destination.

3. The Journey: Source to Destination

  • Step 1 — Your device

    Browser creates HTTP data. TCP segments it. IP addresses it to the server. Ethernet frames it to your default gateway (router).

  • Step 2 — Local network

    Switch forwards the frame to the router using MAC addresses. ARP resolves "who has this IP?" on the LAN.

  • Step 3 — Routing

    Each router reads the destination IP, checks its routing table, and forwards the packet toward the next hop—repeated until the server network.

  • Step 4 — Destination

    Server receives the frame, strips headers layer by layer, and the web server processes your HTTP request.

  • Step 5 — Return trip

    Response encapsulates back up the stack and routes home. TCP ensures all segments arrive in order.

Wireshark shows every layer

In a packet capture, expand the frame to see Ethernet headers, then IP, then TCP, then HTTP. That visual stack is encapsulation in action—the best way to learn how data really travels.

Knowledge Check

1

What is encapsulation?

Multiple choice

Knowledge Check

2

At which layer does a "frame" exist?

Multiple choice

Knowledge Check

3

True or False: A router primarily works with IP addresses at Layer 3.

True or False

← Previous

Answer all 3 knowledge checks to continue. (0/3 answered)