The domain name server (DNS) and IP addresses

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

The domain name server (DNS) and IP addresses

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. What does a DNS server do when you type a domain name into a browser?
A It translates the domain name into the IP address of the web server
B It stores a copy of the whole website on the DNS server
2. Which of these is a domain name?
A 192.168.10.25
B www.example.com
3. Which of these is an IP address?
A 203.0.113.42
B www.school.org
4. Why do we use domain names instead of typing IP addresses?
A Names are easier for people to remember than numbers
B Computers cannot read IP addresses
5. What is the first step in a DNS lookup?
A The browser sends the IP address to the DNS server
B The browser sends the typed domain name to a DNS server

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1www.example.com AA wrong IP address sends the browser to a different web server, so the user may see a different or fake site.
293.184.216.34 BA domain name: the easy-to-remember text a user types into a browser to reach a website
3Step 1 of a DNS lookup: the browser sends the typed domain name to the DNS server CAn IP address: the number that identifies the web server holding the website
4Step 2 of a DNS lookup: the DNS server replies with the IP address of the web server Dbrowser -> DNS server: www.example.com?
5The DNS server stores the website's web pages and sends them to the browser. EThe DNS server only translates the domain name into an IP address. The web server holds the website and sends the pages.
6If the DNS server returns a wrong IP address, the browser still shows the correct website. FDNS server -> browser: 93.184.216.34

Definitions

DNS server

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
domain name -> ___ server -> IP address
2.
www.example.com is a ___________
3.
DNS server returns the __________
4.
INPUT url ip ← DNSTable[___] OUTPUT ip
5.
correctIP ← "93.184.216.34" IF ip _ correctIP THEN OUTPUT "Wrong site"

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A domain ← "93.184.216.34"
B ip ← DNS_LOOKUP(domain)
C OUTPUT ip
D CONNECT(ip)
Question 2
A Browser sends IP to DNS
B DNS finds the IP address
C Browser contacts web server
Question 3
A Type example.com in browser
B Browser asks the DNS server
C DNS server returns the IP
D Browser connects to DNS server
Question 4
A dns ← DNS_SERVER()
B domain ← "example.com"
C ip ← dns.LOOKUP(domain)
D CONNECT(domain)
Question 5
A Browser gets IP from DNS
B The IP address is wrong
C Browser loads the same site

Answer Key

The domain name server (DNS) and IP addresses
Section A: Quick Questions
Q1
A — It translates the domain name into the IP address of the web server
Q2
B — www.example.com
Q3
A — 203.0.113.42
Q4
A — Names are easier for people to remember than numbers
Q5
B — The browser sends the typed domain name to a DNS server
Section B: Match the Pairs
Q1
www.example.com → A domain name: the easy-to-remember text a user types into a browser to reach a website
Q2
93.184.216.34 → An IP address: the number that identifies the web server holding the website
Q3
Step 1 of a DNS lookup: the browser sends the typed domain name to the DNS server → browser -> DNS server: www.example.com?
Q4
Step 2 of a DNS lookup: the DNS server replies with the IP address of the web server → DNS server -> browser: 93.184.216.34
Q5
The DNS server stores the website's web pages and sends them to the browser. → The DNS server only translates the domain name into an IP address. The web server holds the website and sends the pages.
Q6
If the DNS server returns a wrong IP address, the browser still shows the correct website. → A wrong IP address sends the browser to a different web server, so the user may see a different or fake site.
Section C: Definitions
Q1
DNS server — A domain name server translates a domain name typed in a browser, such as example.com, into the IP address of the web server that holds the website.
Section D: Fill in the Blanks
Q1
domain name -> DNS server -> IP address
Q2
www.example.com is a domain name
Q3
DNS server returns the IP address
Q4
INPUT url ip ← DNSTable[url] OUTPUT ip
Q5
correctIP ← "93.184.216.34" IF ip ≠ correctIP THEN OUTPUT "Wrong site"
Section E: Spot the Error
Q1
A — The variable should hold a domain name such as www.example.com. The value written is an IP address, which is what the DNS lookup should return.
Q2
A — The browser only knows the domain name the user typed, so it sends the domain name to the DNS server. It does not already have the IP address.
Q3
D — After the DNS server returns the IP address, the browser connects to the web server at that address. The DNS server does not hold the website.
Q4
D — The connection to the web server uses the IP address returned by the lookup, so it should be CONNECT(ip), not the domain name.
Q5
C — If the IP address is wrong, the browser contacts a different web server. It will load a different website, not the one the user wanted.