220-802 · Question #155
Which of the following switches should a technician use with the PING command to resolve an IP address to a hostname?
The correct answer is A. -a. The -a switch with the PING command performs a reverse DNS lookup, resolving the target IP address to its associated hostname.
Question
Which of the following switches should a technician use with the PING command to resolve an IP address to a hostname?
Options
- A-a
- B-f
- C-n
- D-t
How the community answered
(38 responses)- A92% (35)
- B3% (1)
- D5% (2)
Why each option
The -a switch with the PING command performs a reverse DNS lookup, resolving the target IP address to its associated hostname.
When ping -a is used followed by an IP address, Windows performs a reverse DNS lookup against the configured DNS server to resolve the IP to its fully qualified domain name (FQDN) and displays it in the reply header. This is useful for quickly identifying what host a given IP address belongs to without running a separate nslookup command. The resolved hostname appears in the 'Pinging' line before the ICMP echo replies are shown.
The -f switch sets the Do Not Fragment bit in the IP packet header, used for MTU path discovery, and has nothing to do with hostname resolution.
The -n switch specifies the number of ICMP echo request packets to send and does not perform any DNS or hostname resolution.
The -t switch causes PING to send requests continuously until manually stopped with Ctrl+C and does not resolve IP addresses to hostnames.
Concept tested: PING -a switch for reverse DNS hostname resolution
Source: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/ping
Topics
Community Discussion
No community discussion yet for this question.