Lesson 6: HTTP and DNS

Widget

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 two brief activities, one unplugged, and one plugged, that explore how the DNS works. Students then watch videos explaining how both DNS and HTTP work, taking notes in a provided activity guide. The lesson concludes with a review of how the different layers of the Internet work.

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.

Agenda

Lesson Modifications

Warm Up (5 mins)

Activity (30 mins)

Wrap Up (10 mins)

View on Code Studio

Objectives

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

Preparation

Links

Heads Up! Please make a copy of any documents you plan to share with students.

For the Teachers

For the Students

Teaching Guide

Lesson Modifications

Attention, teachers! If you are teaching virtually or in a socially-distanced classroom, please read the full lesson plan below, then click here to access the modifications.

Warm Up (5 mins)

DNS - Unplugged - 5 mins

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!

Distribute: As students enter class hand each of them a single IP address (precut by teacher from IP Address Labels - Teacher Resource)

Remarks

Today we're going to finish our study of the layers of the Internet and learn about two final protocols. Let's just hop right in!

When you walked into the room I handed each of you a slip of paper. This is your IP address. We know that in order to communicate on the internet you need to know the IP address of the other computer. So far we've let you ask one another's addresses when communicating on the Internet Simulator, but this can be 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

Discussion Goal

Goal: Main takeaways should include

  • Devices are joining and leaving the Internet all the time. IP addresses don't stay constant. If you go to a coffee shop or restart your browser your device might be assigned a new IP address.
  • If IP addresses are switching, it's very hard for each computer to keep an accurate list.
  • It would make more sense if there were one system that kept track of all that information.

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?

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

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 mins)

DNS - Video - 8 mins

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.

Discussion Goal

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.

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.

DNS - Internet Simulator - 12 mins

Teaching Tip

Wrapping Up the Internet Simulator: This should serve as a satisfying conclusion to students' use of the Internet Simulator. Students should notice the following things

  • You need to speak with the DNS in order to get the IP address of your classmate
  • You need to send a separate message
  • They may notice that packets are now numbered like in the TCP protocol from last class

Previewing HTTP: While not explicitly about HTTP, there are many similarities between this activity and how HTTP works. In both cases a computer makes a request over the Internet in plain text (e.g. GET ....) that then gets a response. You may make those connections later after students have watched the video about HTTP.

Remarks

Let's go get on the Internet Simulator one last time to see how all the different pieces we've learned about will fit together.

Do This: Log into this version of the Internet Simulator

  • No talking at all, not even to get your partner’s IP address
  • Ask the DNS for the IP address of a user by sending GET username
  • Use the IP address you get back to communicate with at least 2 friends. You can talk about: In your ideal world what time would school start? or What would you eat for your perfect meal?

Remarks

As we can see here on the Internet Simulator, thanks to the DNS we can talk to other people even if we don't know their IP addresses. Additionally, this system is built entirely on all the other layers below it. When you talk to the DNS you're still sending information over the network, you still need to know the IP address of a DNS server, and you still send a message that gets turned into packets and routed using UDP (or occasionally TCP) and IP.

HTTP and the World Wide Web - 10 mins

Discussion Goal

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.

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 video about HTTP.

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.

Wrap Up (10 mins)

Discussion Goal

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 code.org, your browser will contact the DNS to find Code.org's IP address
  • When you receive the address you'll send an HTTP GET request to code.org to send you its homepage
  • Code.org'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.

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

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 code.org?

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.

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.


Assessment: Check For Understanding

Check For Understanding Question(s) and solutions can be found in each lesson on Code Studio. These questions can be used for an exit ticket.

Question: Choose the two statements that best describe the relationship between HTTP and the World Wide Web

Question: In your own words explain the following 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?
  • Check Your Understanding
  • 2
  • 3
  • (click tabs to see student view)
View on Code Studio

Student Instructions

View on Code Studio

Student Instructions

In 50 words or less, describe the concept of a number system.

Why are rules required for a number system to be useful?

Standards Alignment

View full course alignment

CSTA K-12 Computer Science Standards (2017)

NI - Networks & the Internet
  • 2-NI-04 - Model the role of protocols in transmitting data across networks and the Internet.
  • 3A-NI-04 - Evaluate the scalability and reliability of networks, by describing the relationship between routers, switches, servers, topology, and addressing.
  • 3B-NI-03 - Describe the issues that impact network functionality (e.g., bandwidth, load, delay, topology).

CSP2021

CSN-1 - Computer systems and networks facilitate how data is transferred
CSN-1.B - Explain how the Internet works.
  • CSN-1.B.7 - The Internet was designed to be scalable.
CSN-1.D - Describe the differences between the Internet and the World Wide Web.
  • CSN-1.D.1 - The World Wide Web is a system of linked pages, programs, and files.
  • CSN-1.D.2 - HTTP is a protocol used by the World Wide Web.
  • CSN-1.D.3 - The World Wide Web uses the Internet.
IOC-2 - The use of computing innovations may involve risks to your personal safety and identity
IOC-2.B - Explain how computing resources can be protected and can be misused.
  • IOC-2.B.6 - Certificate authorities issue digital certificates that validate the ownership of encryption keys used in secure communications and are based on a trust model .