CompTIA Network+ (N10-009)Network TroubleshootingEasy

A technician wants to use nslookup in interactive mode to query only the MX records for a domain named example.com. Which sequence of commands accomplishes this?

  1. Anslookup -query=MX example.com
  2. Bnslookup example.com -type=A
  3. Cnslookup, then type 'set type=PTR', then type 'example.com'
  4. Dnslookup, then type 'set type=MX', then type 'example.com'
Show answer & explanation

Correct answer: D. nslookup, then type 'set type=MX', then type 'example.com'

In interactive mode, entering nslookup alone opens a prompt where the technician can set the record type with 'set type=MX' before entering the domain name to retrieve only mail exchange records.

Why the other options are wrong

  • A. nslookup does not support a '-query=' flag; this syntax is invalid.
  • B. This queries A records, not MX records, and isn't interactive mode syntax.
  • C. PTR is used for reverse DNS lookups, not mail exchange records.

nslookup Interactive Mode

A mode of nslookup entered by typing the command with no arguments, allowing the technician to set query types and options before performing lookups.

  • 'set type=MX' restricts results to mail exchange records
  • Other types include A, AAAA, PTR, TXT, NS
  • Exit interactive mode with 'exit'

Memory trick: Set type first, then ask your question — like choosing a filter before searching.

More Network Troubleshooting questions