Use DNS to check the PTR record associated with 192.0.2.20.
Use host.
Which command is appropriate?
Passing an IPv4 address to host performs a reverse lookup using the corresponding in-addr.arpa name and PTR record.
Detailed explanation
host -t A 192.0.2.20Incorrect. A records map names to IPv4 addresses in a forward lookup.
host 20.2.0.192.in-addr.arpa AIncorrect. A reverse query uses PTR rather than A.
host 192.0.2.20Correct. host recognizes the IP argument and performs the PTR lookup.
hostname 192.0.2.20Incorrect. hostname changes or displays the local hostname, not DNS reverse data.
Try it yourself
An example you can run in a temporary verification environment.
host -h 2>&1 | sed -n '1,6p'Expected result
hostのname引数や問い合わせ型を示すhelpKey points
- An IP argument requests reverse lookup
- PTR records
- in-addr.arpa for IPv4
Notes
- Environment: BIND host help / 外部問い合わせなし
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Interface counters
Kernel-maintained counts of packets, errors, and drops at an interface.
Socket
A local or remote endpoint associated with a transport protocol and process.
Path tracing
A diagnostic method that observes hops and path limits toward a destination.