Use an ordinary unicast IPv4 subnet 192.0.2.0/24 and do not assign the network or directed-broadcast addresses.
How many host addresses are available?
A /24 has 256 addresses; subtracting network and broadcast leaves 254 usable host addresses.
Detailed explanation
254Correct. 256 minus network and broadcast equals 254.
Correct. 256 minus network and broadcast equals 254.
256Incorrect. It includes the two reserved addresses.
Incorrect. It includes the two reserved addresses.
252Incorrect. A /24 does not reserve four addresses.
Incorrect. A /24 does not reserve four addresses.
24Incorrect. The prefix length is not the host count.
Incorrect. The prefix length is not the host count.
Try it yourself
An example you can run in a temporary verification environment.
python3 -c "import ipaddress; n=ipaddress.ip_network('192.0.2.0/24'); print(n.num_addresses-2)"Expected result
254Key points
- 8 host bits
- 256 total
- Subtract two reserved addresses
Notes
- Environment: Python 3 ipaddress
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.