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?
- Anslookup -query=MX example.com
- Bnslookup example.com -type=A
- Cnslookup, then type 'set type=PTR', then type 'example.com'
- Dnslookup, then type 'set type=MX', then type 'example.com'
Show answer & explanationAnswer & 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.