The Internet - Lesson 6: HTTP and DNS

Overview

Students conclude their study of the layers of the Internet by learning about two top-level protocols, HTTP and DNS. The lesson begins with a review of the layers students have already learned, namely the physical Internet, IP, and TCP / UDP. The lesson then dives into the core of the unit which is "What happens when I type an address into my browser?" Students will complete a brief activity to explore how the DNS works. Students then watch videos explaining how both DNS and HTTP work, taking notes and using a provided activity guide. The lesson concludes with a review of how the different layers of the Internet work.

Goals

Students will be able to:

  • Describe how HTTP is used for sharing the files and pages that make up the World Wide Web
  • Describe how the Domain Name System helps the Internet scale by allowing devices to find the IP addresses associated with a domain name
  • Explain how different layers of protocols on the Internet build upon and rely on one another

Purpose

This lesson is designed to wrap up the series on how the Internet works and highlight the main design philosophies of openness, reliability, and scalability. However, actions taken by governments and organizations challenge some of these design philosophies and may hinder the ability of the World Wide Web to be truly worldwide. Students will begin thinking about some of the dilemmas caused by these conflicts, which they will explore further after this lesson.

Resources

Supplemental Code.org material

For the students

Getting Started (5 minutes)

Distribute: As students enter class, hand each of them a single IP address. You cut these out ahead of time from IP Address Labels - Teacher Resource. You could also use handwritten notes or any other medium that's convenient for you and your students.

Teaching Tip

Showing the Need for DNS: This quick unplugged activity helps students understand why the DNS exists in the first place. With devices joining the internet all the time it's impossible for each device to keep track of each other device's IP address.

Keep it Short: This activity can be done very quickly, typically in about 3 minutes, before students start to see the core challenge. If students start running away from you that's a good sign they've seen what makes this activity tricky!

Do This

Your goal is to create a list in your journals of every one of your classmates IP addresses. The only rules:

  • You may walk around the room
  • You may share information with classmates
  • You may talk / share information with only ONE classmate at a time

Circulate: As students are working, circulate quietly through the room.

  • Approach a student and silently take their IP address slip away from them.
  • Give that person a new IP address slip (or a re-used IP address).
  • Repeat the above two steps as many times as you can, as you circulate the room.

Prompt: Discuss with your classmates the following prompts:

  • Why do you think I was switching IP addresses?
  • If IP addresses can change, is there a better way for everyone to know everyone else's IP address?

Prompt: Discuss responses to these questions with students, using the discussion goal to guide the conversation.

Discussion Goal

Main takeaways should include:

Remarks

  • If we want the Internet to scale up to billions of devices, then we need a better way to figure out one another's IP addresses!

Activity (30 minutes)

Video #1: DNS

Prompt: As we watch the following video take notes on:

  • How does the DNS solve the problem of translating domain names like example.com into IP addresses?
  • How does the DNS help the Internet scale?

Display: Show The Internet: IP Addresses and DNS - Video on DNS, which explains how it works. Video will automatically start playing at the introduction of DNS.

Prompt: Discuss the following prompts with a partner:

  • How does the DNS solve the problem of translating domain names like example.com into IP addresses?
  • How does the DNS help the Internet scale?

Discuss: Have students discuss responses with their partners, then share out with the class. Focus on the main takeaways in the discussion goal.

Discussion Goal

The main takeaways from this video should be:

  • The DNS is a network of servers that track the IP addresses of different domain names like example.com
  • When you visit a website you first ask the DNS for the IP address of the domain you want to visit. The first server to ask may have to ask other servers for this information.
  • This system allows billions of devices to get added to the network without putting pressure on any one computer or server to know all the IP addresses in the world.

Video #2: HTTP and the World Wide Web

Remarks

  • We've got our heads wrapped around how DNS works. Let's learn about the last piece of the puzzle here, a protocol called HTTP. In this video we'll learn what happens when you actually visit a website and the language used to send those files around.

Do This: As we watch this video take notes on the HTTP protocol.

  • What problem is HTTP solving?
  • What is a GET request and what are your requesting?
  • How does HTTP rely on the other layers of the Internet?
  • Why are SSL/TLS, and HTTPS necessary?
  • What do certificate authorities do and why are they necessary?

Display: Watch The Internet: HTTP and HTML - Video

Prompt: Review these questions with a partner about HTTP

  • What problem is HTTP solving?
  • What is a GET request and what are your requesting?
  • How does HTTP rely on the other layers of the Internet?
  • Why are SSL/TLS, and HTTPS necessary?
  • What do certificate authorities do and why are they necessary?

Discuss: Have students share out their responses with the class to make sure students understand the key takeaways about HTTP.

Discussion Goal

Here are the most important points for students to take away about HTTP and the way it works

  • When you visit a website you're actually getting sent a file by a server. HTTP is solving the problem of how to ask for that file.
  • Your computer and that server communicate using a protocol called HTTP.
  • HTTP is plain-text, so it literally includes the ASCII word "GET ..." and the file name requested.
  • All of your communications are being sent over the Internet so these requests are being sent inside TCP/IP packets and over the physical wires of the Internet.
  • There are other secure ways of sending information online because using HTTP, all our information would otherwise be sent as plain text.
  • Certificate authorities ensure that when you start a secure connection you're talking to the website you think you're talking to.

Wrap up (10 Minutes)

(Optional) Distribute: Give students a copy of the Layers of the Internet - Activity Guide

Prompt

Using your Layers of the Internet activity guide to help you, explain how each of the different layers is involved when you go to a link like example.com?

Discuss

Use this final prompt as a review of everything covered in both today's lesson and those that came before. You'll actually probably want to start with the bottom of your review guide.

Discussion Goal

Use this final discussion to review not just this lesson but every protocol / layer of the Internet students have learned so far. You'd aim to see responses like the following:

  • When you type in example.com, your browser will contact the DNS to find example.com's IP address
  • When you receive the address you'll send an HTTP GET request to example.com to send you its homepage
  • example.com's server will respond with the HTML code that makes up its web page
  • All of the communications above happen on the Internet which means TCP or UDP will break the message into packets and then send them. If TCP is used, error checking will occur.
  • IP will route the packets back and forth between your computer and the server
  • All of this information is sent over the physical wires, cable, wifi networks, and routers that make up the physical network of the internet.
A table of protocol/layers of the internet that students have studied in this lesson
Protocol/LayerWhat Problems Does It SolveHow Does It Work
Physical NetworkPhysically connecting devices to one another so that information can move through the network.Fiber optic cables, wifi signals, or copper wires physically connect the computers, smart phones, servers, etc. that make up the Internet. Computers don't need to be directly connected to each other, just a single point on the network.
IP: Internet ProtocolUniquely identifying people on the internet and routing messages between them.Each device on the internet is given a unique IP address. Packets sent on the internet include to and from IP addresses. Routers along the way use this information to move data along a path of direct connections. Routing happens dynamically, meaning the path is unpredictable and changes based on network conditions.
TCP: Transmission Control ProtocolSend large messages over the Internet when accuracy is most important. You would either use TCP or UDP.Messages are divided into packets and sent all at once. Packets are numbered so that they can be re-ordered and missing packets can be requested by the receiver. TCP is slower than UDP because error checking like this takes more time, but it is much more reliable.
UDP: User Datagram ProtocolSend large messages over the Internet when speed is most important. You would either use TCP or UDP.Messages are divided into packets and sent all at once. There is no error-checking to ensure all packets arrive or that they're in order. UDP is faster than TCP but more errors are possible. This is useful for streaming video or online gaming because having the picture displayed quickly is more important than it being displayed with a perfectly clear picture.
DNS: Domain Name SystemTranslate human-readable domains like code.org or example.com into IP addresses that can be used by the Internet.When you try to go to a domain like example.com, you computer first contacts a system of servers collectively called the DNS which keeps track of the IP addresses associated with each domain name. Communication with DNS servers happens over the Internet, meaning the request to and from servers are sent as TCP/ IP packets.
HTTP: HyperText Transfer ProtocolAllow computers to request and share webpages, audio, images, videos, and other file types on the Internet, collectively known as the world wide web.Computers communicate in plain text like GET to request files or send data. The server that receives the request responds with the files requested which are displayed by your browser. HTTP requests are sent between computers over the internet as part of TCP/IP packets. The world wide web is just files that are requested using HTTP and sent over the Internet.

Remarks

  • At this point you all know a LOT more about the Internet then the average person. Tomorrow we're going to turn our attention to thinking through how we can use this knowledge to make good decisions about the Internet's impact on our everyday lives.

Journal

Review the key takeaways of the lesson and have students add new vocabulary to their journals: scalability, DNS, World Wide Web, HTTP

  • Scalability: the capacity for the system to change in size and scale to meet new demands
  • The Domain Name System (DNS): the system responsible for translating domain names like example.com into IP addresses
  • World Wide Web: a system of linked pages, programs, and files
  • Hypertext Transfer Protocol (HTTP): a protocol for computers to request and share the pages that make up the world wide web on the Internet

Assessment: Check for Understanding

For Students

Open a word doc or google doc and copy/paste the following 2 questions.

Question 1

Choose the two statements from the following list that best describe the relationship between HTTP and the World Wide Web:

  • The World Wide Web is a protocol used for sharing HTTP messages
  • The World Wide Web is a collection of pages and files that is shared between computers using HTTP
  • Computers will send information using either HTTP or the World Wide Web, but not both.
  • HTTP and the World Wide Web both rely on other layers of protocols for sending information on the Internet

Question 2

In your own words explain the following 2 questions about the Domain Name System:

  • What problem does the DNS solve?
  • How does the DNS help the world wide web scale so that billions of users can access billions of web pages?

Standards Alignment

  • CSTA K-12 Computer Science Standards (2017): 2-NI-04, 3A-NI-04, 3B-NI-03
  • CSP2021: CSN-1.B.7, CSN-1.D.1, CSN-1.D.2, CSN-1.D.3, IOC-2.B.6

Next Tutorial

In the next tutorial, we will discuss CSP The Internet Lesson 7, which describes Begin working on a two-day project exploring internet dilemmas..