Spotting an invalid IPv4 address
An address without exactly four groups, or with a group outside 0 to 255. Examples: 256.1.1.1 (too big), 192.168.1 (too few groups), 10.-5.2.1 (negative) and 10.a.2.1 (letter).
Understanding Spotting an invalid IPv4 address in IGCSE Computer Science Paper 1
What it does: This address has five groups. IPv4 allows exactly four, so it is invalid even though every number is between 0 and 255. Every group must be from 0 to 255. 256 is one too high, so 192.168.0.256 is invalid. Each group can be 0 to 255, so 255 is allowed. 256 is the first number that is too big. A group is an 8-bit number from 0 to 255, so it cannot be negative. 300 is higher than 255, so 300.10.10.10 is invalid. 30 is within the range. Repeated values are fine, for example 8.8.8.8. The problem here is that there are only three groups.
Common mistakes: Each group in an IPv4 address must be from 0 to 255. 256 is too big, so the address is invalid. It should be a value such as 192.168.0.20. An IPv4 address needs exactly four groups. 10.0.0 only has three, so it is invalid. It should be 10.0.0.5.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 325–341) and word search (Modules 325–354).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
invalid IPv4 addressFill in the Blanks
Spot the Error
Student with a class code? Join your class →