01 / 21

The Internet

Explore how the Internet works: from protocols and packets to routing, DNS, and the layered architecture that connects billions of devices worldwide.

AP Computer Science Principles

What Is the Internet?

The Internet is a network of networks: a global system of interconnected computing devices that communicate using standardized protocols. It is not a single entity owned by anyone, but a decentralized, open system.

Essential Vocabulary

Protocol
An agreed-upon set of rules that define how data is formatted, transmitted, and received between devices.
Packet
A small chunk of data sent across a network. Large messages are split into many packets for efficient delivery.
Bandwidth
The maximum amount of data that can be transmitted over a connection in a given time, measured in bits per second.

How Devices Connect

Device A Router 1 Router 2 Router 3 Device B Multiple paths exist between A and B PKT PKT

The TCP/IP Protocol Stack

Application Layer HTTP, DNS, FTP, SMTP Transport Layer TCP, UDP Internet Layer IP (addressing & routing) Network Access Layer Ethernet, Wi-Fi, physical signals

The physical layer beneath a web request

A home computer, street conduits with cables, and server equipment appear in one infrastructure cutaway.A web request depends on physical cables and equipment as well as protocols. The network-access layer carries bits; IP handles routing, while application protocols define the request and response.

IP Addresses & DNS

Every device on the Internet is assigned a unique IP address. The Domain Name System (DNS) translates human-readable domain names into IP addresses so you don't have to memorize numbers.

IPv4
32-bit addresses, written as four octets: 192.168.1.1. Supports \( 2^{32} \approx 4.3 \) billion addresses.
IPv6
128-bit addresses, written in hexadecimal groups: 2001:0db8::1. Supports \( 2^{128} \) addresses.

Packets & Routing

Original Message PKT 1 PKT 2 PKT 3 Routers (different paths) Reassembled Message Split into packets Packets reassembled

TCP vs UDP

TCP UDP
Full Name Transmission Control Protocol User Datagram Protocol
Connection Connection-oriented Connectionless
Reliability Guarantees delivery & order No guarantee of delivery
Speed Slower (overhead) Faster (less overhead)
Use Cases Web pages, email, file transfer Live video, gaming, VoIP

HTTP & HTTPS

HTTP (HyperText Transfer Protocol) defines how web browsers and servers communicate. HTTPS adds encryption via TLS/SSL, protecting data in transit.

HTTP
Data sent in plaintext. Anyone intercepting the traffic can read the contents. Not secure for sensitive data.
HTTPS
Data is encrypted before transmission. Uses certificates to verify server identity. Standard for modern websites.

Scalability & Fault Tolerance

1
Redundancy: multiple physical paths between any two points mean a single cable or router failure doesn't take down the network.
2
Scalability: new devices and networks can be added without redesigning the existing infrastructure, thanks to standardized protocols.
3
Packet switching: data is broken into packets routed independently, so many conversations share the same links efficiently.
4
Hierarchical design: ISPs connect to regional networks, which connect to the global backbone, allowing growth at every level.

How DNS Resolution Works

1
You type a URL into your browser (e.g., www.collegeboard.org).
2
Your computer checks its local cache. If the IP isn't cached, a DNS query is sent to a recursive resolver (usually your ISP).
3
The resolver queries root servers → TLD servers (.org) → authoritative name server for collegeboard.org.
4
The authoritative server returns the IP address. Your browser now connects to that IP using HTTP/HTTPS.

Example: Tracing a Web Request

Your Computer DNS Server ISP Router Internet Backbone Web Server 1. DNS query 2. IP returned 3. Packets to ISP 4. Request 5. Response (HTML, CSS, images)

Example: Bandwidth Calculation

A file is 24 megabytes (MB) and your connection speed is 8 megabits per second (Mbps). How long does the download take?

1
Convert MB to Mb: Since 1 byte = 8 bits, we have \( 24 \text{ MB} \times 8 = 192 \text{ Mb} \).
2
Divide by speed: \( \displaystyle \frac{192 \text{ Mb}}{8 \text{ Mbps}} = 24 \text{ seconds} \).
3
Result: The download takes 24 seconds under ideal conditions (no overhead or congestion).

Example: Redundancy Analysis

A B C D E F Redundant links

Common Mistakes

✕ Confusing Internet and Web
The Internet is the infrastructure (hardware + protocols). The World Wide Web is an application that uses the Internet.
✕ Bits vs Bytes
Bandwidth is in bits/sec. File sizes are in bytes. Forgetting to multiply by 8 leads to answers that are off by 8x.
✕ Assuming a Single Path
Packets can take different routes. The Internet uses dynamic routing: there is no single fixed path between two devices.

Summary of Key Concepts

Concept What It Does Why It Matters
IP Address Uniquely identifies a device Enables packet routing
DNS Translates domains to IPs Human-friendly navigation
TCP Reliable, ordered delivery Accurate data transfer
UDP Fast, no-guarantee delivery Real-time applications
HTTP/HTTPS Web communication protocol HTTPS encrypts data
Packets Small data chunks routed independently Efficient use of network

Question 1 of 5

Which protocol is responsible for breaking data into packets, ensuring reliable delivery, and reassembling them at the destination?

Question 2 of 5

A 16 MB file is downloaded over a 32 Mbps connection. Assuming ideal conditions, how long does the download take?

Question 3 of 5

What is the primary purpose of the Domain Name System (DNS)?

Question 4 of 5

In a network where there are multiple paths between devices, what happens when one path fails?

Question 5 of 5

Which of the following is true about HTTPS but not about HTTP?