DHCP

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

DHCP

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. What does DHCP do when a phone joins the home Wi-Fi?
A It automatically gives the phone an IP address, subnet mask and default gateway
B It makes the phone type in its own IP address by hand
2. Where is the DHCP service usually running on a home network?
A On the router
B On the phone or laptop that joins
3. Which settings does DHCP hand to a joining device?
A MAC address, password and web page
B IP address, subnet mask and default gateway
4. Mia plugs a new laptop into the network and can browse straight away without typing any settings. Why?
A DHCP set up the network settings for her automatically
B The laptop already knew every IP address on the network
5. What is an address lease in DHCP?
A An IP address that a device owns forever
B An IP address given to a device for a set amount of time

Match the Pairs

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

Left columnRight column
1DHCP ADHCP works automatically, so no one needs to type in an address by hand. Manual typing is a static IP address.
2lease_time = 24h Bip_settings = auto (DHCP)
3DHCP removes manual set-up: a new device joins and gets its network settings automatically CDHCP keeps track of its leases, so it never gives one address to two devices at once. Two devices with the same address would cause a conflict.
4DHCP avoids address conflicts by giving each device a different address from its pool DA router service that automatically gives each joining device an IP address, subnet mask and default gateway
5DHCP: every new phone must be given an IP address by typing it in by hand EHow long a device may keep its assigned IP address before it must renew it or give it back
6DHCP gives two laptops the same IP address 192.168.1.50 at the same time Fpool = 192.168.1.100 - 192.168.1.200

Definitions

DHCP

Fill in the Blanks

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

1.
____ gives joining devices an IP address
2.
DHCP gives IP, mask and default _______
3.
DHCP address _____ = time an IP is borrowed
4.
DHCP sets up devices _____________
5.
DHCP gives each device a ______ address

Spot the Error

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

Question 1
A device joins the network
B device sets its IP by hand
C router offers an IP address
D device accepts the offer
Question 2
A DHCP server settings
B range = 192.168.1.50-100
C mask = 255.255.255.0
D gateway = 192.168.1.300
Question 3
A DHCP gives out MAC addresses
B it also gives a subnet mask
C and a default gateway
Question 4
A lease = 8 hours
B time_left = lease + used
C if time_left == 0:
D address returns to pool
Question 5
A pool = [10, 11, 12]
B give 10 to phone
C give 10 to laptop
D mark 10 and 11 as used

Answer Key

DHCP
Section A: Quick Questions
Q1
A — It automatically gives the phone an IP address, subnet mask and default gateway
Q2
A — On the router
Q3
B — IP address, subnet mask and default gateway
Q4
A — DHCP set up the network settings for her automatically
Q5
B — An IP address given to a device for a set amount of time
Section B: Match the Pairs
Q1
DHCP → A router service that automatically gives each joining device an IP address, subnet mask and default gateway
Q2
lease_time = 24h → How long a device may keep its assigned IP address before it must renew it or give it back
Q3
DHCP removes manual set-up: a new device joins and gets its network settings automatically → ip_settings = auto (DHCP)
Q4
DHCP avoids address conflicts by giving each device a different address from its pool → pool = 192.168.1.100 - 192.168.1.200
Q5
DHCP: every new phone must be given an IP address by typing it in by hand → DHCP works automatically, so no one needs to type in an address by hand. Manual typing is a static IP address.
Q6
DHCP gives two laptops the same IP address 192.168.1.50 at the same time → DHCP keeps track of its leases, so it never gives one address to two devices at once. Two devices with the same address would cause a conflict.
Section C: Definitions
Q1
DHCP — Dynamic Host Configuration Protocol: a router service that automatically gives each joining device an IP address, subnet mask and default gateway, so no manual set-up is needed.
Section D: Fill in the Blanks
Q1
DHCP gives joining devices an IP address
Q2
DHCP gives IP, mask and default gateway
Q3
DHCP address lease = time an IP is borrowed
Q4
DHCP sets up devices automatically
Q5
DHCP gives each device a unique address
Section E: Spot the Error
Q1
B — With DHCP the device asks the router for an address, so no manual set-up is needed. Line 2 should be: device sends DHCP discover.
Q2
D — 192.168.1.300 is not a valid IPv4 address because each part can only go up to 255. The default gateway should be the router's real address, 192.168.1.1.
Q3
A — MAC addresses are built into the hardware and are not handed out. DHCP gives out IP addresses.
Q4
B — Time left on a lease is the lease length minus the time already used. Adding would make the time left grow, so line 2 should use a minus sign.
Q5
C — The phone already has address 10, so giving 10 to the laptop would cause an address conflict. DHCP gives the laptop a different free address, such as 11.