Convert IPv4 prefix length /27 to dotted-decimal netmask.
Which netmask is appropriate?
/27 has 27 one-bits; the final octet is 11100000, or 224.
Detailed explanation
255.255.255.0Incorrect. 255.255.255.0 is /24.
Incorrect. 255.255.255.0 is /24.
255.255.255.224Correct. 255.255.255.224 is /27.
Correct. 255.255.255.224 is /27.
255.255.255.240Incorrect. 255.255.255.240 is /28.
Incorrect. 255.255.255.240 is /28.
255.255.255.192Incorrect. 255.255.255.192 is /26.
Incorrect. 255.255.255.192 is /26.
Try it yourself
An example you can run in a temporary verification environment.
python3 -c "import ipaddress; print(ipaddress.ip_network('192.0.2.0/27').netmask)"Expected result
255.255.255.224Key points
- 27 network bits
- Final octet 224
- Block size 32
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.