The idea
Opening a web page looks like one action. Underneath it is a chain of protocols from every layer you have studied, and each one exists because the step before it left something missing. The laptop has no address, so it needs DHCP. It has the router’s IP but not its MAC, so it needs ARP. It has a name but not an address, so it needs DNS. It needs a reliable pipe, so it needs TCP. Only then can HTTP ask for the page.
Lecture 9 calls this a synthesis: the journey down the protocol stack (application, transport, network, link) is complete, and now you put the pieces together.
How it works
The scenario
A student attaches a laptop to the campus network and requests, then receives,
www.google.com. The lecture draws three networks:
- The school network,
68.80.2.0/24, holding the arriving laptop (the browser). - The Comcast network,
68.80.0.0/13, holding the DNS server. - Google’s network,
64.233.160.0/19, holding the web server64.233.169.105.
The lecture’s own comment on the picture is “Sounds simple!”
How it works
Step 1: connecting to the Internet (DHCP)
The connecting laptop must get its own IP address, the address of its first-hop router and the address of the DNS server. It uses DHCP.
- The DHCP request is encapsulated in UDP, in IP, in 802.3 Ethernet.
- The Ethernet frame is broadcast on the LAN, destination
FFFFFFFFFFFF, and received at the router running the DHCP server. - Ethernet is demultiplexed to IP, IP to UDP, UDP to DHCP.
- The DHCP server formulates a DHCP ack with the client’s IP address, the IP address of the first-hop router, and the name and IP address of the DNS server.
- The frame is forwarded back through the LAN (switch learning) and demultiplexed at the client.
The client now has its IP address and knows the name and address of the DNS server and the IP address of its first-hop router. The detail is in DHCP.
How it works
Step 2: ARP, before DNS and before HTTP
Before the HTTP request can go out, the laptop needs the IP address of
www.google.com, so it creates a DNS query. The query is encapsulated in
UDP, in IP, in Ethernet. To send that frame to the router, the laptop needs the
MAC address of the router’s interface. That is what ARP provides.
- The ARP query is broadcast on the LAN and received by the router.
- The router replies with an ARP reply giving the MAC address of its interface.
- The client now knows the MAC address of its first-hop router and can send the frame holding the DNS query.
The lecture gives the ARP step its own slide titled “ARP (before DNS, before HTTP)”. See ARP for the packet itself.
How it works
Step 3: using DNS
- The IP datagram holding the DNS query is forwarded via the LAN switch from the client to the first-hop router.
- It is forwarded from the campus network into the Comcast network and routed, using tables created by RIP, OSPF and/or BGP, to the DNS server.
- The datagram is demultiplexed to DNS.
- The DNS server replies to the client with the IP address of
www.google.com.
The routing protocols come from Routing fundamentals and the autonomous-system topics that follow it in module 7.
How it works
Step 4: the TCP connection carrying HTTP
To send the HTTP request, the client first opens a TCP socket to the web server.
- A TCP SYN segment, step 1 of the three-way handshake, is routed inter-domain to the web server.
- The web server responds with a TCP SYNACK, step 2 of the handshake.
- The TCP connection is established.
The handshake is explained in TCP connection lifecycle.
How it works
Step 5: the HTTP request and reply
- The HTTP request is sent into the TCP socket.
- The IP datagram containing the HTTP request is routed to
www.google.com. - The web server responds with an HTTP reply containing the web page.
- The IP datagram containing the HTTP reply is routed back to the client.
- The web page is finally displayed.
Where marks get lost
Do not skip the ARP step
The order that costs marks is DHCP, then ARP, then DNS, then TCP, then HTTP. It is tempting to jump from DHCP straight to DNS because both are obvious. The DNS query cannot leave the LAN until ARP has given the router’s MAC address, and the lecture places ARP in that gap deliberately.
In the exam
- Protocol order: DHCP, ARP, DNS, TCP handshake, HTTP. Know what each step gives the client before the next can start.
- Encapsulation per step: DHCP and DNS both go in UDP, in IP, in Ethernet. HTTP goes in TCP, in IP, in Ethernet.
- What DHCP supplies: the client’s own IP, first-hop router address, DNS server address (plus the mask, from the previous topic).
- Which tables route the datagrams: those created by RIP, OSPF and/or BGP.
- Layer view: the lecture explicitly frames this as a review of application, transport, network and link protocols together.
Check yourself
- The five steps are DHCP, ARP, DNS, the TCP handshake (SYN then SYNACK), then the HTTP request and reply.
- DHCP gives the client its IP, its first-hop router and its DNS server.
- ARP resolves the router’s MAC address so the DNS frame can be built.
- DNS and DHCP use UDP. HTTP uses an established TCP connection.
- Datagrams between networks are routed using tables from RIP, OSPF and/or BGP.