Dynamic IP address

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

Dynamic IP address

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Who or what gives a device a dynamic IP address?
A The network assigns it automatically
B The user types it in by hand every time
2. A laptop disconnects from school Wi-Fi and joins again the next day. What may happen to its dynamic IP address?
A It is always exactly the same
B It may be different from the day before
3. Which statement about a dynamic IP address is true?
A It is permanently fixed to the device
B It can change each time the device connects
4. Phone A leaves the network. What can happen to the dynamic IP address it was using?
A It can be reused by another device
B It can never be used again by anyone
5. Which describes how a dynamic IP address is set up?
A Assigned automatically when the device connects
B Set manually by a technician for each device

Match the Pairs

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

Left columnRight column
1IP address: 192.168.1.23 (assigned by router when laptop joins Wi-Fi) AWrong: a dynamic IP address is given automatically by the network. Typing in a fixed address by hand is how a static IP is set.
2Monday: 192.168.1.23 | Tuesday: 192.168.1.41 BA dynamic IP address: the network gives it to the device automatically when it connects
3A dynamic IP address can be reused by another device after the first device disconnects CDevice joins network -> router gives it the next free address
4A dynamic IP address is assigned automatically, not set by the user DThe same device has a different IP address each connection, so the address is dynamic
5A dynamic IP address never changes, so it is the same every time you connect. EWrong: a dynamic IP address may change each time the device connects. An address that never changes is a static IP address.
6The user must type in a dynamic IP address on each device before it can join the network. FPhone leaves: 192.168.1.50 is free. Tablet joins: 192.168.1.50

Definitions

dynamic IP address

Fill in the Blanks

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

1.
ip ← network.______(device)
2.
IF device.connects = TRUE ____ ip ← network.assign(device) ENDIF
3.
device.disconnect() network._______(oldIP)
4.
ip1 ← network.assign(laptop) ip2 ← network.assign(laptop) OUTPUT ip1 _ ip2
5.
newIP ← network.assign(phone) phone.ip ← _____

Spot the Error

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

Question 1
A ipType <- "dynamic"
B device CONNECT network
C address <- network.ASSIGN()
D OUTPUT "Address is manual"
Question 2
A ip1 <- network.ASSIGN()
B device DISCONNECT
C device CONNECT
D ip2 <- ip1
E OUTPUT ip2
Question 3
A device CONNECT network
B ip <- USER.TYPE()
C device DISCONNECT
D network.RELEASE(ip)
Question 4
A device1 DISCONNECT
B network.RELEASE(ip1)
C device2 CANNOT USE ip1
D OUTPUT "Address reused"
Question 5
A ipType <- "static"
B device CONNECT network
C ip <- network.ASSIGN()

Answer Key

Dynamic IP address
Section A: Quick Questions
Q1
A — The network assigns it automatically
Q2
B — It may be different from the day before
Q3
B — It can change each time the device connects
Q4
A — It can be reused by another device
Q5
A — Assigned automatically when the device connects
Section B: Match the Pairs
Q1
IP address: 192.168.1.23 (assigned by router when laptop joins Wi-Fi) → A dynamic IP address: the network gives it to the device automatically when it connects
Q2
Monday: 192.168.1.23 | Tuesday: 192.168.1.41 → The same device has a different IP address each connection, so the address is dynamic
Q3
A dynamic IP address can be reused by another device after the first device disconnects → Phone leaves: 192.168.1.50 is free. Tablet joins: 192.168.1.50
Q4
A dynamic IP address is assigned automatically, not set by the user → Device joins network -> router gives it the next free address
Q5
A dynamic IP address never changes, so it is the same every time you connect. → Wrong: a dynamic IP address may change each time the device connects. An address that never changes is a static IP address.
Q6
The user must type in a dynamic IP address on each device before it can join the network. → Wrong: a dynamic IP address is given automatically by the network. Typing in a fixed address by hand is how a static IP is set.
Section C: Definitions
Q1
dynamic IP address — An IP address given to a device automatically by the network each time it connects, so it may change and can later be reused by another device.
Section D: Fill in the Blanks
Q1
ip ← network.assign(device)
Q2
IF device.connects = TRUE THEN ip ← network.assign(device) ENDIF
Q3
device.disconnect() network.release(oldIP)
Q4
ip1 ← network.assign(laptop) ip2 ← network.assign(laptop) OUTPUT ip1 ≠ ip2
Q5
newIP ← network.assign(phone) phone.ip ← newIP
Section E: Spot the Error
Q1
D — A dynamic IP address is assigned automatically by the network, not set manually. The line should say the address is automatic.
Q2
D — With a dynamic IP address the network assigns a new address each time the device connects, so it may differ. ip2 should be ip2 <- network.ASSIGN(), not a copy of ip1.
Q3
B — The network gives out a dynamic IP address automatically. The user does not type it in. The line should be ip <- network.ASSIGN().
Q4
C — Once device1 disconnects, its dynamic address is released and can be reused by another device. It should say device2 CAN USE ip1.
Q5
A — The network assigns the address automatically, so the type is dynamic. A static address is fixed and does not change. It should be ipType <- "dynamic".