Chapter 3 of 3
How Data Finds Its Way Across the Internet
Track a web request as it is divided into units, addressed, forwarded through networks and reassembled. Contrast IP’s routing role with TCP’s reliability mechanisms, including sequence information, acknowledgments and retransmission.
1. Start with Meaning, Then Bytes
From ideas to bytes
A web request starts as characters, images, and commands. Hardware cannot send meaning directly, so software represents that information as bytes.
Encoding text
Unicode assigns code points to characters, while an encoding such as UTF-8 turns those characters into bytes suitable for storage and transmission.
2. Build a Web Request
The browser's job
The browser creates an HTTP request. The operating system and networking software then prepare its bytes for transport across a physical or wireless network.
Nested units
For a TCP example, application bytes become TCP segments, and each segment is carried in an IP packet. Each layer adds information for its own job.
3. IP Addresses the Packet
Address, not itinerary
An IP packet carries source and destination addresses. The destination identifies where the packet should end up, but it does not lock the packet onto one route.
Best effort
IP forwarding does not guarantee delivery, ordering, or uniqueness. Those gaps are important because another protocol, such as TCP, can handle them when needed.
4. Routers Make Local Decisions
Forwarding is local
Each router makes a next-hop decision using the destination IP address and its forwarding information. It does not need to know the whole path in advance.
Frames change at every hop
Wi-Fi and Ethernet frames are local wrappers. Routers remove the incoming frame and send the IP packet onward inside a new frame for the next link.
5. TCP Makes a Reliable Conversation
Different responsibilities
IP moves packets toward an address. TCP manages a reliable, ordered stream of application bytes between endpoint ports. They solve different problems.
Sequence information
TCP sequence numbers let the receiver identify where data belongs in the byte stream. Acknowledgments report what has successfully reached the receiver.
6. Recover from a Missing Segment
A gap is visible
If bytes 1-500 and 1001-1500 arrive but bytes 501-1000 do not, TCP can detect the missing range from sequence information.
Repair, then reassemble
Acknowledgments and timers help the sender detect loss and retransmit data. Once the missing bytes arrive, the receiver can reconstruct the ordered stream.
7. Trace the Layers
Thought exercise
Trace this request: `GET /weather`.
- Identify the application data: the request text and any accompanying bytes.
- Add TCP's role: sequence information, acknowledgments, and possible retransmission.
- Add IP's role: source and destination addresses for forwarding.
- Imagine two routers. Each chooses a next hop, replacing the local Wi-Fi or Ethernet frame as needed.
- At the server, reverse the process: remove link framing, process IP, use TCP to reassemble the byte stream, then deliver the request to the web server.
Now ask: if a router changes the next hop, which layer's job changed? The answer is IP forwarding, not TCP reliability.
8. Review the Key Terms
Flip the cards to connect each term with its role in moving data across the internet.
- UTF-8
- An encoding that represents Unicode characters as bytes.
- IP packet
- A network-layer unit carrying source and destination IP addresses for forwarding.
- Router
- A device that chooses a next hop and forwards packets between networks.
- TCP segment
- A TCP transport unit that carries part of a reliable byte stream.
- Acknowledgment
- TCP feedback that indicates data received, helping the sender detect missing data.
9. Check Understanding
Choose the best explanation of what happens when one TCP segment is lost.
A TCP segment carrying part of a web response is lost, while a later segment arrives. What most directly helps the receiver and sender recover?
- TCP sequence information identifies the gap, and acknowledgments or timeouts can trigger retransmission.
- The destination IP address automatically recreates the lost segment at the next router.
- The Wi-Fi frame remains attached to the packet until the server receives it.
Show Answer
Answer: A) TCP sequence information identifies the gap, and acknowledgments or timeouts can trigger retransmission.
TCP sequence information exposes missing bytes in the stream. TCP acknowledgments and loss-detection mechanisms can cause the sender to retransmit them. IP addresses guide forwarding; they do not provide TCP-style recovery.
Key Terms
- IP
- Internet Protocol, the network-layer protocol that addresses and forwards packets.
- TCP
- Transmission Control Protocol, which provides a reliable, ordered byte stream for applications.
- IPv6
- Internet Protocol version 6, which uses 128-bit IP addresses.
- UTF-8
- A widely used encoding form that represents Unicode text as sequences of bytes.
- packet
- A formatted unit of data sent across a network; an IP packet includes network-layer addressing information.
- router
- A network device that forwards packets toward a destination by choosing a next hop.
- segment
- A unit of TCP data carried inside an IP packet.
- character
- An abstract textual unit, such as a letter, symbol, or emoji.
- code point
- A numeric value assigned by Unicode to represent a character or other encoded element.
- acknowledgment
- A TCP message or field indicating that specified data has been received.