One web request, end to end
Unit 5 of 5 in How computers and the internet work.
You will be able to narrate what happens between typing a web address and seeing a page, in order.
Lesson
Step 1: turn a name into an address
People use names; networks use addresses. The Domain Name System connects them. Your computer has a resolver, a program that asks name servers for information and either gets the answer directly or follows referrals from one name server to another. Name servers hold the data about parts of the domain tree.
Without an address the next step cannot start, so name lookup always comes first.
Step 2: open a reliable connection
Now your computer has an address, so it can set up a TCP connection to the server. TCP gives the two sides a reliable, in-order byte stream, and it sets up the connection with a short opening exchange known as the three-way handshake.
Step 3: secure the connection
For an https address the next step is TLS. Its primary goal is a secure channel between two peers, and it needs only a reliable, in-order data stream underneath, which TCP provides. The channel gives three properties: authentication of the server, confidentiality so only the two endpoints can read the data, and integrity so an attacker cannot change it without being detected.
TLS does not hide how much data is sent. It also begins with a handshake in which the two sides agree on how to protect the rest of the conversation. You will study the details in the cryptography class.
Step 4: ask for the page
Finally the browser sends an HTTP request. HTTP is a stateless request and response protocol: a client sends a request message with a method and a target, and the server sends back a response. Stateless means each request stands alone, which is why sites add cookies to remember who you are, a topic in the web fundamentals class.
Putting it together
Name to address, then a reliable connection, then a secure channel, then the request. Each layer of the previous unit does its part. When a page will not load, you can check each step in order, and that habit is a core troubleshooting and investigation skill.
Key points
- DNS resolvers ask name servers to turn a name into an address.
- TCP sets up a reliable connection; TLS then secures it with authentication, confidentiality and integrity.
- HTTP is a stateless request and response protocol that runs on top.
- When a page fails, walk the steps in order: name, connection, security, request.
Sources
- RFC 1034: Domain Names, Concepts and Facilities
- RFC 9293: Transmission Control Protocol (TCP)
- RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3
- RFC 9110: HTTP Semantics
Practice in the labs
Follow the pieces on your own machine: names, addresses and how your system decides where to look.
- Networking basics: IP addresses, ports, DNS, and the path a packet takes: You see an address, a port, a name and a network path on your own machine, each step of this unit's story.
- Trace how Linux turns a hostname into an IP address, and catch a hosts-file override: You learn the order your system uses to resolve a name and how that order can be abused or checked.
Knowledge check
- A browser can reach an IP address directly but typing the website name fails. Which step is most likely broken? Answer: Name resolution (DNS). Turning a name into an address is the resolver and name servers' job (RFC 1034). If the address works but the name does not, look there first.
- Which three properties does TLS aim to give a connection? Answer: Authentication, confidentiality and integrity. RFC 8446 lists authentication of the server, confidentiality of data after the channel is set up, and integrity so tampering is detected.
- HTTP is described as stateless. What does that mean for a website that wants to remember you? Answer: Each request stands alone, so the site must add something like cookies to link requests. RFC 9110 calls HTTP a stateless request and response protocol, so remembering a user across requests needs an extra mechanism built on top.
Back to the syllabus or see all classes.