upgrade
upgrade

⌨️AP Computer Science Principles

Internet Protocols

Study smarter with Fiveable

Get study guides, practice questions, and cheatsheets for all your subjects. Join 500,000+ students with a 96% pass rate.

Get Started

Why This Matters

Internet protocols are the invisible rules that make everything online work—from loading a webpage to sending an email to playing a multiplayer game. In AP Computer Science Principles, you're being tested on how the Internet actually functions, not just what it does. The College Board wants you to understand that the Internet is built on standardized, open protocols that allow different devices and networks to communicate seamlessly. This connects directly to bigger concepts like fault tolerance, abstraction, and the layered design that makes the Internet scalable.

When you study these protocols, focus on the underlying principles: Why does TCP guarantee delivery while UDP doesn't? How does DNS act as an abstraction layer? What makes HTTPS more secure than HTTP? Don't just memorize protocol names—know what problem each one solves and how they work together in the TCP/IP protocol stack. If an FRQ asks about data transmission or network reliability, these protocols are your toolkit.


Core Transport Protocols: How Data Actually Moves

The Internet needs rules for how data travels between devices. Transport protocols handle the mechanics of breaking data into packets, sending them across networks, and (sometimes) ensuring they arrive correctly.

TCP (Transmission Control Protocol)

  • Reliable, connection-oriented delivery—TCP guarantees that data arrives complete and in order using acknowledgments and retransmission
  • Three-way handshake (SYN/ACK) establishes a connection before any data is sent, ensuring both devices are ready to communicate
  • Packet reassembly at the destination means TCP handles fragmentation automatically, making it ideal for web browsing and file transfers

UDP (User Datagram Protocol)

  • Connectionless and fast—UDP sends datagrams without establishing a connection or waiting for acknowledgments
  • No guarantee of delivery, order, or error correction, which means some packets may be lost or arrive out of sequence
  • Real-time applications like video streaming, online gaming, and VoIP prefer UDP because speed matters more than perfection

Compare: TCP vs. UDP—both are transport layer protocols that move data between applications, but TCP prioritizes reliability while UDP prioritizes speed. If an FRQ asks when you'd choose one over the other, think: "Does this application need every packet, or does it need low latency?"


Addressing and Naming: Finding Devices on the Network

Before data can travel anywhere, devices need to be identified. These protocols handle the addressing problem—turning human-friendly names into machine-readable locations.

IP Addressing (IPv4 and IPv6)

  • Unique numerical labels assigned to every device on a network, enabling identification and routing across the Internet
  • IPv4 uses 32-bit addresses (like 192.168.1.1), allowing approximately 4.3 billion addresses—nearly exhausted due to Internet growth
  • IPv6 uses 128-bit addresses, providing a virtually unlimited address space and solving the scalability problem for future devices

DNS (Domain Name System)

  • Translates domain names to IP addresses—acts as the Internet's phonebook so users type "google.com" instead of memorizing numbers
  • Hierarchical structure with root servers, top-level domain servers, and authoritative servers handling DNS resolution
  • Abstraction layer that hides complexity from users, a key example of how abstraction makes systems usable

Compare: IPv4 vs. IPv6—both provide device addressing, but IPv6's larger address space solves IPv4's exhaustion problem. DNS works with both, abstracting the addressing details from end users entirely.


Web Communication: Requesting and Receiving Content

When you browse the Internet, your device is constantly requesting resources from servers. These application layer protocols define how those conversations happen.

HTTP (Hypertext Transfer Protocol)

  • Request-response model—a client (browser) sends a request, and a server returns the requested resource (webpage, image, etc.)
  • Stateless protocol where each request is independent, meaning the server doesn't remember previous interactions
  • Foundation of the World Wide Web, operating at the application layer of the TCP/IP stack

HTTPS (Hypertext Transfer Protocol Secure)

  • Encrypted version of HTTP using TLS (Transport Layer Security) to protect data during transmission
  • Ensures confidentiality, integrity, and authentication—data can't be read or tampered with by attackers
  • Essential for sensitive transactions like banking, shopping, and login pages where security is critical

Compare: HTTP vs. HTTPS—identical functionality for transferring web content, but HTTPS adds encryption. The "S" stands for secure, and modern browsers warn users when sites use unencrypted HTTP.


File Transfer Protocol: Moving Files Between Systems

Sometimes you need to transfer entire files rather than just view web content. FTP provides a dedicated protocol for this purpose.

FTP (File Transfer Protocol)

  • Client-server model for uploading and downloading files between computers over a network
  • Supports anonymous and authenticated access, allowing public file sharing or restricted access with credentials
  • Active and passive modes determine how data connections are established, important for navigating firewalls

Email Protocols: Sending and Receiving Messages

Email requires multiple protocols working together—one for sending messages out, and others for retrieving them. Understanding which protocol does what is key.

SMTP (Simple Mail Transfer Protocol)

  • Sending and relaying email between mail servers—this is the outgoing mail protocol
  • Operates over TCP port 25 and handles delivery from your email client to the recipient's mail server
  • Does not retrieve email—SMTP only sends; you need a different protocol to check your inbox

POP3 (Post Office Protocol version 3)

  • Downloads email to the client device and typically removes it from the server afterward
  • Best for single-device access since emails are stored locally, allowing offline reading
  • Simple but limited—doesn't sync across multiple devices since messages leave the server

IMAP (Internet Message Access Protocol)

  • Manages email directly on the server without downloading, keeping messages accessible from anywhere
  • Synchronizes across multiple devices—read an email on your phone, and it's marked read on your laptop too
  • Server-side storage means emails remain available until you explicitly delete them

Compare: POP3 vs. IMAP—both retrieve email, but POP3 downloads and deletes while IMAP keeps messages on the server. IMAP is standard for users with multiple devices; POP3 works for single-device, offline-focused use.


The TCP/IP Protocol Stack: Putting It All Together

Understanding how these protocols layer together is essential. The TCP/IP model organizes protocols by function, with each layer depending on the one below it.

LayerFunctionProtocols
ApplicationUser-facing servicesHTTP, HTTPS, DNS, FTP, SMTP, POP3, IMAP
TransportEnd-to-end deliveryTCP, UDP
InternetAddressing and routingIP (IPv4, IPv6)
Network AccessPhysical transmissionEthernet, Wi-Fi

Compare: Application layer vs. Transport layer—application protocols (like HTTP) define what data means, while transport protocols (like TCP) handle how it gets delivered. This separation of concerns is a key example of abstraction in network design.


Quick Reference Table

ConceptBest Examples
Reliable data deliveryTCP, three-way handshake, packet reassembly
Speed over reliabilityUDP, streaming, gaming, VoIP
Device identificationIPv4, IPv6, IP addressing
Name-to-address translationDNS, DNS resolution
Secure web communicationHTTPS, TLS encryption
Stateless web requestsHTTP, request-response model
Sending emailSMTP
Retrieving email (single device)POP3
Retrieving email (multiple devices)IMAP, server-side storage
File transferFTP, client-server model

Self-Check Questions

  1. Which two protocols both operate at the transport layer but differ in their reliability guarantees? What tradeoff does each represent?

  2. A user types "www.example.com" into their browser. Which protocol translates this into an IP address, and why is this an example of abstraction?

  3. Compare TCP and UDP: If you were designing a video chat application, which would you choose and why?

  4. What is the key difference between POP3 and IMAP, and how does this affect users who check email on multiple devices?

  5. An FRQ asks you to explain how HTTPS protects user data compared to HTTP. What three security properties would you mention in your response?