Ace your COMPTIA A+ certification with our practice exam. Engage with a variety of questions including multiple choice and performance-based, complete with hints and detailed explanations. Prepare effectively and boost your confidence for the big day!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


How do you query a DNS server for an IP address?

  1. ping [ip address]

  2. nslookup [ip address]

  3. tracert [ip address]

  4. netstat [ip address]

The correct answer is: nslookup [ip address]

Querying a DNS server for an IP address involves using the command that is specifically designed for looking up domain names and retrieving related information. The nslookup command is particularly suited for this purpose as it allows users to query DNS servers directly and retrieve the IP address associated with a given domain name. By using nslookup followed by the domain name, the tool sends a request to the DNS server and returns the corresponding IP address. In contrast, the other commands serve different functions. For example, ping is used to test connectivity to a specific IP address by sending ICMP echo requests to that address. Tracert (or traceroute) provides details about the path packets take to reach a destination IP address, and netstat displays active connections and listening ports on the computer but does not perform DNS queries. Thus, nslookup is the appropriate choice for querying a DNS server to resolve domain names into IP addresses.