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.
- 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.
📦 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.
🛰 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
📣 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:
- You type a URL into your browser.
- Your computer asks a DNS server for the matching IP.
- Your computer connects to that IP address.
🔁 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
🔐 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).
🛠 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
📝 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
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
Learn About Tutoring