AP CSP Unit 2: The Internet – Complete 2025 Study Guide

AP CSP Unit 2: The Internet — Complete 2025 Study Guide

Welcome to the complete AP Computer Science Principles Unit 2 study guide. This unit explains how the Internet works — from packets and routing to DNS, protocols, cybersecurity, and redundancy. Understanding these ideas is essential for the AP CSP multiple-choice exam.

What you’ll learn on this page:
  • How the Internet moves data using packets and routing
  • The role of IP addresses and DNS
  • The difference between TCP and UDP
  • Fault tolerance and redundancy
  • Cybersecurity basics (certificates, HTTPS, TLS)
  • Common AP-style exam questions
  • Links to practice and further study

🌐 What Is the Internet?

The Internet is a global network of networks that uses open protocols to allow devices to communicate. No single company or organization controls the Internet. Instead, it works because many independent networks agree to use the same open standards.

Key Idea: The Internet is scalable — it can grow easily because it uses standardized, open communication protocols.

📦 Packets: How Data Travels

All data sent across the Internet — images, videos, messages — is broken into small chunks called packets.

Each packet contains:

  • The data itself
  • Destination IP address
  • Packet number & ordering info
  • Error-checking data

Important Concepts:

  • Packets may take different routes to the same destination.
  • Packets may arrive out of order.
  • Packets may be lost and need to be resent.
Exam Tip: Packet switching makes the Internet efficient, fast, and fault tolerant.

🛰 IP Addresses & Routing

Every device connected to the Internet has a unique IP address that identifies it.

Two versions of IP:

  • IPv4 – older, 32-bit addresses (~4.3 billion addresses)
  • IPv6 – newer, 128-bit addresses (≈ 340 undecillion addresses)

Routing

Routers direct data between devices by sending packets along paths with the lowest “cost,” often based on:

  • distance
  • traffic congestion
  • speed / reliability
Key Idea: Routing is dynamic — the path can change at any moment.

📣 DNS: The Internet’s Phone Book

People use domain names (like google.com), but computers use IP addresses. The Domain Name System (DNS) translates human-readable names into machine-readable IP addresses.

How DNS works:

  1. You type a URL into your browser.
  2. Your computer asks a DNS server for the matching IP.
  3. Your computer connects to that IP address.
Exam Tip: DNS is vulnerable to cyberattacks because it was designed long before modern security threats.

🔁 TCP vs UDP

Two key protocols manage how packets are sent:

TCP (Transmission Control Protocol)

  • Reliable
  • Re-sends lost packets
  • Ensures correct order
  • Used for: web pages, email, files

UDP (User Datagram Protocol)

  • Fast
  • No guarantee of delivery
  • Good for live video, gaming, voice
  • Used when speed > perfect accuracy
AP Exam Tip: If accuracy matters → TCP. If speed matters → UDP.

🔐 Cybersecurity: HTTPS, TLS, and Certificates

Security on the Internet depends on encryption and authentication.

HTTPS

Secures communication between browsers and servers.

TLS (Transport Layer Security)

Establishes an encrypted connection using keys.

Digital Certificates

Prove that a website really is who it claims to be. Managed by Certificate Authorities (CAs).

Common Exam Question: How does HTTPS protect privacy? → It encrypts data using public-key cryptography so attackers cannot read intercepted packets.

🛠 Fault Tolerance & Redundancy

The Internet is designed to work even when parts fail.

Redundancy means:

  • Multiple paths between devices
  • If one router fails, packets take another path
  • The network continues functioning
Key AP Concept: The Internet is fault tolerant because of its high redundancy.

📝 AP Exam-Style Practice Questions

Question 1

Which protocol ensures that all packets arrive correctly and in order?

  • A. IP
  • B. DNS
  • C. TCP
  • D. UDP
Correct Answer: C

Question 2

Which statement best describes redundancy?

Answer: Multiple pathways ensure the Internet continues to function even when parts fail.

Need Help? Get AP CSP Tutoring

Work 1-on-1 with a certified AP CSP teacher to master the Internet, cybersecurity, routing, and protocols.

Learn About Tutoring

Contact form