MGU Computer Science Series — Computer Science Foundations
Part V: Networks, Web, and Security
Nodes · Packets · IP · DNS · Protocols · Routers · Cloud
Chapter 19 of 28
MGU Computer Science Series  ·  Computer Science Foundations  ·  Library Textbook Edition

Chapter 19:
Networks and
the Internet

How devices communicate across networks — nodes, links, packets, IP addressing, DNS, protocols, routers, bandwidth, latency, and cloud computing

■ Part V: Networks, Web, and Security ■

■ 10 Sections  •  Chapter 19 of 28 ■

Follows Part IV: Computer Systems  ·  Prepares students for Chapter 20: The World Wide Web

Purpose and Overview

Every time you send a message, load a web page, stream a video, play an online game, or ask a voice assistant a question, your device is communicating across a network. That communication does not happen by magic. It follows precise rules, travels through physical infrastructure, and depends on systems designed by computer scientists and engineers over several decades.

This chapter explains how computers communicate. You will learn what a network is, how information travels across networks in small packets, how devices are identified by IP addresses, how names are translated into addresses, and how the global internet connects billions of devices into a single infrastructure. You will also learn why networks sometimes fail, how engineers think about performance and reliability, and how cloud computing uses networked infrastructure to deliver services.

By the end of this chapter, you should understand how a message gets from one device to another on the other side of the world, why that process is more complicated than it looks, and why the internet works as well as it does given how many things could go wrong.

Opening Question

When you type a domain name into a browser and press Enter, what happens next? Before a single byte of the page arrives, your device must find the server's address, establish a connection, and negotiate the rules of communication — all in fractions of a second. This chapter explains every step of that process and the infrastructure that makes it possible.

10Sections
12Objectives
35+Key Terms
8+Worked Examples

Learning Objectives

  1. 1Define a network and explain the three components every network requires.
  2. 2Describe what a packet is, what a packet contains, and why packet switching is used.
  3. 3Distinguish between LANs, WANs, and the internet as a network of networks.
  4. 4Explain what an IP address is, contrast IPv4 and IPv6, and describe the purpose of NAT.
  5. 5Trace the steps of a DNS lookup from a domain name to an IP address.
  6. 6Define a protocol and describe the four layers of the TCP/IP model.
  7. 7Contrast TCP and UDP and identify appropriate uses for each.
  8. 8Explain how routers use routing tables to forward packets across networks.
  9. 9Distinguish between bandwidth and latency and explain how each affects network performance.
  10. 10Describe what cloud computing is and identify its main service models.
  11. 11Explain the purpose of content delivery networks and edge computing.
  12. 12Trace the full path of a web request from browser to server and back.

Sections at a Glance

Sections 19.1 – 19.4
What Networks Are and How Data Travels
What a Network Is · Nodes, Links, Packets · LAN and WAN · The Internet

What a Network Is

A network is a collection of devices that can communicate with each other by sending and receiving data. Networks can be small — a home network might include a laptop, a phone, a tablet, a printer, and a smart television, all connected to a wireless router. Networks can also be enormous: the internet connects billions of devices across every country on earth.

What makes something a network is not size. It is the ability to send and receive information between devices.

Why Networks Matter

Before networks existed, computers were isolated. Each machine processed its own data and stored its own files. Moving information between machines required physically copying files to removable storage — floppy disks, tapes, or later USB drives. Networks changed everything. Once computers could communicate, they could share data without physical transfer, use shared resources like printers and storage, run software that depends on other machines, communicate in real time across large distances, pool computing power for larger problems, and deliver services to many users simultaneously. Today almost every useful computing system depends on a network. The isolated computer is the exception, not the rule.

Three Things Every Network Needs

Nodes — Devices that communicate: computers, phones, servers, printers, cameras, sensors. These are the endpoints.

Links — Physical or wireless connections between devices: cables, fiber optic lines, radio waves, satellite signals.

Protocols — Rules governing communication: message format, addressing, sequencing, and error handling. Without shared protocols, connected devices have no common language.

Nodes, Links, and Packets

Nodes

A node is any device connected to a network. Nodes include end-user devices (laptops, phones, tablets, desktop computers), servers (machines that respond to requests), routers (devices that direct traffic between networks), switches (devices that connect multiple nodes within a local network), and any number of printers, cameras, smart speakers, and IoT devices. Not all nodes serve the same role — some send requests, some respond, some move data from place to place.

Links

Link TypeMediumCharacteristics
Ethernet cableCopper wireReliable, common in offices and homes; limited by cable length
Fiber optic cableLight pulsesVery fast, long distances, expensive to install; backbone of the internet
Wi-FiRadio wavesConvenient, wireless; subject to interference; limited range
Cellular (4G/5G)Radio wavesMobile coverage; variable speed and latency; requires tower infrastructure
SatelliteRadio wavesGlobal reach including remote areas; introduces significant latency

Packets

Networks do not send information as a single continuous stream. Instead, they break information into small, manageable pieces called packets. A packet is a small bundle of data that travels independently across a network. To understand why, imagine sending a long letter across a city. You could hire one courier to carry the whole letter, but that courier might be delayed. Alternatively, you could cut the letter into ten pieces, put each piece in a separate envelope, and send each envelope by a different route. The pieces might arrive at different times, but the recipient can reassemble them in order. Packets work the same way.

Packet Structure
┌──────────────────────────────────────────────────────┐
│                        PACKET                        │
├──────────────────────────┬───────────────────────────┤
│          HEADER          │          PAYLOAD          │
├──────────────┬───────────┤                           │
│  Source IP   │  Dest IP  │   Actual data             │
│  Sequence #  │  Protocol │   being sent              │
│  Error check │  Length   │   (fragment of file,      │
│              │           │    message, video, etc.)  │
└──────────────┴───────────┴───────────────────────────┘

The header contains control information: the source address, the destination address, a sequence number so packets can be reassembled in the correct order, error-checking information, and protocol details. The payload contains the actual data being transmitted. The header is overhead — it carries no content, but without it, the packet could not be routed or reassembled.

Packet Switching

Breaking data into independently routed packets is called packet switching. Its advantages: multiple conversations share the same links simultaneously; if one route is congested, packets can take alternate paths; the network can recover from node failures; and links are used efficiently. Packet switching is one of the fundamental design decisions that makes the internet scalable and resilient.

Local Networks and Wide-Area Networks

TypeScaleExampleOwnership
PAN — Personal Area NetworkWithin metersPhone to wireless headphones via BluetoothIndividual
LAN — Local Area NetworkBuilding or campusHome Wi-Fi network; school computer labHousehold or organization
MAN — Metropolitan Area NetworkCity or metro areaCity government network; cable provider networkTelecom or municipality
WAN — Wide-Area NetworkCountries or continentsCorporate multi-city network; the internetMultiple organizations

A LAN connects devices within a limited area. Because distances are short and infrastructure is controlled by a single organization, LANs are typically fast and reliable. Devices on a LAN can communicate directly with each other without touching the broader internet — a printer and a laptop on the same home LAN communicate locally. A WAN connects devices across large geographic distances using leased telecommunications lines, fiber optic cables, satellite links, or combinations. The internet is the largest WAN in the world, but organizations also build private WANs to connect offices in multiple cities.

The Internet as a Network of Networks

The internet is not a single network. It is a vast collection of networks operated by thousands of different organizations — all interconnected and able to exchange data using shared protocols. At the smallest scale you have home networks and office LANs. These connect to networks operated by Internet Service Providers (ISPs). ISPs connect to larger regional and national networks, which connect to tier-1 networks — the largest backbone providers that span continents.

The Path from Your Device to a Distant Server
Your device
    ↓
Your home router (LAN)
    ↓
Your ISP's regional network
    ↓
A larger ISP or national backbone network
    ↓
International fiber optic cables (undersea)
    ↓
Foreign backbone networks
    ↓
Foreign ISPs
    ↓
Destination server

Each independently managed network is called an autonomous system (AS). There are tens of thousands of them. They connect to each other through peering agreements — arrangements to exchange traffic, either freely or for payment.

The internet's design assumes that individual components will fail. Routers malfunction. Cables break. Data centers go offline. Because there are many possible paths between any two points, packets can be rerouted when a path becomes unavailable. No single point of failure brings down the entire network. This resilience was a deliberate design goal.

Practice 19.1–19.4Concept Check
  1. Name the three components every network requires. For each, give a specific example from a home network.
  2. What is a packet? Why do networks break data into packets rather than transmitting it as a continuous stream?
  3. What information is stored in a packet's header? What is stored in the payload?
  4. Distinguish between a LAN and a WAN. Give one example of each.
  5. Explain what makes the internet resilient. Why does a single router failure not crash the entire internet?
Sections 19.5 – 19.6
Addressing and Naming: IP and DNS
IP Addresses · IPv4 and IPv6 · NAT · Domain Names · DNS Lookup

IP Addresses

Every device on a network needs an identifier so that packets can be addressed to it. On the internet, this identifier is called an IP address — a numerical label assigned to each device that serves two purposes: identifying the device and indicating its location within the network structure.

IPv4 Addresses

IPv4 uses 32-bit addresses, typically written as four numbers separated by dots, where each number is between 0 and 255. Because 232 equals approximately 4.3 billion, IPv4 allows about 4.3 billion unique addresses. When the internet was designed in the 1970s and 1980s, that seemed more than sufficient. As the internet grew far beyond initial expectations, the available pool of IPv4 addresses was exhausted.

Example 19.5.1
Reading IPv4 addresses
  • FormatFour numbers, 0–255, separated by dots. Each number represents 8 bits.
  • Examples 192.168.1.1 ← common home router address 10.0.0.1 ← private network address 172.217.10.46 ← example public address
  • NoteThe address 192.168.1.256 is not valid because 256 exceeds 255 — each section is 8 bits, which can only hold 0–255.

IPv6 Addresses

IPv6 uses 128-bit addresses, written as eight groups of four hexadecimal digits separated by colons. IPv6 allows approximately 3.4 × 1038 unique addresses — enough for every device on earth to have many unique addresses for the foreseeable future. The internet is gradually transitioning from IPv4 to IPv6, but both systems are currently in widespread use simultaneously.

Example 19.5.2
IPv6 address format
  • FormatEight groups of four hexadecimal digits, separated by colons.
  • Example2001:0db8:85a3:0000:0000:8a2e:0370:7334
  • CompareIPv4 has ~4.3 billion addresses. IPv6 has ~3.4 × 1038 — an unimaginably larger number, enough for every grain of sand on earth to have billions of addresses.

Public, Private, and Dynamic Addresses

TypeDescriptionExample Use
Public addressGlobally unique; routable on the internetA web server's address; your router's external address
Private addressReserved for internal LANs; not routable on the public internet192.168.x.x, 10.x.x.x — devices inside your home network
Dynamic addressAssigned automatically via DHCP; may change each sessionYour phone or laptop on Wi-Fi
Static addressManually configured; remains constantWeb servers, network printers, infrastructure
Network Address Translation (NAT)

Your home router has one public IP address assigned by your ISP. All devices in your home share that single address. NAT allows the router to track which internal device each connection belongs to and route incoming packets correctly. This is why your phone, laptop, and smart TV can all access the internet through a single public address.

Domain Names and DNS

IP addresses are effective for machines, but they are difficult for people to remember. Nobody types 172.217.10.46 into a browser to visit a website. Instead, people type names like www.example.com. The system that translates human-readable names into IP addresses is called the Domain Name System (DNS).

Domain Name Structure

Consider the name mail.university.edu. Reading from right to left: edu is the top-level domain (TLD) indicating an educational institution; university is the second-level domain identifying the specific organization; mail is a subdomain indicating a specific service or server within the organization.

TLDOriginal Purpose
.comCommercial organizations (now used broadly)
.orgNonprofits and organizations
.eduEducational institutions
.govGovernment entities
.netOriginally network infrastructure
.uk, .de, .jp, .caCountry-code TLDs

How DNS Works

When you type a domain name into your browser, your computer must find the IP address corresponding to that name before it can connect. This process involves several servers working together.

DNS Lookup — Step by Step
Your Browser
     |
     | "What is the IP for mail.university.edu?"
     ↓
Recursive Resolver  (your ISP or DNS service)
     |
     | Cache miss — must find the answer.
     ↓
Root Nameserver
     |
     | "I don't know, but ask the .edu nameservers."
     ↓
.edu Nameserver
     |
     | "I don't know, but ask university.edu's nameservers."
     ↓
university.edu Authoritative Nameserver
     |
     | "The IP address is 203.0.113.42."
     ↓
Recursive Resolver  ← Caches the result
     |
     | Returns 203.0.113.42 to your browser.
     ↓
Your Browser  ← Connects to 203.0.113.42

If you have visited the same site recently, your device checks its local cache first. A cached answer skips the entire lookup chain. This caching is why DNS is fast in practice — most common domains are already cached somewhere in the lookup chain. DNS is designed with redundancy at every level because if DNS fails, domain names cannot be resolved and most internet services become unreachable even if the network itself is functioning.

Common Misconception

DNS does not route packets. It only translates names to addresses. Once your browser has the IP address, DNS's job is done. Routing — the actual forwarding of packets — is handled by routers using IP, not by DNS.

Practice 19.5–19.6Addressing and DNS
  1. Which of the following is a valid IPv4 address? Explain why the others are not valid.
    a) 192.168.1.256    b) 10.0.0.1    c) www.example.com    d) 2001:0db8::1
  2. Why did IPv6 need to be created? How many more addresses does it provide compared to IPv4?
  3. In the domain name support.software.com, identify the top-level domain, second-level domain, and subdomain.
  4. Explain what a DNS recursive resolver does. Why is caching important to DNS performance?
  5. A company's authoritative nameserver crashes. What happens when a new visitor tries to reach the company's website? What should the company have done to prevent this?
Sections 19.7 – 19.8
Protocols, Layers, and Routing
Protocols · TCP/IP Stack · TCP vs. UDP · Routers · Routing Tables · traceroute

Protocols

A protocol is a set of rules that governs how devices communicate. Protocols define the format of messages, the sequence of exchanges, error handling, and addressing. Without protocols, two devices could be physically connected but unable to communicate meaningfully — like two people trying to have a conversation in languages neither understands.

The TCP/IP Protocol Stack

Networks do not use a single protocol for everything. Communication is organized in layers, with each layer responsible for a different aspect of communication. Each layer provides services to the layer above it and uses services from the layer below it. This is called a protocol stack.

The TCP/IP Protocol Stack — Four Layers
┌─────────────────────────────────────────────────────┐
│             Application Layer                       │
│      HTTP, HTTPS, DNS, SMTP, FTP, SSH               │
├─────────────────────────────────────────────────────┤
│             Transport Layer                         │
│             TCP  ·  UDP                             │
├─────────────────────────────────────────────────────┤
│             Internet Layer                          │
│             IP (Internet Protocol)                  │
├─────────────────────────────────────────────────────┤
│             Network Access Layer                    │
│             Ethernet · Wi-Fi · Fiber                │
└─────────────────────────────────────────────────────┘
LayerResponsibilityExample Protocols
Network AccessPhysically transmitting bits across a link — electrical signals, radio waves, or light pulsesEthernet, Wi-Fi (802.11)
InternetAddressing and routing packets across networks; adding source and destination IP addresses to headersIP (IPv4, IPv6)
TransportReliable or fast delivery between two endpoints; segmentation and reassemblyTCP, UDP
ApplicationSpecific tasks for applications: web pages, email, file transfer, remote accessHTTP, HTTPS, SMTP, DNS, FTP, SSH

TCP vs. UDP

The two main transport-layer protocols serve different needs. TCP (Transmission Control Protocol) provides reliable, ordered delivery. It requires acknowledgment of received packets and retransmits any that are lost. If a packet does not arrive, TCP will keep trying until it does. This reliability has a cost: retransmissions take time. UDP (User Datagram Protocol) is faster but makes no delivery guarantees. Lost packets are not retransmitted. For applications where speed matters more than perfection — live video, gaming, DNS lookups — UDP is often the better choice.

FeatureTCPUDP
Reliable deliveryYes — retransmits lost packetsNo — lost packets are discarded
Ordered deliveryYes — packets reassembled in sequenceNo guarantee
SpeedSlower due to overheadFaster, lower overhead
Best forFile transfer, web pages, email, bankingLive video, gaming, voice calls, DNS

Key Application-Layer Protocols

ProtocolFull NamePurpose
HTTPHypertext Transfer ProtocolRequesting and delivering web pages
HTTPSHTTP SecureHTTP with encryption; shown as a padlock in browsers
SMTPSimple Mail Transfer ProtocolSending email between servers
FTPFile Transfer ProtocolTransferring files between computers
SSHSecure ShellSecurely connecting to and controlling remote computers
DNSDomain Name SystemTranslating domain names to IP addresses
Why Layering Matters

Layering keeps each protocol focused on a specific job. When engineers develop a faster networking technology at the physical layer, the layers above do not need to change. HTTP works the same whether the physical connection is copper cable, fiber, or Wi-Fi. Layering also allows different protocols to be swapped in at each layer without affecting the others.

Routers and Packet Paths

A router is a network device that forwards packets from one network to another. Routers are the traffic directors of the internet. When a packet arrives, the router examines the destination IP address in the header, consults its routing table — a list of known networks and the best path to reach each — and forwards the packet to the next router on the path. This process repeats at each router until the packet reaches its destination.

Example 19.8.1
Tracing a packet's journey
  • ScenarioYou send a message from your laptop in one city to a server in another country. The message is broken into packets. Each packet:
  • Step 1Leaves your laptop and reaches your home router.
  • Step 2Your home router forwards it to your ISP's network.
  • Step 3Your ISP's router forwards it to a larger backbone network.
  • Steps 4–6Several more routers forward it across national backbone networks, then undersea cables to another continent.
  • Final stepsSeveral more routers forward it through networks in the destination country until it reaches the server.
  • Key ideaEach step is called a hop. A packet typically passes through 10–20 routers on a journey across the internet.
The path is dynamic — different packets from the same message may take different routes.

The traceroute Tool

A tool called traceroute (or tracert on Windows) shows the path packets take and the time each hop takes. Here is an example of what its output might look like:

Sample traceroute Output
traceroute to example.com (93.184.216.34)
  1   192.168.1.1         2 ms      (home router)
  2   10.0.0.1            8 ms      (ISP gateway)
  3   72.14.204.97       12 ms      (ISP backbone)
  4   108.170.246.34     15 ms      (larger backbone)
  5   209.85.255.93      85 ms      (transatlantic link)
  6   93.184.216.34      88 ms      (destination)

Each line is one hop. The time shown is the round-trip time — how long a test packet took to travel to that router and back. The large jump between hop 4 (15 ms) and hop 5 (85 ms) indicates a long-distance link, likely a transatlantic fiber optic cable.

Routers do not have hardcoded knowledge of the entire internet. They use routing protocols to discover network topology and build their routing tables dynamically. When a network path becomes unavailable, routing protocols propagate that information to neighboring routers, which update their tables and route around the failure. This dynamic routing is why the internet can survive localized failures without going down entirely.

Practice 19.7–19.8Protocols and Routing
  1. Name the four layers of the TCP/IP model and briefly describe the responsibility of each.
  2. A student is downloading a large file. Another student is playing a real-time online game. Which transport protocol is more appropriate for each? Explain your reasoning.
  3. What is a routing table? How does a router use it?
  4. In a traceroute result, you see the round-trip time jump from 20 ms to 160 ms between two consecutive hops. What likely happened?
  5. HTTPS uses HTTP with encryption. Why does it matter whether a banking website uses HTTP or HTTPS?
Sections 19.9 – 19.10
Performance, Reliability, and Cloud Services
Bandwidth · Latency · Throughput · Congestion · Cloud Computing · CDNs · Edge Computing

Bandwidth, Latency, and Reliability

Bandwidth

Bandwidth is the maximum rate at which data can be transferred across a network link. Think of it as the number of lanes on a highway — more lanes mean more cars can travel simultaneously. Higher bandwidth means more data can flow in a given time.

UnitAbbreviationValueExample
Kilobits per secondKbps1,000 bpsOld dial-up modem
Megabits per secondMbps1,000,000 bpsTypical home internet
Gigabits per secondGbps1,000,000,000 bpsData center connections

Latency

Latency is the time it takes for a packet to travel from its source to its destination, typically measured in milliseconds (ms). Latency is determined primarily by physical distance and the speed of signals through the medium. Light through fiber optic cables travels at about 200,000 km/s — fast, but not instantaneous. A packet traveling from New York to London and back (roughly 12,000 km round trip) requires at least about 60 ms just for the signal to travel, plus processing time at each router.

Think of latency as the time to drive from one city to another, regardless of how many lanes the highway has. You can have a very wide highway (high bandwidth) but still take time to travel the distance (latency).

Example 19.9.1
Bandwidth vs. latency — choosing the right concern
  • ScenarioA student has 100 Mbps download bandwidth and 50 ms latency. Another student switches to satellite internet: 25 Mbps bandwidth but 600 ms latency.
  • File downloadSatellite: 400 Mbps of data ÷ 25 Mbps = 16 seconds. Original: 4 seconds. Satellite is about 4× slower due to lower bandwidth.
  • Online gamingAt 600 ms latency, player actions take over half a second to reach the server. The game becomes essentially unplayable — the player is always reacting to events that are 600 ms old.
  • ConclusionFor file downloads, bandwidth matters most. For interactive applications, latency matters most. High bandwidth does not guarantee low latency.
ApplicationLimited by…Why
Streaming videoBandwidthRequires a continuous high data rate
Large file downloadsBandwidthTotal data transferred is large
Online gamingLatencyPlayer actions must reach the server quickly
Video callingBothRequires both speed and responsiveness
Loading a web pageLatency first, then bandwidthFirst request must complete before content can begin loading

Throughput, Congestion, and Packet Loss

Throughput is the actual rate of data transfer achieved in practice — typically lower than the theoretical maximum bandwidth. Bandwidth is a capacity; throughput is the performance actually delivered. Throughput is reduced by congestion, packet loss, protocol overhead, and processing delays at routers.

Congestion occurs when more packets are sent across a link than it can carry. When a router's buffer fills, it discards incoming packets. Those discards cause TCP retransmissions, which can worsen congestion. TCP includes congestion control mechanisms that detect packet loss and automatically slow down transmission — which is why internet performance degrades gracefully rather than collapsing entirely when many users are active simultaneously.

UDP does not retransmit lost packets. For live audio and video, a small amount of packet loss is acceptable because retransmitting old data is pointless when newer data has already arrived. The tradeoff: UDP is faster but imperfect; TCP is reliable but slower under adverse conditions.

Cloud Computing and Connected Services

Cloud computing is a model in which computational resources — processing, storage, software — are delivered as services over the internet rather than running on local hardware. The "cloud" refers to infrastructure operated by a third party and accessed remotely. Instead of buying and maintaining servers, organizations pay for computing capacity provided by companies like Amazon Web Services, Google Cloud, and Microsoft Azure.

Service ModelWhat the Provider OffersWhat the Customer ControlsExample
IaaS — Infrastructure as a ServiceVirtual machines, storage, networkingOperating system, software, applicationsRenting a virtual server
PaaS — Platform as a ServiceManaged environment: databases, web servers, toolsApplications and dataA managed database service
SaaS — Software as a ServiceA complete application delivered over the internetData and settings onlyEmail, document editors, video conferencing

Cloud computing became widely adopted for several reasons. Scalability: cloud providers operate enormous data centers; a startup can handle millions of users without building infrastructure. Economics: organizations pay only for what they use, often per hour or per request. Reliability: major providers operate multiple data centers in different geographic regions; if one fails, services continue from another. Accessibility: cloud services are available from any device with an internet connection.

Content Delivery Networks

Delivering content quickly to users around the world is a challenge because of latency. A server in North America takes measurably longer to respond to a user in Southeast Asia. A Content Delivery Network (CDN) addresses this by distributing copies of content to servers located in many geographic regions. When a user requests content, they are served from a nearby CDN server rather than the original source, reducing latency significantly. Major websites, streaming services, and software downloads use CDNs to ensure fast delivery regardless of where the user is.

Edge Computing

Edge computing moves computation closer to the devices that generate and consume data, rather than sending all data to distant data centers. Smart cameras, industrial sensors, autonomous vehicles, and IoT devices generate enormous amounts of data. Sending all of it to a distant cloud introduces latency and requires significant bandwidth. Edge computing runs processing on local devices or nearby small servers, sending only processed results or important events to central systems. It is increasingly important where real-time response is critical — factory automation, traffic management, medical monitoring.

Example 19.10.1
A complete web request — all concepts connected
  • Step 1A user types https://example.com into a browser. The browser checks its DNS cache — no entry. A DNS lookup begins.
  • Step 2The recursive resolver queries root nameservers → TLD nameservers → authoritative nameservers. The IP address 93.184.216.34 is returned.
  • Step 3The browser initiates a TCP connection to 93.184.216.34 on port 443 (HTTPS). A handshake exchanges several packets to establish the connection and negotiate encryption.
  • Step 4The browser sends an HTTPS request, broken into TCP/IP packets. Routers forward these packets hop by hop — possibly through 15+ routers across national and international backbone networks.
  • Step 5The web server (possibly a cloud-hosted virtual machine) receives the request, processes it, and sends a response as packets routed back to the user.
  • Step 6Images and static assets may be served from a CDN server physically closer to the user, reducing latency for those resources.
  • Step 7The browser reassembles the packets, decrypts the HTTPS content, and renders the page.
Total time for a simple web page: typically under one second, even when servers are thousands of kilometers away.
Practice 19.9–19.10Performance and Cloud
  1. Explain the difference between bandwidth and latency. Which matters more for online gaming? Which matters more for downloading a large file? Explain your reasoning.
  2. What is throughput, and why is it typically lower than bandwidth?
  3. A streaming service serves users in many countries from a single server in the United States. Users in Australia report slow load times. What solution would you recommend, and why would it help?
  4. Name the three cloud service models (IaaS, PaaS, SaaS) and give one real-world example of each.
  5. Why is edge computing useful for autonomous vehicles? What would happen if all sensor data had to travel to a distant data center before the vehicle could react?

Chapter Summary

Key Terms Review

network
A collection of devices connected so they can communicate by sending and receiving data.
node
Any device connected to a network — computers, servers, routers, printers, IoT devices.
protocol
A set of rules governing how devices communicate: message format, sequence, addressing, and error handling.
packet
A small bundle of data transmitted across a network, containing a header with control information and a payload with actual data.
packet switching
Breaking data into independently routed packets, allowing multiple conversations to share links and enabling rerouting around failures.
LAN
Local Area Network — connects devices within a limited area such as a home, office, or campus.
WAN
Wide-Area Network — connects devices across large geographic distances, crossing organizational and national boundaries.
internet
The global network of networks — thousands of autonomous systems all interconnected using common protocols.
autonomous system
An independently managed network operated by a single organization such as an ISP, university, or company.
IP address
A numerical identifier assigned to each networked device, used to address packets and indicate network location.
IPv4
32-bit IP address format supporting ~4.3 billion unique addresses; written as four decimal numbers separated by dots.
IPv6
128-bit IP address format supporting ~3.4 × 10³⁸ addresses; created to solve IPv4 exhaustion.
NAT
Network Address Translation — allows multiple devices on a LAN to share a single public IP address.
DHCP
Dynamic Host Configuration Protocol — automatically assigns IP addresses to devices when they join a network.
DNS
Domain Name System — translates human-readable domain names into IP addresses through a hierarchical lookup.
domain name
A human-readable label such as example.com that maps to an IP address through DNS.
TLD
Top-Level Domain — the rightmost part of a domain name: .com, .org, .edu, .gov, country codes.
recursive resolver
A DNS server that does the work of finding an IP address by querying root and authoritative nameservers on behalf of a client.
TCP
Transmission Control Protocol — provides reliable, ordered delivery; retransmits lost packets. Used for web, email, file transfer.
UDP
User Datagram Protocol — fast but no delivery guarantee; no retransmission. Used for live video, gaming, DNS.
HTTP / HTTPS
Protocols for requesting and delivering web pages. HTTPS adds encryption to protect communication from interception.
router
A network device that forwards packets between networks using routing tables.
routing table
A data structure in a router containing known networks and the best paths to reach them.
hop
Each router a packet passes through on its journey from source to destination.
bandwidth
The maximum rate at which data can be transferred across a network link, measured in bps, Mbps, or Gbps.
latency
The time delay for a packet to travel from source to destination, typically measured in milliseconds.
throughput
The actual data transfer rate achieved in practice — typically lower than bandwidth due to congestion, loss, and overhead.
congestion
A condition where more packets arrive at a link than it can carry, causing routers to discard packets and performance to degrade.
cloud computing
Delivering computing resources — processing, storage, software — as services over the internet, operated by a third party.
IaaS / PaaS / SaaS
Three cloud service models: Infrastructure (virtual machines), Platform (managed environments), and Software (complete applications) as a Service.
CDN
Content Delivery Network — a distributed network of servers storing copies of content geographically close to users for fast delivery.
edge computing
Moving computation close to the devices that generate data to reduce latency and bandwidth use in time-sensitive applications.

Diagram Review

Diagram 19-A — Packet Structure
Analyzing what a packet contains
  • TaskStudy the packet diagram in Section 19.2 and answer these questions:
  • Q1What information in the header allows the packet to be routed to the right destination?
  • Q2What information allows the receiver to reassemble packets in the correct order?
  • Q3If a packet's header is corrupted during transmission, what problem might the receiving device encounter?
  • Q4Why is the header called "overhead"? What would happen if there were no header at all?
Diagram 19-B — DNS Lookup
Drawing the DNS process
  • TaskDraw the DNS lookup process for resolving shop.company.com. Your diagram should show your browser, the recursive resolver, the root nameserver, the .com TLD nameserver, and the authoritative nameserver.
  • IncludeArrows showing the direction of each query and each response. Label each arrow with what is being requested or returned.
  • Also showWhere caching occurs and what it prevents.
Diagram 19-C — The Protocol Stack
Completing the layer table
  • TaskCopy and complete this table from memory. Do not look at your notes.
  • Table Layer | Name | Responsibility | Example Protocols 4 | | | 3 | | | 2 | | | 1 | | |

Worked Example Review

Worked Example 19-W1
Tracing a full web request from Nairobi to Virginia
  • ScenarioA student in Nairobi opens a browser and types https://example.com. The web server is located in Virginia. Walk through every step from Enter to page display.
  • Step 1Browser checks DNS cache — no entry. Sends query to recursive resolver (ISP-provided).
  • Step 2Recursive resolver queries root nameserver → learns to ask .com TLD nameservers.
  • Step 3Queries .com TLD nameserver → learns to ask example.com's authoritative nameserver.
  • Step 4Authoritative nameserver returns 93.184.216.34. Resolver caches it; returns to browser.
  • Step 5Browser initiates TCP connection to 93.184.216.34 on port 443 — a multi-packet handshake to establish connection and negotiate HTTPS encryption.
  • Step 6Browser sends HTTPS request broken into TCP/IP packets. Packets travel through Nairobi's ISP, across Africa, through undersea cables under the Indian Ocean and Atlantic, through US backbone networks, into Virginia.
  • Step 7Server processes request, sends encrypted response packets routed back to Nairobi through the same infrastructure.
  • Step 8Browser reassembles packets, decrypts HTTPS content, renders the page. Total elapsed time: typically under one second.
Every concept in this chapter — packets, IP, DNS, protocols, TCP, routers, HTTPS — participates in delivering a single web page.
Worked Example 19-W2
Calculating download time and analyzing latency tradeoffs
  • SetupConnection A: 100 Mbps bandwidth, 20 ms latency. Connection B: 10 Mbps bandwidth, 5 ms latency. File size: 50 MB.
  • Convert50 MB = 50 × 8 = 400 Megabits
  • Download A400 Mbits ÷ 100 Mbps = 4 seconds + ~60 ms setup overhead ≈ 4.06 seconds
  • Download B400 Mbits ÷ 10 Mbps = 40 seconds + ~15 ms setup overhead ≈ 40 seconds
  • For gamingConnection B (5 ms) feels far more responsive than Connection A (20 ms), even though A has 10× the bandwidth. For gaming, latency is the critical variable.
  • ConclusionBandwidth and latency are independent measurements. Neither alone tells the complete story.
Choose the performance metric that matches your application's bottleneck.

Concept Check

Answer each in one to three sentences.

  1. What is the difference between a LAN and a WAN?
  2. Why do networks use packets rather than sending information as a single continuous stream?
  3. What two functions does an IP address serve?
  4. What problem does DNS solve, and why would the internet be difficult to use without it?
  5. What is the difference between TCP and UDP? Give one application where each is appropriate.
  6. What does a router do when it receives a packet?
  7. Explain the difference between bandwidth and latency. Why does high bandwidth not guarantee low latency?
  8. What is cloud computing, and what are two reasons it became widely adopted?

Practice Questions

Level 1Vocabulary and Recognition
  1. Which of the following is a valid IPv4 address? Explain why the others are not.
    a) FF80:0000:0000:0000:0202:B3FF:FE1E:8329    b) 192.168.1.256    c) 10.0.0.1    d) www.example.com
  2. What does the acronym DNS stand for, and what does DNS do?
  3. Identify the TCP/IP layer responsible for each function:
    a) Physically transmitting bits across a cable    b) Adding source and destination IP addresses    c) Ensuring reliable delivery and retransmitting lost packets    d) Formatting an HTTP request for a web page
  4. True or false: The internet is a single network owned and operated by one organization.
  5. What unit is bandwidth typically measured in? Give three examples at different scales.
Level 2Application and Explanation
  1. A packet has a sequence number of 7 out of 10 total packets. What is the purpose of the sequence number? What would happen if packets arrived out of order without sequence numbers?
  2. Explain what happens during a DNS lookup when the recursive resolver has no cached answer.
  3. A student runs traceroute to a server and sees 18 hops with 120 ms final latency. Another student sees 6 hops with 40 ms. What might explain the difference?
  4. A company wants employees in three cities to share a central database. What type of network would connect these offices? What technologies might the company use?
  5. Why does IPv6 exist? What specific problem does it solve that IPv4 could not?
Level 3Analysis and Design
  1. A small business streams live video from a security camera to a recording server. The stream uses UDP rather than TCP. Explain why UDP is a reasonable choice, and identify one risk it introduces.
  2. A web service is accessed by users in many countries. Its origin server is in the United States. Users in Asia report slow load times. What technique would you recommend, and why would it help?
  3. An ISP reports that a fiber optic cable was cut. Packets that normally passed through it are being rerouted. Explain the mechanism that allows the internet to reroute automatically.
  4. Compare a 5 Mbps connection with 10 ms latency to a 100 Mbps connection with 200 ms latency. For each application below, which connection provides a better user experience? Justify each answer.
    a) Downloading a 1 GB game update    b) Playing a real-time online game    c) Video calling a colleague
  5. Design a simple network for a small school with two computer labs (20 computers each), a library (5 computers), and administrative offices (8 computers). Describe the types of network components you would use and how they would connect.

Debugging and Error Analysis

Each item contains an error. Identify it and write the correct statement.

Error 1
"When you send a large file, it travels as a single continuous stream from your device to the destination."

What is wrong? What is the correct description of how large files travel across a network?

Error 2
"An IP address is a human-readable name like www.example.com used to identify a device on a network."

Identify two errors in this statement and correct both.

Error 3
"DNS translates IP addresses into domain names so that devices can route packets across the internet."

What is wrong with both the direction of translation and the stated purpose?

Error 4
"TCP is the preferred protocol for live video streaming because it guarantees delivery of every packet."

Explain why this is incorrect and which protocol is typically preferred for live streaming. Why?

Error 5
"Bandwidth measures how long it takes a packet to travel from source to destination."

What does bandwidth actually measure? What term describes the travel time?

Error 6
"A router connects devices within a single local network, while a switch forwards packets between different networks."

The roles of router and switch are reversed. Write the correct description of each.

Error 7
"IPv6 was created because IPv4 did not support wireless networks."

What was the actual reason IPv6 was developed?

Design and Application Questions

  1. Packet Design: Suppose you are designing a packet format for a text messaging system. Messages are at most 160 characters. What fields would you include in the header? Justify each field you include.
  2. DNS Failure Scenario: A company's authoritative nameserver crashes. Describe what happens when a new user tries to visit the company's website. What would users experience? What should the company have done to prevent this?
  3. Network Diagram: Draw a simple network for a small apartment with three devices — a laptop, a phone, and a smart TV — plus a connection to the internet through an ISP. Label each component and the links between them.
  4. Protocol Selection: For each application below, recommend TCP or UDP and explain your reasoning.
    a) A file transfer application that must not lose any data
    b) A multiplayer first-person game where a few lost frames are acceptable
    c) Online banking transactions
    d) A live radio broadcast over the internet
  5. Latency Analysis: A student connects to the internet using a satellite service with 650 ms round-trip latency. List three internet activities that would be noticeably affected and three that would be largely unaffected. Explain your reasoning for each.

Real-World Applications

  1. Streaming Buffers: When you watch a video on a streaming service, the player fills a buffer before beginning playback. Why does the player buffer before starting? What would happen if the player displayed each packet immediately as it arrived?
  2. Cloud Storage: When you save a document to a cloud storage service, where does the file actually go? Describe the network path and explain why the file is accessible from a different device elsewhere.
  3. Gaming Ping: Competitive online games report a "ping" measurement — the round-trip time between the player's device and the game server. Explain why latency matters more than bandwidth for gaming, and describe what a player would experience at 400 ms ping versus 15 ms ping.
  4. Network Resilience: In 2011, a backhoe accidentally severed several undersea fiber optic cables in the Red Sea, disrupting internet service for millions of users across the Middle East and South Asia. Yet many services were eventually rerouted within hours. Explain why the internet could partially recover from this failure and why recovery was not immediate or complete.
  5. Content Delivery: A company publishes software updates downloaded by millions of users worldwide. Without optimization, all users would download from a single server, which would be overwhelmed and slow for distant users. Describe how a CDN solves this problem and what tradeoffs it might introduce.
  6. Mobile Networks: When you connect to the internet using cellular data, your phone connects to a cell tower, which connects to the provider's network, which connects to the internet. How does this differ from home Wi-Fi? What challenges do mobile networks face that wired networks do not?

Mixed Review

These questions draw on earlier chapters alongside Chapter 19.

  1. (Chapter 4, Chapter 19) Data traveling across a network link is ultimately represented as bits. If a fiber optic cable transmits data as pulses of light, what does one pulse represent? What does the absence of a pulse represent? How does this connect to binary representation?
  2. (Chapter 5, Chapter 19) DNS resolution is an algorithm. Write pseudocode describing the steps a recursive resolver takes to resolve a domain name, including the case where a cached answer is available and where it is not.
  3. (Chapter 8, Chapter 19) Packet reassembly at the destination requires checking whether all expected packets have arrived. Write pseudocode describing how a receiver might check that it has received all packets in a file transfer of exactly N packets, where each packet has a sequence number from 1 to N.
  4. (Chapter 13, Chapter 19) The TCP/IP protocol stack is an example of abstraction. Explain how the layering of protocols illustrates abstraction. What details does the application layer not need to know about the network access layer?
  5. (Chapter 21 preview, Chapter 19) HTTPS encrypts communication between a browser and a web server. Why is this important for security? What could a malicious party potentially do if they intercepted unencrypted HTTP traffic between a user and a banking website?

Chapter 19 Checkpoint

Chapter 19 Checkpoint
Complete without assistance — assesses all key skills and concepts from Chapter 19
Section 1 — Vocabulary and Concepts
  1. Define packet and identify the two main sections every packet contains.
  2. What is the difference between a LAN and a WAN? Give one example of each.
  3. Explain what DNS does and why it is necessary.
  4. Define bandwidth and latency. For which metric is satellite internet notably weak?
Section 2 — Protocols and Addressing
  1. Name the four layers of the TCP/IP model and one example protocol at each layer.
  2. A developer is building a live video streaming service. Should the video stream use TCP or UDP? Justify your answer.
  3. Why was IPv6 necessary? How many addresses does it support compared to IPv4?
  4. What does NAT do? Why is it useful for home networks?
Section 3 — Routers and Performance
  1. How does a router decide where to forward a packet?
  2. In a traceroute output, the round-trip time jumps from 18 ms at hop 6 to 130 ms at hop 7. What does this likely indicate?
  3. A user complains that their internet connection downloads files quickly but online games feel laggy. Which metric — bandwidth or latency — is the likely problem? Explain.
Section 4 — Cloud and Applications
  1. A small business uses email hosted by Google, a virtual server rented from AWS, and a custom application running on a managed database platform. Classify each as IaaS, PaaS, or SaaS and explain your reasoning.
  2. Explain how a CDN reduces latency for users who are geographically far from the origin server.
  3. Trace the path of a simple HTTPS web page request from the moment the user presses Enter to the moment the page begins rendering. Name at least four concepts from this chapter that are involved.
MGU Library Connection
  • Network Packet Path Diagram — Appendix H of this textbook
  • DNS Guide — Appendix H of this textbook
  • Internet vs. Web Guide — companion reference page
  • Chapter 20: The World Wide Web — continues directly from this chapter
  • Chapter 21: Cybersecurity Foundations — builds on network concepts introduced here
  • Networking Foundations (later MGU course) — treats protocols, routing, and subnetting in depth
  • MGU Dictionary entries: packet, IP address, DNS, protocol, router, bandwidth, latency, cloud computing
Looking Ahead
Chapter 20: The World Wide Web

Chapter 19 explained the infrastructure that carries packets between devices — the internet. Chapter 20 introduces the World Wide Web: one of the most important services built on top of that infrastructure. The internet and the web are not the same thing, even though they are often confused. The internet is the infrastructure — cables, routers, protocols, addressing. The web is one set of services built on that infrastructure, using HTTP to request and deliver linked documents and applications. Chapter 20 will explain how browsers communicate with servers, what URLs contain, how HTML, CSS, and JavaScript work together to build what you see on screen, what distinguishes web pages from web applications, how search engines work, and what web accessibility means. Every concept from Chapter 19 — IP addresses, DNS, TCP, HTTPS, packets — applies directly to Chapter 20.