IP addressing, subnetting and switching
Priority key · Priorities guide emphasis; they do not remove taught scope.
Exam recall
Prefix → host bits → mask → network → broadcast → usable range. Use explicit CIDR before class defaults; ordinary host count is 2^(host bits) − 2.
IPv4 addresses and prefixes priority/high
An IPv4 address is divided into a network part and host part by the prefix, not always at an octet boundary. Devices in the same subnet share the network bits. The mask exposes those bits by retaining them in an AND operation and clearing the host bits.
IPv4 uses 32 bits, commonly written as four denary octets from 0 to 255. A prefix /p means the first p bits identify the network and the remaining 32−p bits identify positions within that subnet. The subnet mask has p leading 1s followed by 0s. /24 is 255.255.255.0; /22 is 255.255.252.0.
Network address: bitwise AND of address and mask; host bits all zero. Directed broadcast address: same network bits, host bits all one. In ordinary school subnet questions, usable hosts = 2^(32−p)−2, excluding network and broadcast. Apply the question’s ordinary-subnet assumptions; special /31 and /32 arrangements are outside this calculation.
A public address can be globally routed; private IPv4 ranges are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Private addresses are not globally unique/routable on the public Internet. NAT can translate internal addresses at a boundary. Do not decide that an address is private merely because its first octet looks familiar: 196.168.x.x is not 192.168.x.x.
Worked example — HCI 2025 Q2 address priority/high
For 196.168.10.23/22, there are 10 host bits → 1024 total addresses → 1022 usable hosts under the ordinary rule.
Mask: 255.255.252.0. Third-octet block size = 256−252 = 4. The value 10 lies in the 8–11 block. Thus:
Address: 11000100.10101000.00001010.00010111
Mask: 11111111.11111111.11111100.00000000
Network: 196.168.8.0
Broadcast: 196.168.11.255
Usable: 196.168.8.1 to 196.168.11.254Network and broadcast are computed for the full prefix, not by replacing only the final octet. That shortcut fails when the boundary is inside the third octet.
Why blocks of four? A /22 fixes the first 16 bits plus six bits of the third octet, leaving two variable bits there. Those two bits produce four consecutive third-octet values; all eight bits in the final octet also vary. That gives 4×256=1024 addresses, matching 2¹⁰.
The network address has all host bits zero; the broadcast address has all host bits one. The familiar first/last-octet shortcut is only a consequence of that rule in particular prefixes.
Local versus remote destination priority/high
A host compares the network portions of its own address and the destination using its subnet mask. If local, it sends a frame towards that host’s MAC address. If remote, it sends towards its default gateway’s MAC address, retaining the remote IP destination. ARP resolves the next-hop IPv4 address to a MAC on the local link. A switch learns source MAC-to-port associations and uses destination MACs to forward; unknown destinations may be flooded within the relevant LAN.
Classful addressing, VLSM and IPv6 priority/medium
Historic classful defaults: Class A first octet 1–126 with /8, B 128–191 with /16, C 192–223 with /24. Class D 224–239 is multicast; E 240–255 is reserved/special rather than ordinary host addressing. The 127 block is loopback. Use an explicitly supplied CIDR prefix instead of a classful default. School Network3 p.41 incorrectly labels 201.24.67.32 as Class B; it is Class C under classful rules, with default network 201.24.67.0/24.
Subnetting divides a block into smaller networks to organise hosts and limit broadcast domains. VLSM allows different subnet sizes for different needs. Allocate enough host bits for each group and keep the resulting address blocks aligned and non-overlapping; a 50-host group ordinarily needs six host bits (/26), while a 20-host group needs five (/27).
IPv6 uses 128 bits, written as eight colon-separated groups of four hex digits. Omit leading zeroes within a group; one run of all-zero groups may be replaced by ::, used only once so expansion is unambiguous. 2001:0db8:0000:0000:0000:0000:0000:0001 becomes 2001:db8::1. Expanding must recover eight groups. IPv6 uses multicast rather than IPv4-style broadcast; its larger address space addresses IPv4 capacity limitations. Unicast targets one interface; multicast targets a group; anycast reaches one member of a group according to routing selection.
An IP address serves network-layer addressing, a MAC address identifies a link-layer interface on the current link, and a port identifies a transport endpoint/application service. ICMP carries network errors/control (including uses in ping); IGMP manages IPv4 multicast membership; ARP resolves local IPv4-to-MAC mappings.
Circuit and packet switching priority/high
Circuit switching establishes a dedicated end-to-end channel/resources for the session. It can provide predictable service once established, but reserved capacity may be wasted during silence and setup is required.
Packet switching divides data into addressed packets sharing links with other traffic. It uses capacity flexibly and can route around failures where alternatives exist. Packets can experience variable delay, loss or reordering; receiving protocols may need buffering, reassembly or retransmission. Do not claim every packet necessarily takes a different route.
Practice
Exam focus: HCI 2025 Q2 uses 196.168.10.23/22; ASRJC 2025 Q3 compares packet/circuit switching. Address calculations deserve high priority because they combine representation with a multi-step method. Classful defaults support older questions; an explicit CIDR prefix takes precedence.
Calculation approach: host bits → mask → containing block → network/broadcast → usable endpoints/count → same-subnet comparison. Cross-check the block size against the address count. For switching comparisons, compare reservation/sharing and the consequence for the stated traffic.
10A — original. For 192.168.12.77/26, find the mask, network, broadcast, usable range and ordinary usable-host count. Is 192.168.12.130 in the same subnet?
10B — adapted from ASRJC 2025 Q3. Explain why packet switching can use shared capacity more efficiently than circuit switching for intermittent email traffic. Give one drawback of packet switching, and explain which MAC address a host needs first when the email server is on another IP network.
Hints
10A: last-octet blocks have 64 addresses. 10B: the IP destination and local frame destination serve different purposes.
Revision checklist
- 10.1 Compare circuit switching with Internet datagram packet switching.
- 10.2 Explain packet addressing, possible routes, variable arrival order and possible loss.
- 10.3 Distinguish IPv4 and IPv6 size and notation; compress and expand IPv6 examples.
- 10.4 Distinguish IP, MAC and port addresses.
- 10.5 Apply the classful addressing conventions taught, while using an explicit CIDR prefix when one is given.
- 10.6 Convert a CIDR prefix to a subnet mask and calculate network and broadcast addresses.
- 10.7 Calculate usable host counts under the conventional subnet assumptions used in the question.
- 10.8 Determine whether two addresses are in the same subnet.
- 10.9 Explain private/public addresses, NAT and the purpose of subnetting and VLSM at the taught level.
- 10.10 Distinguish ARP, ICMP and IGMP accurately.
- 10.11 Trace direct delivery versus delivery through the default gateway.
Visual revision mindmap

Open this mindmap and its text version · All 21 mindmaps
Your mindmap framework
Centre: IP addressing, subnetting and switching. Build the six branches below. For each subbranch, add a short definition, a labelled sample and one exam trap from memory; then check the chapter.
flowchart LR C["10 • Revision map"] C --> B0["IPv4 structure"] C --> B1["Subnet calculation"] C --> B2["Delivery decision"] C --> B3["Addressing variations"] C --> B4["Switching comparison"] C --> B5["Visual checks and mistakes"]
-
IPv4 structure
- 32 bits in four octets.
- Prefix fixes network bits; remainder is host bits.
- Mask: leading ones then zeroes.
- Public versus private ranges; NAT purpose.
-
Subnet calculation
- Host bits = 32 − prefix.
- Network = address AND mask.
- Broadcast = same network, all host bits one.
- Ordinary usable range and 2^(host bits) − 2; stated exceptions.
-
Delivery decision
- Compare local network portions.
- Local target: next-hop host MAC.
- Remote target: gateway MAC, remote IP destination.
- ARP resolves local next-hop IPv4 address to MAC.
-
Addressing variations
- Classful A/B/C defaults; explicit CIDR takes precedence.
- VLSM: fit groups into aligned non-overlapping blocks.
- IPv6: 128 bits, hex groups, one double-colon compression.
- IP versus MAC versus transport port; ICMP versus IGMP.
-
Switching comparison
- Circuit: reserved resources and setup.
- Packet: addressed units sharing capacity.
- Variable delay, loss and reordering.
- Alternative routes possible, not compulsory for every packet.
-
Visual checks and mistakes
- Draw address bits over mask bits and mark the boundary.
- Work /22 across third octet and /26 within fourth.
- Trace host → gateway → destination.
- Avoid: same first three octets always same subnet; 196.168 is private.
Close the notes and test the map: explain one branch aloud, sketch its sample, then answer a linked practice question. Mark any missing link to revisit.
Source trail
9569 §§4.1.2,4.1.4; school Network3.
HCI 2025 Q2(e); network-diagram and addressing exercises in Network3.
Source guide records provenance and original-paper locations.