IP address

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

IP address

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which statement best describes an IP address?
A The brand name of a device's manufacturer
B A unique number that identifies a device on a network
2. An IP address is most like which everyday thing?
A A postal address on a house
B A paint colour on a house
3. Why does data need an IP address as a destination?
A So the data knows which device to travel to
B So the data can be made smaller
4. Which one is an example of an IPv4 address?
A 192-hello-1-5
B 192.168.1.5
5. How are the numbers in an IPv4 address separated?
A By dots, like 192.168.1.5
B By spaces, like 192 168 1 5

Match the Pairs

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

Left columnRight column
1192.168.1.5 AA unique number that identifies a device on a network
2IP address BEach device needs its own unique IP address. If two devices share one, data cannot tell which device it should go to.
3An IP address works like a postal address because it tells data where to be delivered CAn example of an IPv4 address, made of four numbers separated by dots
4An IPv4 address has four numbers separated by dots Ddestination = 192.168.1.5
5Two devices on the same network both have the IP address 192.168.1.5 EAn IPv4 address uses dots between the four numbers, not commas.
6192,168,1,5 F192.168.1.5

Definitions

IP address

Fill in the Blanks

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

1.
__ address = 192.168.1.5
2.
IPv_ looks like 192.168.1.5
3.
A house has a postal address, a ______ has an IP address
4.
Data needs a ___________ so it knows where to go
5.
IPv4 numbers are separated by ____

Spot the Error

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

Question 1
A ip = '192.168.1.5'
B parts = ip.split(',')
C print(len(parts))
Question 2
A device = 'laptop'
B ip_address = '192.168.1.5
C print(device, ip_address)
Question 3
A packet = 'Hello'
B destination = '192.168.1.8'
C send(packet destination)
Question 4
A ip = '192.168.1'
B print('Device IP:', ip)
C print(ip.split('.'))
Question 5
A ip = '192.168.1.5'
B parts = ip.split('.')
C count = len(parts)
D print(count = 4)

Answer Key

IP address
Section A: Quick Questions
Q1
B — A unique number that identifies a device on a network
Q2
A — A postal address on a house
Q3
A — So the data knows which device to travel to
Q4
B — 192.168.1.5
Q5
A — By dots, like 192.168.1.5
Section B: Match the Pairs
Q1
192.168.1.5 → An example of an IPv4 address, made of four numbers separated by dots
Q2
IP address → A unique number that identifies a device on a network
Q3
An IP address works like a postal address because it tells data where to be delivered → destination = 192.168.1.5
Q4
An IPv4 address has four numbers separated by dots → 192.168.1.5
Q5
Two devices on the same network both have the IP address 192.168.1.5 → Each device needs its own unique IP address. If two devices share one, data cannot tell which device it should go to.
Q6
192,168,1,5 → An IPv4 address uses dots between the four numbers, not commas.
Section C: Definitions
Q1
IP address — A unique number that identifies a device on a network, like a postal address, so data knows where to go. IPv4 looks like 192.168.1.5.
Section D: Fill in the Blanks
Q1
IP address = 192.168.1.5
Q2
IPv4 looks like 192.168.1.5
Q3
A house has a postal address, a device has an IP address
Q4
Data needs a destination so it knows where to go
Q5
IPv4 numbers are separated by dots
Section E: Spot the Error
Q1
B — The four numbers in an IPv4 address are separated by dots, not commas. It should be ip.split('.') so the address splits into 4 parts.
Q2
B — The string is missing its closing quote. It should be ip_address = '192.168.1.5' so the IP address is stored as text.
Q3
C — The comma between the arguments is missing. Data needs a destination IP address, so it should be send(packet, destination).
Q4
A — An IPv4 address has four numbers separated by dots. This one has only three. It should be ip = '192.168.1.5'.
Q5
D — A single = assigns a value, and it is not allowed inside print() like this. To check that an IPv4 address has 4 parts, use ==: print(count == 4).