🌐 AP Computer Science Principles
Unit 4.1 — Internet Structure
Topic: Packets, Protocols, and IP Addressing
🎯 Learning Objectives
By the end of this lesson, students should be able to:
- Understand how the Internet is structured.
- Explain how data is broken into packets.
- Describe the role of protocols in communication.
- Understand the purpose of IP addresses.
- Explain how data travels from one computer to another across the Internet.
🌍 What is the Internet?
The Internet is a global network of interconnected computers and networks
that communicate with each other.
Instead of one giant system, the Internet is made up of many smaller networks connected together.
These networks include:
- Home networks
- School networks
- Business networks
- Data centers
- Internet Service Providers (ISPs)
All of these networks communicate using standard rules and technologies.
📦 Packets
When data travels across the Internet, it is not sent all at once.
Instead, the data is broken into small pieces called packets.
Packet Definition
A packet is a small unit of data transmitted over a network.
Each packet contains:
- A piece of the original data
- The destination address
- The source address
- Instructions for reassembling the data
Why Packets Are Used
Packets make communication faster and more reliable.
- Efficient use of network resources
- Multiple communications can share the network
- If a packet is lost, only that packet needs to be resent
Example of Packet Transmission
Imagine sending a large file across the Internet.
- The file is broken into packets.
- Each packet travels independently across the network.
- Packets may take different routes.
- The destination computer reassembles the packets in the correct order.
📡 Routing
Routing is the process of determining the path that packets take across networks.
Devices called routers help direct packets to their destination.
Routers:
- Examine the packet’s destination address
- Decide the best path
- Forward the packet to the next router
Packets may travel through many routers before reaching their destination.
📜 Protocols
A protocol is a set of rules that define how devices communicate over a network.
Protocols ensure that different computers can understand each other.
Without protocols, devices would not know:
- How to format data
- When to send data
- How to check for errors
- How to reassemble packets
Common Internet Protocols
TCP (Transmission Control Protocol)
TCP is responsible for:
- Ensuring packets arrive correctly
- Reordering packets if they arrive out of order
- Requesting missing packets
TCP provides reliable communication.
IP (Internet Protocol)
IP is responsible for:
- Addressing packets
- Routing packets across networks
IP determines where packets need to go.
HTTP / HTTPS
These protocols are used for web communication.
- HTTP = HyperText Transfer Protocol
- HTTPS = Secure HyperText Transfer Protocol
Used when:
- Loading websites
- Sending web data
- Transferring web content
HTTPS adds encryption for security.
🧭 IP Addressing
Every device connected to the Internet needs a unique identifier.
This identifier is called an IP address.
IP Address Definition
An IP address is a unique number assigned to each device on a network.
It allows devices to find and communicate with each other.
Example IPv4 Address
192.168.1.1
IPv4 addresses contain four numbers separated by dots.
Each number ranges from 0 to 255.
Another example:
8.8.8.8
(Google public DNS server)
🆕 IPv6
Because the Internet has grown so much, IPv4 addresses are running out.
To solve this, a new addressing system was created called IPv6.
2001:0db8:85a3:0000:0000:8a2e:0370:7334
IPv6 provides many more possible addresses.
🌐 How Data Travels Across the Internet
Example: Visiting a Website
- You type a website URL into your browser.
- Your computer creates packets containing a request.
- Packets are sent to your Internet Service Provider (ISP).
- Routers direct packets across the Internet.
- The destination server receives the packets.
- The server sends response packets back.
- Your computer reassembles the packets and displays the webpage.
🔑 Key Vocabulary
| Term |
Definition |
| Internet |
Global network connecting millions of networks |
| Packet |
Small unit of data sent across a network |
| Router |
Device that directs packets across networks |
| Protocol |
Set of rules for communication between devices |
| TCP |
Protocol that ensures reliable delivery of packets |
| IP |
Protocol responsible for addressing and routing |
| IP Address |
Unique identifier for a device on a network |
| IPv4 |
Original 32-bit IP addressing system |
| IPv6 |
Newer addressing system with far more addresses |
🧠 Key Takeaways
- The Internet works by sending data in packets.
- Protocols define the rules of communication.
- Routers move packets across networks.
- Every device uses a unique IP address.
- Packets may take different routes but are reassembled correctly at the destination.
AP CSP Exam Tip: The College Board often asks questions about packets traveling
different paths, fault tolerance of the Internet, protocols enabling communication,
and IP addressing and routing.