How are devices addressed on the internet, and how does a subnet mask split a network from a host?
Explain IPv4 addressing, the role of the subnet mask in separating network and host parts, and the motivation for IPv6
A focused answer to the H2 Computing outcome on IP addressing. The structure of an IPv4 address, how a subnet mask divides network and host bits, calculating hosts per subnet, and why IPv6 was introduced.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
What this dot point is asking
SEAB wants you to explain IPv4 addressing, how a subnet mask separates the network and host parts of an address, and why IPv6 was introduced. The central idea is that an IP address has two parts - which network and which host on it - and the subnet mask is what tells a device where the split falls, so it can decide whether to deliver locally or via a router.
The answer
IPv4 addresses
An IPv4 address is 32 bits, written as four octets (8-bit numbers) in dotted-decimal, each to :
Every address has two parts: a network part (which network) and a host part (which device on it). The split is not fixed - the subnet mask defines it.
The subnet mask
A subnet mask marks which bits are network and which are host: a for each network bit, a for each host bit. For example:
This is 24 network bits and 8 host bits, often written as /24. A device finds its network address by a bitwise AND of its IP with the mask.
Hosts per subnet
With host bits there are addresses, but two are reserved:
- the network address (all host bits 0), naming the network itself, and
- the broadcast address (all host bits 1), reaching every host.
So usable hosts:
For an 8-bit host part, .
Deciding local versus remote
To send a packet, a device ANDs both its own and the destination IP with the mask. If the resulting network addresses match, the destination is on the same local network and it sends directly; if they differ, it sends to its default gateway (router) to forward toward the other network. This is the practical purpose of the mask.
Why IPv6
IPv4's 32 bits give only billion addresses, which have been exhausted by the explosion of connected devices. IPv6 uses 128-bit addresses, giving - an astronomically larger space - plus simpler headers and built-in autoconfiguration. The address shortage is the main reason for the move.
Examples in context
Example 1. A home router. Your router gives devices private addresses like with a /24 mask, so up to 254 hosts share the local network. When a device requests a website, the mask comparison shows the destination is on another network, so the packet goes to the router (the default gateway) to reach the internet.
Example 2. The rise of IPv6. As phones, sensors and appliances all came online, the billion IPv4 addresses ran out, forcing stopgaps like address sharing. IPv6's addresses are enough to give every device its own globally unique address with room to spare, which is why providers are steadily deploying it.
Try this
Q1. How many usable host addresses does a subnet with 8 host bits provide? [2 marks]
- Cue. , subtracting the network and broadcast addresses.
Q2. How does a device use the subnet mask to decide if a destination is local? [2 marks]
- Cue. It ANDs both its own and the destination IP with the mask; matching network addresses mean local (send directly), differing mean send to the router.
Q3. State the main reason IPv6 was introduced. [1 mark]
- Cue. IPv4's 32-bit address space (about 4.3 billion) was exhausted; IPv6's 128-bit space removes the shortage.
Exam-style practice questions
Practice questions written in the style of SEAB exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
Original6 marksA network uses the IPv4 address with subnet mask . (a) How many bits identify the network and how many identify the host? (b) How many usable host addresses does this subnet provide? (c) Identify the network address and the broadcast address.Show worked answer →
(a) The mask is in binary - 24 network bits and 8 host bits.
(b) With 8 host bits there are addresses, but two are reserved: the all-zeros host is the network address and the all-ones host is the broadcast address. So usable hosts .
(c) The network address is the all-zeros host: . The broadcast address is the all-ones host: .
Markers reward 24 network and 8 host bits from the mask, usable hosts (subtracting network and broadcast), and the two reserved addresses .0 and .255.
Original5 marks(a) Explain how a device uses the subnet mask to decide whether a destination is on the same local network. (b) Explain the main reason IPv6 was introduced and one feature it offers over IPv4.Show worked answer →
(a) The device performs a bitwise AND of its own IP address with the subnet mask to get its network address, and does the same with the destination IP. If the two network addresses match, the destination is on the same local network and the device sends directly; if they differ, the destination is on another network, so the device sends the packet to its default gateway (router) for forwarding.
(b) IPv4 uses 32-bit addresses, giving about billion addresses (), which have been exhausted by the growth of internet-connected devices. IPv6 uses 128-bit addresses (), a vastly larger space that removes the shortage. A feature: a far larger address space (also acceptable: simplified headers, built-in support for autoconfiguration, or no need for widespread NAT).
Markers reward the AND-with-mask comparison of network addresses to decide local versus remote (gateway), IPv4 32-bit exhaustion as the motivation, and IPv6's 128-bit address space as the fix.
Related dot points
- Describe the layered TCP/IP model, the role of each layer, and how encapsulation passes data between layers
A focused answer to the H2 Computing outcome on the TCP/IP model. The application, transport, internet and link layers, the role of each, encapsulation of data into segments and packets and frames, and why layering matters.
- Explain packet switching, the structure of a packet, how routers forward packets, and contrast it with circuit switching
A focused answer to the H2 Computing outcome on packet switching. How data is split into packets, packet structure with headers, how routers forward packets hop by hop, and the contrast with circuit switching.
- Explain how DNS resolves domain names to IP addresses, and describe the HTTP/HTTPS request-response model and the client-server architecture
A focused answer to the H2 Computing outcome on DNS and the web. Resolving domain names to IP addresses through DNS, the HTTP and HTTPS request-response cycle, status codes, and the client-server model.
- Explain symmetric and public-key (asymmetric) encryption, digital signatures and common network threats and defences
A focused answer to the H2 Computing outcome on network security. Symmetric and public-key encryption, the key-distribution problem, digital signatures for authenticity, hashing, and common threats and defences.
- Convert whole numbers between binary, denary and hexadecimal, and perform binary addition, explaining the role of place value and overflow
A focused answer to the H2 Computing outcome on number bases. Place value in binary and hexadecimal, conversion methods between binary, denary and hexadecimal, binary addition, and the meaning of overflow.