The Internet & Protocols - Complete Interactive Lesson
Part 1: Core Concepts
๐ Internet Protocols
Part 1 of 7 โ TCP/IP, HTTP, and How the Internet Works
The Protocol Stack
The Internet uses layered protocols, each handling a specific job:
| Layer | Protocol | Purpose |
|---|---|---|
| Application | HTTP, HTTPS, SMTP, FTP | Formats data for user applications |
| Transport | TCP, UDP | Ensures reliable delivery (TCP) or fast delivery (UDP) |
| Internet | IP | Addresses and routes packets across networks |
| Network Access | Ethernet, WiFi | Physical connection and data framing |
๐ Each layer adds its own header to the data (encapsulation). The receiving end removes headers layer by layer.
Key Protocols
IP (Internet Protocol)
- Assigns a unique address to every device
- IPv4: 32-bit addresses (e.g., 192.168.1.1) โ about 4.3 billion addresses
- IPv6: 128-bit addresses (e.g., 2001:0db8::1) โ virtually unlimited addresses
- IPv6 was created because IPv4 addresses are running out
TCP (Transmission Control Protocol)
- Guarantees reliable, ordered delivery
- Breaks data into packets, numbers them, and reassembles at destination
- Requests retransmission of lost packets
- Used for: web pages, email, file transfers
HTTP / HTTPS
- HTTP: HyperText Transfer Protocol โ how web browsers request and receive web pages
- HTTPS: HTTP Secure โ adds encryption using TLS/SSL
- HTTPS prevents eavesdropping on the data in transit
Concept Check ๐ฏ
How a Web Request Works
When you type a URL in your browser:
- DNS lookup: Browser asks DNS server to translate domain name to IP address
- TCP connection: Browser establishes a connection to the web server
- HTTP request: Browser sends a request for the specific page
- Server response: Server sends back HTML, CSS, JavaScript, images as packets
- Rendering: Browser assembles and displays the page
Protocols Comparison
| Protocol | Reliable? | Ordered? | Speed | Use Case |
|---|---|---|---|---|
| TCP | Yes | Yes | Slower (overhead) | Web, email, file transfer |
| UDP | No | No | Faster (less overhead) | Video streaming, gaming, VoIP |
Why UDP Sometimes?
- Video calls: a few dropped frames are better than waiting for retransmission
- Gaming: outdated position data is useless even if reliably delivered
- Streaming: better to skip ahead than pause for missing data
Certificate Authorities and HTTPS
- A Certificate Authority (CA) verifies website identity
Applied Recall โ๏ธ
-
The protocol that translates domain names to IP addresses is _______.
-
TCP guarantees reliable delivery; _______ trades reliability for speed and is used in video streaming.
-
HTTPS adds _______ to HTTP, preventing eavesdropping on data in transit.
Protocol Selection ๐
AP Exam Strategy: Internet Protocols
- Know the protocol layers: Application (HTTP), Transport (TCP/UDP), Internet (IP), Network Access
- TCP = reliable + ordered (web, email). UDP = fast + unreliable (video, gaming)
- IPv4 (32-bit) vs IPv6 (128-bit) โ know WHY IPv6 was needed
- DNS = domain name to IP address translation
- HTTPS = HTTP + encryption โ the lock icon means encrypted AND authenticated
- Know the 5 steps of a web request: DNS โ TCP โ HTTP request โ response โ render
AP-Style Application ๐ฏ
Part 2: Key Processes
๐ The Internet & Protocols
Part 2 of 7 โ Key Processes
How Information Travels The Internet
Two devices talk by following a stack of protocols โ agreed rules at each layer. Each layer hides the layer below it.
| Layer | Job | Example protocol |
|---|---|---|
| Application | What the data MEANS to the app. | HTTP, SMTP, DNS |
| Transport | Reliable (or fast-but-lossy) delivery between two endpoints. | TCP, UDP |
| Internet | Routing packets across networks; addressing. | IP |
| Link | Physical signaling on a single hop (Wi-Fi, Ethernet). | 802.11, Ethernet |
Concept Check ๐ฏ
A Single Web Request, Layer By Layer
You click a link to example.com/page:
- DNS (application layer): browser asks a DNS server, "What's the IP for example.com?" โ gets back, e.g., 93.184.216.34.
- TCP (transport layer): browser opens a reliable connection to 93.184.216.34 on port 80 (or 443 for HTTPS).
- HTTP (application layer): browser sends "GET /page HTTP/1.1".
Part 3: Patterns & Examples
๐ The Internet & Protocols
Part 3 of 7 โ Patterns & Examples
Common Internet Patterns
The same shapes recur across services.
| Pattern | Example |
|---|---|
| Client / server | Browser โ web server. |
| Peer-to-peer (P2P) | BitTorrent file sharing; some video calls. |
| Request / response | HTTP GET โ 200 OK. |
| Streaming | Video and audio data delivered as a continuous flow. |
| Publish / subscribe | Notifications, social feeds. |
Concept Check ๐ฏ
Client / Server vs. Peer-to-Peer
| Aspect | Client / Server | Peer-to-Peer |
|---|---|---|
| Initiator | Client. | Any peer. |
| Coordination | Centralized server. | Distributed among peers. |
Part 4: Connections & Interactions
๐ The Internet & Protocols
Part 4 of 7 โ Connections & Interactions
Internet Connections Across the Course
The Internet is the substrate everything else runs on.
| Connection | Why it matters |
|---|---|
| Internet โ Binary (BI 2) | All packets are bit sequences. |
| Internet โ Algorithms (BI 3) | Routing IS an algorithm; so is congestion control. |
| Internet โ Security (BI 4) | TLS encrypts traffic; certificates establish trust. |
| Internet โ Impact (BI 5) | Global reach amplifies both benefit and harm. |
Concept Check ๐ฏ
Open Standards As The Internet's Superpower
Anyone can implement TCP/IP. Any vendor's router can interoperate with any other's. This open standardization is why the Internet scaled to billions of devices in 30 years.
Routing As An Algorithm
Routers run algorithms (e.g., BGP) to decide where to forward each packet. These algorithms must adapt to:
- New networks coming online.
- Failed links being removed.
- Congestion shifting traffic to alternate paths.
The result is a network that self-heals as conditions change.
Encryption On The Internet
TLS (Transport Layer Security) wraps TCP connections to provide:
- : an eavesdropper sees ciphertext only.
Part 5: Change Over Time
๐ The Internet & Protocols
Part 5 of 7 โ Change Over Time
How The Internet Has Scaled
The Internet has grown from a few thousand devices to tens of billions. The principles that enabled this scale.
| Era | Devices | Notable change |
|---|---|---|
| 1980s | thousands | Birth of TCP/IP. |
| 1990s | millions | Web browsers; HTML/HTTP. |
| 2000s | hundreds of millions | Broadband; CDNs; cloud. |
| 2010s | billions | Mobile-first; HTTPS by default. |
| 2020s | tens of billions | IoT; IPv6 deployment widens. |
Concept Check ๐ฏ
Address Exhaustion And IPv6
IPv4 addresses are 32 bits โ 2ยณยฒ โ 4.3 billion. With smartphones, IoT, and rapid global growth, this isn't enough. IPv6 uses 128-bit addresses โ vastly more than the number of atoms on Earth's surface.
Workarounds during transition: NAT (Network Address Translation) lets one public IP serve many devices behind a router.
Cloud And CDNs Changed The Picture
- Cloud computing: applications run on shared, on-demand infrastructure rather than self-hosted servers.
Part 6: Problem-Solving Workshop
๐ The Internet & Protocols
Part 6 of 7 โ Problem-Solving Workshop
Internet & Protocols Workshop
Apply the layered model and the protocol vocabulary to scenarios.
Concept Check ๐ฏ
Worked Scenario 1: Diagnose A Slow Site
Symptoms: site loads but is slow.
Possible bottlenecks by layer:
| Layer | Symptom | Diagnosis tool |
|---|---|---|
| DNS | Long delay before any byte | DNS lookup time. |
| TCP | Connect succeeds slowly | TCP handshake timing. |
| HTTP server | Slow response after request sent | Server response time. |
| Network path | All traffic slow | Traceroute / latency. |
Modern dev tools show this waterfall directly.
Worked Scenario 2: Choose A Protocol
| Use case | Best transport |
|---|---|
| File download | TCP (reliability matters). |
| Live video call |
Part 7: AP Review
๐ The Internet & Protocols
Part 7 of 7 โ AP Review
AP Exam Recap โ Internet & Protocols
The protocol facts and architectural ideas most likely to appear on the exam.
Concept Check ๐ฏ
One-Line Definitions
| Term | Definition |
|---|---|
| Protocol | An agreed set of rules for communication. |
| Packet | A unit of data with headers (source, destination, etc.) plus payload. |
| IP | Routes packets to destination addresses (best-effort). |
| TCP | Adds reliable, ordered, error-checked delivery on top of IP. |
| UDP | Connectionless, faster, no delivery guarantee. |
| HTTP | Application-layer request/response for the web. |
| HTTPS | HTTP over TLS โ encrypted and authenticated. |
| DNS | Domain โ IP resolution. |
| TLS | Encrypts a TCP connection; authenticates server via certificate. |
| Router | A device that forwards packets toward their destination. |
| CDN | Geographically distributed caching of content. |