Choose an RFC 1918 private IPv4 address for internal LAN use.
Which address is private?
RFC 1918 defines 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 as private ranges. 172.20.30.40 is in the second range.
Detailed explanation
11.20.30.40Incorrect. 11.20.30.40 is outside the RFC 1918 ranges.
Incorrect. 11.20.30.40 is outside the RFC 1918 ranges.
169.254.20.30Incorrect. 169.254.0.0/16 is link-local, not RFC 1918 private space.
Incorrect. 169.254.0.0/16 is link-local, not RFC 1918 private space.
192.0.2.40Incorrect. 192.0.2.0/24 is TEST-NET-1 documentation space.
Incorrect. 192.0.2.0/24 is TEST-NET-1 documentation space.
172.20.30.40Correct. 172.20.30.40 lies within 172.16.0.0/12.
Correct. 172.20.30.40 lies within 172.16.0.0/12.
Try it yourself
An example you can run in a temporary verification environment.
python3 -c "import ipaddress; a=ipaddress.ip_address('172.20.30.40'); print(a in ipaddress.ip_network('172.16.0.0/12'))"Expected result
TrueKey points
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
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.