Comparing IPv4 and IPv6

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

Comparing IPv4 and IPv6

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. How many bits are in an IPv6 address?
A 32 bits
B 128 bits
2. Which address is written in denary, with full stops between the groups?
A IPv4, e.g. 192.168.0.1
B IPv6, e.g. 2001:0db8:0000:0000:0000:ff00:0042:8329
3. Which address type uses hexadecimal digits separated by colons?
A IPv4
B IPv6
4. Which version gives vastly more possible addresses?
A IPv6, because it has 128 bits
B IPv4, because it has 32 bits
5. Why was IPv6 introduced?
A IPv4 was running out of addresses
B IPv4 addresses were too long to store

Match the Pairs

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

Left columnRight column
1192.168.0.1 A2^32
22001:0db8:85a3:0000:0000:8a2e:0370:7334 BAn IPv4 address: 32 bits written as four denary numbers separated by full stops
3IPv4 has only 32 bits, so it can give about 4.3 billion addresses, which is not enough for every device CIPv6 does not use denary and full stops. It uses hexadecimal groups separated by colons. Denary with full stops is IPv4.
4IPv6 has 128 bits, so it gives vastly more addresses and solves the address shortage DAn IPv6 address: 128 bits written as eight groups of hex separated by colons
5IPv6 address: 192.168.0.1 (denary with full stops, 128 bits) EIPv6 has more bits (128, not 32), so it gives far more addresses. This is why it was introduced.
6IPv4 was replaced by IPv6 because IPv6 has fewer bits, which saves addresses F2^128

Definitions

IPv6

Fill in the Blanks

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

1.
IPv4 address size: __ bits
2.
IPv6 address size: ___ bits
3.
IPv4 example: 192.168.0.1 Written in ______ with full stops
4.
IPv6 example: 2001:db8::ff00:42:8329 Written in ___________ with colons
5.
IPv4 ran short, so ____ was introduced

Spot the Error

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

Question 1
A ipv4_bits = 32
B ipv6_bits = 128
C ipv4 = "192:168:0:1"
D ipv6 = "2001:db8::1"
Question 2
A ipv4_bits = 128
B ipv6_bits = 128
C print(ipv6_bits > ipv4_bits)
Question 3
A ipv4_base = "denary"
B ipv6_base = "denary"
C print(ipv4_base, ipv6_base)
Question 4
A ipv6 = "fe80.0.0.0.0.0.0.1"
B groups = ipv6.split(":")
C print(len(groups))
Question 5
A ipv4_bits = 32
B ipv6_bits = 128
C ipv4_total = 2 ** ipv4_bits
D ipv6_total = 2 ** ipv4_bits

Answer Key

Comparing IPv4 and IPv6
Section A: Quick Questions
Q1
B — 128 bits
Q2
A — IPv4, e.g. 192.168.0.1
Q3
B — IPv6
Q4
A — IPv6, because it has 128 bits
Q5
A — IPv4 was running out of addresses
Section B: Match the Pairs
Q1
192.168.0.1 → An IPv4 address: 32 bits written as four denary numbers separated by full stops
Q2
2001:0db8:85a3:0000:0000:8a2e:0370:7334 → An IPv6 address: 128 bits written as eight groups of hex separated by colons
Q3
IPv4 has only 32 bits, so it can give about 4.3 billion addresses, which is not enough for every device → 2^32
Q4
IPv6 has 128 bits, so it gives vastly more addresses and solves the address shortage → 2^128
Q5
IPv6 address: 192.168.0.1 (denary with full stops, 128 bits) → IPv6 does not use denary and full stops. It uses hexadecimal groups separated by colons. Denary with full stops is IPv4.
Q6
IPv4 was replaced by IPv6 because IPv6 has fewer bits, which saves addresses → IPv6 has more bits (128, not 32), so it gives far more addresses. This is why it was introduced.
Section C: Definitions
Q1
IPv6 — A 128-bit address written in hex with colons. It gives vastly more addresses than 32-bit denary IPv4, which solves the shortage of IPv4 addresses.
Section D: Fill in the Blanks
Q1
IPv4 address size: 32 bits
Q2
IPv6 address size: 128 bits
Q3
IPv4 example: 192.168.0.1 Written in denary with full stops
Q4
IPv6 example: 2001:db8::ff00:42:8329 Written in hexadecimal with colons
Q5
IPv4 ran short, so IPv6 was introduced
Section E: Spot the Error
Q1
C — IPv4 addresses are written in denary with full stops between the numbers, so it should be "192.168.0.1". Colons are used in IPv6.
Q2
A — An IPv4 address is 32 bits long, so it should be ipv4_bits = 32. The 128-bit size belongs to IPv6.
Q3
B — IPv6 addresses are written in hexadecimal, so it should be ipv6_base = "hex". Denary is used for IPv4.
Q4
A — IPv6 groups are separated by colons, so it should be "fe80:0:0:0:0:0:0:1". With full stops, split(":") would not find the 8 groups.
Q5
D — The number of IPv6 addresses is 2 to the power of 128, so it should use ipv6_bits. Using ipv4_bits gives the IPv4 total again.