SLIDE 1 / 10
CSZone.co.uk
OCR H446 · Component 1 · 1.3.4

IP Addressing:
IPv4 and IPv6

OCR A Level Computer Science · cszone.co.uk
H446 SpecA Level
Learning Objectives

By the end of this topic you will be able to:

Describe the structure and format of IPv4 addresses including subnet masks
Explain why IPv6 was needed and describe its format
Distinguish between public/private and static/dynamic IP addresses
Explain NAT (Network Address Translation) and DHCP
IPv4

IPv4 Addresses

An IPv4 address is a 32-bit number written as four 8-bit octets in dotted decimal notation. Each octet ranges from 0–255.
Example: 192.168.1.100
Address Space
2³² = approximately 4.3 billion unique addresses. These have been exhausted — the world ran out of available IPv4 addresses in 2011.
Subnet Mask
Defines which part of the address is the network portion and which is the host portion. Example: mask 255.255.255.0 → first 3 octets = network; last octet = host.
Private ranges (not routable on the internet): 10.x.x.x · 172.16.x.x – 172.31.x.x · 192.168.x.x — used within LANs. NAT allows these private addresses to share a single public IP.
IPv6

IPv6 — The Solution to Address Exhaustion

IPv6 uses 128-bit addresses, written as eight groups of four hexadecimal digits separated by colons.
Example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
Address space: 2¹²⁸ ≈ 3.4 × 10³⁸ addresses — effectively unlimited for foreseeable future. Every device on earth could have billions of unique addresses.
Simplified headers: IPv6 headers are simpler and more efficient than IPv4, improving router performance. No need for broadcast; uses multicast.
Built-in security: IPv6 was designed with IPsec (IP-level encryption/authentication) as standard, though it is optional in practice.
NAT and DHCP

NAT and DHCP

NAT — Network Address Translation
A router maps multiple private IP addresses to a single public IP address. Outgoing packets have their private source IP replaced with the public IP. Incoming responses are translated back. Conserves IPv4 addresses but breaks end-to-end connectivity (devices behind NAT cannot be easily reached from the internet).
DHCP — Dynamic Host Configuration Protocol
Automatically assigns IP addresses to devices joining a network. The DHCP server maintains a pool of addresses and leases one to each device. When the lease expires, the address can be reclaimed. Simpler than manual (static) assignment for large networks.
Exam Practice
OCR H446 Style · 4 marks
Explain why IPv6 was developed to replace IPv4, and describe two differences between them.
[4 marks]
1
IPv6 was developed because IPv4's 32-bit address space (approximately 4.3 billion addresses) was exhausted due to the rapid growth of internet-connected devices.
1
Difference 1 — address length: IPv4 uses 32 bits (dotted decimal); IPv6 uses 128 bits (hexadecimal groups separated by colons), providing vastly more unique addresses.
1
Difference 2 — address space: IPv4 supports ~4.3 billion addresses; IPv6 supports approximately 3.4 × 10³⁸, making address exhaustion essentially impossible.
1
Additional difference: IPv6 has simplified packet headers improving routing efficiency, and includes multicast rather than broadcast, reducing unnecessary network traffic.
Common Mistakes

Don't Lose Marks

!
Saying IPv4 addresses are 8-bit — an IPv4 address is 32 bits total, divided into four 8-bit octets. Each octet is 8 bits; the full address is 32 bits. This distinction matters in calculation questions.
!
Confusing static and public IP addresses — static means the address doesn't change; public means it is routable on the internet. A device can have a static private address (e.g. a server within a LAN) — these are different properties.
!
Saying NAT adds security as a primary purpose — NAT was designed to conserve IPv4 addresses. Any security benefit (hiding internal addresses) is a side effect, not the design goal. Don't describe NAT as a firewall.
1.3.4b Complete
Well done! ✓
IP Addressing: IPv4 and IPv6
Return to lesson to continue