N10-009 ยท IP addressing
Subnetting with CIDR and VLSM
CIDR notation, subnet masks, calculating hosts and networks, variable length subnet masks.
Key points
- CIDR writes the mask as a prefix length: /24 = 255.255.255.0.
- Host bits = 32 - prefix.
- Usable hosts = 2^host bits - 2 (network and broadcast addresses excluded).
- Examples: /26 = 62, /27 = 30, /28 = 14, /30 = 2.
- VLSM lets you carve one block into subnets of different sizes: allocate the largest requirement first, then smaller ones, so blocks do not overlap and little space is wasted.
Practice questions
How many usable host addresses does a /26 subnet provide?
- 30
- 62
- 64
- 126
Show answer
Answer: B. 62
A /26 leaves 6 host bits: 2^6 = 64 addresses, minus the network and broadcast addresses gives 62. 64 forgets that subtraction; 30 is a /27; 126 is a /25.
Which of these are valid subnet masks?
- 255.255.255.192
- 255.255.255.224
- 255.255.255.100
- 255.255.0.255
- 255.255.240.0
Show answer
Answer: A. 255.255.255.192, B. 255.255.255.224, E. 255.255.240.0
A valid mask is a run of 1 bits followed by 0 bits. 255.255.255.192, 255.255.255.224 and 255.255.240.0 qualify. 255.255.255.100 and 255.255.0.255 mix 1s and 0s non-contiguously.
True or false: a /30 subnet provides 4 usable host addresses.
Show answer
Answer: False
False. A /30 has 4 addresses in total, but the network and broadcast addresses are not assignable, leaving 2 usable hosts. That is why /30 is common for point-to-point links.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
