AP Computer Science Principles • Computing Systems and Networks

The Internet

A global, fault-tolerant network of networks that moves data through layered protocols and open standards.

Computer science principles illustration with a network, database, and code file
Inside this lesson 10 sections 5 questions 7 figures

SECTION 1

Historical Context & Motivation

The Internet did not emerge from a single invention but rather from decades of research into distributed communication systems that could survive partial failures. During the Cold War, the United States Department of Defense funded research into networks that lacked a single point of failure, because a centralized hub-and-spoke telephone system could be incapacitated by a single strike. The fundamental question driving this research was deceptively simple: how can autonomous computers owned by different organizations exchange data reliably across unreliable physical links? The answer—a layered, packet-switched architecture governed by open standards—became the foundation of the modern Internet and reshaped virtually every domain of human activity.

1969 • ARPANET Goes Online

The Advanced Research Projects Agency Network (ARPANET) connected four university nodes using packet switching, proving that computers could communicate without dedicated circuit connections.

1983 • TCP/IP Becomes the Standard

ARPANET adopted TCP/IP (Transmission Control Protocol / Internet Protocol) as its mandatory communication protocol suite, enabling heterogeneous networks to interconnect—the birth of the Internet as a network of networks.

1991 • The World Wide Web

Tim Berners-Lee at CERN released the World Wide Web, an application layer system of hyperlinked documents accessed via HTTP—making the Internet usable for a global, non-technical audience.

2007 • Mobile Internet Explosion

The launch of smartphones with full web browsers catalyzed a shift to mobile-first Internet access. Today, more than half of all global web traffic originates from mobile devices.

2020s • IoT & Ubiquitous Connectivity

Billions of Internet of Things (IoT) devices—from sensors to vehicles—now communicate over the Internet, straining the address space of IPv4 and accelerating the transition to IPv6.

From four university nodes in 1969 to billions of connected devices today, the Internet's growth raises a central question for AP Computer Science Principles: what design decisions allow such a massive, decentralized system to function reliably without any single entity controlling it? Understanding the Internet's architecture—its protocols, addressing schemes, routing strategies, and layers of abstraction—is essential for evaluating the benefits, risks, and societal impacts of our increasingly connected world.

SECTION 2

Core Principles & Definitions

The Internet is built on a small set of powerful design principles that enable scalability, fault tolerance, and openness. These principles distinguish it from earlier centralized communication systems and explain why it has been able to grow exponentially without a master redesign. Understanding these foundations is critical for the AP CSP exam, which emphasizes how the Internet's open, layered architecture affects computing innovation and society at large.

1

Packet Switching

Data is broken into small packets that travel independently across the network and are reassembled at the destination. Unlike circuit switching, no dedicated path is reserved, so bandwidth is shared efficiently among many users.
2

Open Protocols & Standards

The Internet relies on publicly documented protocols—agreed-upon rules for data formatting and transmission—such as TCP/IP, HTTP, and DNS. Open standards ensure that any manufacturer's hardware or software can participate in the network.
3

Redundancy & Fault Tolerance

The Internet has multiple paths between any two nodes. If one router or link fails, packets are automatically rerouted along alternative paths, making the network fault tolerant.
4

Scalability

The hierarchical, decentralized design allows new devices and entire networks to join without restructuring existing infrastructure. This scalability has supported growth from four nodes to billions.
5

Layered Abstraction

Network functions are organized into distinct layers (application, transport, internet, link). Each layer provides services to the layer above it and relies on the layer below, allowing independent evolution of technologies at each level.
✦

KEY TAKEAWAY

Think of the Internet like a postal system on a global scale. A letter (packet) has a destination address, travels through multiple sorting facilities (routers), and may take a different route each time you send one. No single post office controls the entire system, yet the letter arrives because every participant follows the same addressing conventions (protocols). If one sorting facility closes, mail is rerouted through another—the system is fault tolerant by design.

SECTION 3

How Packets Travel: A Visual Explanation

The following diagram illustrates the journey of data from a sending device to a receiving device across the Internet. Notice the multiple possible paths between routers—this redundancy is what makes the Internet fault tolerant. When a user sends a message, the data is divided into packets, each of which carries a source IP address, a destination IP address, and a sequence number so that the receiving device can reassemble the message even if packets arrive out of order.

Packet Journey Across the InternetSender192.168.1.5Receiver203.0.113.42R1R2R3R4R5R6R7Packet HeaderSRC: 192.168.1.5DST: 203.0.113.42SEQ: 3 of 5DATA...Cyan path = one possible route; dashed lines = alternate pathsRouters (R1–R7)
The diagram shows a sender transmitting packets through a mesh of routers (R1–R7) to a receiver. The cyan arrows trace one possible route, while gray lines represent alternative paths. If R3 fails, packets can still reach the receiver via R4 and R7. Each packet carries a header containing the source address, destination address, sequence number, and a data payload.

Several critical details emerge from this visualization. First, no single router sees the entire path; each router examines only the destination IP address in the packet header and forwards the packet to the next best hop based on its own routing table. Second, different packets from the same message may take entirely different routes and still arrive at the destination, where they are reordered using sequence numbers. Third, this redundant topology means the loss of a single router or link does not disconnect the network—exactly the fault tolerance the Internet was designed to achieve.

SECTION 4

Protocols & the Layered Architecture

The Internet's functionality is organized into a layered model where each layer handles a specific aspect of communication. The AP CSP framework emphasizes the Internet protocol suite (commonly called TCP/IP), which defines four primary layers. Layering is a form of abstraction: a web developer writing HTML does not need to understand how electrical signals propagate through fiber-optic cable, just as a network engineer configuring routers does not need to know the content of the web pages being transmitted. This separation of concerns enables independent innovation at each layer.

The Four Layers of TCP/IP

LayerPurposeKey Protocols / Examples
ApplicationProvides services directly to users and applications (web browsing, email, streaming)HTTP/HTTPS, SMTP, DNS, FTP
TransportManages end-to-end communication, breaking data into segments, ensuring reliable or fast deliveryTCP (reliable, ordered) and UDP (fast, no guarantee)
InternetHandles logical addressing and routing of packets across networksIP (IPv4, IPv6), ICMP
Network Access / LinkGoverns physical transmission of bits over a specific medium (copper, fiber, wireless)Ethernet, Wi-Fi (802.11), Bluetooth

The four layers of the TCP/IP model, from highest abstraction (Application) to lowest (Link)

Key Protocols in Detail

IP (Internet Protocol) is the addressing system that assigns every device a unique logical address. IPv4 addresses are 32 bits long, expressed in dotted-decimal notation (e.g., 192.168.1.5), providing approximately 2³² ≈ 4.3 billion unique addresses. Because this space is nearly exhausted, IPv6 uses 128-bit addresses (e.g., 2001:0db8:85a3::8a2e:0370:7334), offering 2¹²⁸ ≈ 3.4 × 10³⁸ addresses—enough to assign a unique address to every atom on the Earth's surface many times over.

TCP (Transmission Control Protocol) operates at the transport layer and guarantees reliable, ordered delivery by requiring acknowledgments from the receiver. If a packet is lost, TCP retransmits it. In contrast, UDP (User Datagram Protocol) sacrifices reliability for speed—no acknowledgments, no retransmission—making it ideal for real-time applications like video streaming or online gaming where a dropped frame is preferable to a delayed one.

DNS (Domain Name System) translates human-readable domain names (e.g., www.example.com) into IP addresses. DNS functions as a distributed hierarchical database: your device queries a local resolver, which may query root servers, top-level domain servers, and authoritative name servers in succession until the corresponding IP address is found.

HTTP/HTTPS (HyperText Transfer Protocol / Secure) is the application-layer protocol used for web communication. HTTP defines how a client (browser) requests a resource and how a server responds. HTTPS adds a layer of encryption via TLS (Transport Layer Security), protecting data in transit from eavesdropping and tampering. When you see a padlock icon in your browser's address bar, your connection is using HTTPS.

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.

SECTION 5

IP Addressing, DNS, and Routing

Every device on the Internet needs a unique address for packets to find it, just as every house needs a street address for mail delivery. This section examines how IP addressing works, how domain names map to those addresses, and how routers decide which path to forward each packet along.

DNS Resolution & Packet RoutingStep-by-step: what happens when you type a URL and press EnterYour Browser192.168.1.5Local DNSResolverRoot DNSServerTLD Server.comAuthoritativeDNS Server① Query②③④⑤ IP returned203.0.113.42⑥ HTTP Request via TCP/IPBrowserISPR1R2R3ServerPackets hop through ISP and backbone routers to reach the web server⑦ HTTP Response (HTML, CSS, JS) returned to browser
This diagram traces the full lifecycle of a web request. Steps ①–⑤ show DNS resolution: the browser queries the local resolver, which cascades through root, TLD, and authoritative servers to obtain the IP address. Step ⑥ shows the actual HTTP request traveling as TCP/IP packets through routers. Step ⑦ shows the server's response returning along a (potentially different) path.

IPv4 vs. IPv6 Address Space

IPV4 ADDRESS SPACE

232=4,294,967,296addresses≈4.3×1092³² = 4,294,967,296 addresses ≈ 4.3 × 10⁹

Each IPv4 address is 32 bits, written as four octets in decimal (e.g., 172.16.0.1). This space is virtually exhausted.

IPV6 ADDRESS SPACE

2128≈3.4×1038addresses2¹²⁸ ≈ 3.4 × 10³⁸ addresses

Each IPv6 address is 128 bits, written as eight groups of four hexadecimal digits (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334). This provides essentially unlimited addresses for future growth.

Routing is the process by which routers determine the best next hop for each packet. Each router maintains a routing table that maps destination address prefixes to outgoing interfaces. Routers exchange information using routing protocols (such as BGP for inter-domain routing) so that their tables stay current as the network topology changes. Importantly, routing is dynamic: if a link goes down, routers update their tables and packets automatically flow along an alternative path. This dynamic rerouting is the mechanism behind the Internet's fault tolerance.

SECTION 6

Worked Example: Tracing a Web Request

Let us trace exactly what happens, layer by layer, when a user types https://www.example.com/index.html into a browser and presses Enter. This worked example integrates DNS, TCP, IP, HTTP, and encryption into a single coherent narrative.

Tracing a Web Request End-to-End

  1. 1

    Step 1 — DNS Lookup

    The browser extracts the domain name www.example.com from the URL. It checks its local cache; if the IP address is not cached, it queries the operating system's DNS resolver, which in turn queries upstream DNS servers (root → .com TLD → authoritative server for example.com).
    DNS returns the IP address 93.184.216.34
  2. 2

    Step 2 — TCP Three-Way Handshake

    The browser initiates a TCP connection to 93.184.216.34 on port 443 (HTTPS). A three-way handshake occurs: the client sends a SYN packet, the server responds with SYN-ACK, and the client replies with ACK. This establishes a reliable, ordered connection.
    TCP connection established (SYN → SYN-ACK → ACK)
  3. 3

    Step 3 — TLS Handshake (HTTPS Encryption)

    Because the URL uses https://, a TLS handshake follows. The server presents its digital certificate, the browser verifies it against trusted certificate authorities, and both sides negotiate symmetric encryption keys. All subsequent data is encrypted.
    Secure encrypted channel established via TLS
  4. 4

    Step 4 — HTTP GET Request

    The browser sends an HTTP GET request for /index.html. This request is broken into TCP segments, each wrapped in an IP packet with source and destination addresses. Routers along the path forward each packet independently based on the destination IP address.
    HTTP GET /index.html sent inside encrypted TCP segments within IP packets
  5. 5

    Step 5 — Server Response & Rendering

    The server processes the request and returns an HTTP response (status code 200 OK) with the HTML content in the body. The response packets travel back (possibly via a different route), are reassembled by TCP at the client, decrypted by TLS, and parsed by the browser to render the web page.
    Browser receives HTML, renders the page for the user
💡

AP Exam Tip

The AP CSP exam expects you to understand the roles of DNS, TCP, IP, and HTTP, and how they work together rather than in isolation. A common question pattern provides a scenario and asks which protocol is responsible for a specific function—for instance, 'Which protocol ensures packets arrive in the correct order?' (Answer: TCP).

SECTION 7

Strengths, Limitations & Security Considerations

The Internet's design choices yield tremendous strengths but also create vulnerabilities and trade-offs. Understanding both sides is essential for AP CSP questions about the benefits and harms of computing innovations, as well as questions about cybersecurity.

StrengthsLimitations / Risks
Fault tolerance — Redundant paths mean no single point of failure can bring down the network.Security was not built in — IP was designed for openness, not confidentiality. Protocols like TLS were added later.
Scalability — Hierarchical addressing and decentralized design support billions of devices.IPv4 exhaustion — 4.3 billion addresses are insufficient; transition to IPv6 is slow and incomplete.
Open standards — Anyone can build devices and software that interoperate, fostering innovation.DNS vulnerabilities — DNS spoofing and DDoS attacks on DNS servers can redirect or deny access.
Layered abstraction — Each layer can evolve independently (e.g., switching from copper to fiber without changing TCP).Digital divide — Unequal access to high-speed Internet creates disparities in education, employment, and civic participation.
Packet switching efficiency — Bandwidth is shared dynamically, avoiding the waste of circuit-switched networks.Privacy and surveillance — Packet metadata (IP addresses, timestamps) can be logged, enabling tracking even when content is encrypted.

Key strengths and limitations of Internet architecture

✦

KEY TAKEAWAY

The Internet's greatest strength—its openness—is also its greatest vulnerability. Just as an open public square enables both free speech and pickpocketing, the Internet's open protocols enable both global collaboration and cyberattacks. Security measures like HTTPS, firewalls, and multi-factor authentication are essentially aftermarket locks installed on a building originally designed without doors. Recognizing this trade-off is essential for AP CSP questions about the societal impact of the Internet.

SECTION 8

Connection to Advanced Topics

The AP CSP curriculum introduces the Internet at a conceptual level, but many of these ideas extend into more advanced topics in computer science and networking. Understanding where the AP-level content fits within the broader landscape helps contextualize exam questions and prepares you for further study.

AP CSP Level ConceptAdvanced Extension
Packets are routed through the networkRouting algorithms (Dijkstra's, BGP path selection) optimize path cost, latency, and policy constraints
TCP provides reliable deliveryTCP congestion control (slow start, congestion avoidance) prevents network collapse under heavy traffic
DNS translates names to IPsDNSSEC adds cryptographic signatures to prevent spoofing; Content Delivery Networks (CDNs) use DNS for geographic load balancing
HTTPS encrypts dataPublic-key cryptography, certificate chains, and the TLS 1.3 handshake involve complex mathematics (RSA, elliptic curves)
The Internet is a network of networksAutonomous Systems (ASes), Internet Exchange Points (IXPs), and peering agreements define the Internet's economic and structural topology

How AP CSP concepts map to advanced networking topics

Looking ahead, emerging technologies continue to build upon and challenge the Internet's original design. Edge computing moves processing closer to users to reduce latency. Software-defined networking (SDN) separates the control plane from the data plane, enabling programmable network management. 5G and satellite Internet expand connectivity to underserved regions. All of these innovations rely on the same foundational protocols and layered architecture you have studied in this lesson—demonstrating the enduring power of the Internet's original design principles.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

A user sends a large file from Computer A to Computer B across the Internet. The file is split into multiple packets. Which of the following best explains why different packets from the same file might take different paths to reach Computer B?
  • A. Each packet is assigned a random destination IP address by the sender.
  • B. Routers independently determine the best next hop for each packet based on current network conditions.
  • C. The Internet Protocol reserves a dedicated circuit for each packet separately.
  • D. The sending computer selects different paths for each packet before transmission.
Show answer (B)
B is correct. In a packet-switched network, each router makes an independent forwarding decision for each packet based on its routing table and current network conditions (congestion, link failures). This means two packets with the same destination IP may take different routes. A is incorrect because all packets share the same destination IP address—it is not randomized. C is incorrect because the Internet uses packet switching, not circuit switching; no dedicated circuit is reserved. D is incorrect because the sender does not choose the path—routers along the way make those decisions.

Question 2: BASIC

A company's web server has the domain name shop.example.com. When a user types this domain into a browser, which system is primarily responsible for determining the IP address of the server?
  • A. HTTP (HyperText Transfer Protocol)
  • B. TCP (Transmission Control Protocol)
  • C. DNS (Domain Name System)
  • D. TLS (Transport Layer Security)
Show answer (C)
C is correct. DNS is the system that translates human-readable domain names into IP addresses. It operates as a distributed hierarchical database. A is incorrect because HTTP handles the request/response cycle for web content after the IP address is already known. B is incorrect because TCP manages reliable data delivery (sequencing, acknowledgments) but does not resolve domain names. D is incorrect because TLS provides encryption for secure connections and has nothing to do with name-to-address translation.

Question 3: INTERMEDIATE

A network engineer removes one of three redundant connections between two parts of a network. Which TWO of the following are true about the effect on the network?
  • A. The network can still function because redundant paths remain available for routing.
  • B. All data currently being transmitted through the removed connection is permanently lost.
  • C. The network's fault tolerance is reduced because there are fewer alternative paths.
  • D. DNS will no longer be able to resolve domain names for devices on the network.
Show answer (A,C)
A and C are correct. A is correct because two redundant paths still exist, so routers can forward packets along the remaining connections. C is correct because removing a path reduces the number of alternative routes, thereby reducing fault tolerance—if another link fails, there is now only one remaining path rather than two. B is incorrect because TCP retransmits lost packets; data in transit is not permanently lost (TCP ensures reliability through acknowledgments and retransmission). D is incorrect because DNS resolution is independent of the number of physical connections between network segments; as long as at least one path exists to a DNS server, name resolution will work.

Question 4: APPLIED

3 pts
A school streams a live video of a graduation ceremony over the Internet to families who cannot attend. (a) Identify one protocol from the transport layer and explain why it would be a better choice than the alternative for this live streaming scenario. (b) Explain how the hierarchical structure of DNS contributes to the scalability of the Internet. (c) The school's network has only one connection to its Internet Service Provider (ISP). Describe one way this single connection could affect the stream's reliability and propose a solution.
Show answer
Rubric (3 points): Point 1 (Part a): UDP is the better choice for live streaming. Unlike TCP, UDP does not wait for acknowledgments or retransmit lost packets, which would cause delays. For a live stream, a brief dropped frame is less disruptive than the lag introduced by TCP's retransmission, so UDP's low-latency delivery is preferred. (Must name UDP, explain low-latency benefit, and contrast with TCP's retransmission overhead.) Point 2 (Part b): DNS uses a hierarchical structure (root servers → TLD servers → authoritative servers) so that no single server must store every domain name. This distributes the workload and allows new domains to be added without reconfiguring the entire system, directly enabling scalability. (Must reference the hierarchical/distributed nature and explain how it supports growth.) Point 3 (Part c): A single connection to the ISP creates a single point of failure; if that link goes down, the stream is completely interrupted. A solution is to add a second connection to a different ISP (redundant link), which provides fault tolerance by enabling traffic to reroute if the primary link fails. (Must identify the single-point-of-failure risk and propose a solution that adds redundancy.)

Question 5: CRITICAL THINKING

4 pts
The Internet was originally designed as an open, decentralized system with no central authority controlling data flow. (a) Explain how the Internet's use of open protocols has enabled innovation. Provide a specific example. (b) Describe one cybersecurity concern that arises from the Internet's open design and explain how a specific protocol or technology addresses it. (c) The "digital divide" refers to unequal access to Internet connectivity. Explain how the digital divide relates to at least one Internet design characteristic discussed in this lesson. (d) Some governments implement Internet censorship by manipulating DNS responses to block access to certain websites. Explain the technical mechanism behind this form of censorship and discuss one potential consequence for users.
Show answer
Rubric (4 points): Point 1 (Part a — Open Protocols and Innovation): The response must explain that open protocols are publicly documented standards that allow anyone to build compatible hardware or software without needing permission from a central authority. A specific example must be provided. For example, the HTTP protocol is openly published, which allowed Tim Berners-Lee to create the World Wide Web and enabled millions of developers to build websites and web applications. Other valid examples include email built on SMTP, or any application that builds on TCP/IP. To earn this point, the response must explicitly connect open standards to innovation and include a specific, named example. Point 2 (Part b — Cybersecurity Concern and Mitigation): The response must identify a specific cybersecurity concern arising from the Internet's open design and name a protocol or technology that addresses it. For example, data transmitted in plaintext over unencrypted HTTP can be intercepted and read by anyone along the packet's path (a "man-in-the-middle" attack). HTTPS, which uses TLS to encrypt data between the browser and server, addresses this by ensuring confidentiality and integrity—even if packets are intercepted, their content cannot be read without the decryption key. To earn this point, the response must identify a specific security concern, name a protocol or technology, and explain how it mitigates the concern. Point 3 (Part c — Digital Divide and Internet Design): The response must connect the digital divide to at least one specific Internet design characteristic and explain the gap between logical design and physical reality. For example, although the Internet is designed to be scalable and decentralized at the protocol level, physical infrastructure (fiber-optic cables, cell towers, ISPs) is not evenly distributed. Physical deployment depends on economic investment, so rural and low-income communities may lack the infrastructure needed for high-speed Internet access, creating a digital divide despite the protocol-level openness. To earn this point, the response must reference a specific design characteristic (e.g., scalability, decentralization) and explain why it does not guarantee equitable physical access. Point 4 (Part d — DNS Censorship Mechanism and Consequence): The response must explain the technical mechanism of DNS-based censorship and identify at least one consequence for users. DNS-based censorship works by configuring government-controlled DNS resolvers to return incorrect IP addresses (or no address at all) when a user queries a blocked domain name. Instead of receiving the real server's IP address, the user is redirected to a block page or receives an error. A consequence is that users lose access to information and services, undermining the Internet's role as an open communication platform. Other valid consequences include: users who circumvent censorship using VPNs or alternative DNS servers may face legal penalties, and the unreliability of manipulated DNS responses erodes trust in the DNS system itself. To earn this point, the response must describe how DNS responses are manipulated and state at least one specific consequence.

SUMMARY

Lesson Summary

Summary

The Internet is a global network of networks built on packet switching, open protocols, and layered abstraction. Data is divided into packets, each carrying source and destination IP addresses, and routed independently through a mesh of routers that provide fault tolerance via redundant paths. The TCP/IP protocol suite organizes communication into four layers—Application, Transport, Internet, and Link—each handling a distinct responsibility so that technologies at one layer can evolve without disrupting others.

Key protocols include DNS (translating domain names to IP addresses), TCP (reliable, ordered delivery) and UDP (fast, best-effort delivery), and HTTP/HTTPS (web communication with optional TLS encryption). The transition from IPv4 (2³² addresses) to IPv6 (2¹²⁸ addresses) addresses the exhaustion of the original address space. While the Internet's openness enables global innovation and scalability, it also creates challenges including cybersecurity vulnerabilities, privacy concerns, and the digital divide—unequal access that limits participation in the digital economy.

Varsity Tutors • AP Computer Science Principles • The Internet