Displays information that can be used to diagnose the Domain Name System (DNS) infrastructure. Before using this tool, you should be familiar with how DNS works. You can use the nslookup command-line tool only if you have the TCP/IP protocol installed.
The Nslookup command-line tool has two modes: interactive and non-interactive.
If you only need to find a piece of data, we recommend using non-interactive mode. For the first parameter, type the name or IP address of the computer you are looking for. For the second parameter, type the name or IP address of the DNS name server. If the second parameter is omitted, nslookup will use the default DNS nameservers.
Microsoft Documentation:The hyperlink login is visible.
Interactive command parameters
Command: (Identifier is capitalized, [] is optional) NAME - Prints information about the host/domain NAME that uses the default server NAME1 NAME2 - Same as above, but with NAME2 as a server help or ? - Print information about common commands set OPTION - Set the options all - Print options, current server, and host [no]debug - prints debug information [no]d2 - Prints detailed debug information [no]defname - Appends the domain name to each query [no]recurse - A recursive response to the query [no]search - Search the list using the domain [no]vc - Always use virtual circuitry domain=NAME - Set the default domain name to NAME srchlist=N1[/N2/.../N6] - Set the domain to N1 and the search list to N1, N2, etc root=NAME - Set the root server to NAME retry=X - Set the number of retries to X timeout=X - Set the initial timeout interval to X seconds type=X - Set the query type (e.g., A, AAAA, A+AAAA, ANY, CNAME, MX, NS, PTR, SOA, and SRV) querytype=X - Same as type class=X - Sets query classes (e.g. IN (Internet) and ANY) [no]msxfr - Use MS fast area teleportation ixfrver=X - The current version used for IXFR delivery requests server NAME - Set the default server to NAME, using the current default server lserver NAME - Set the default server to NAME, using the initial server root - Set the current default server as the root server ls [opt] DOMAIN [> FILE] - Lists the addresses in the DOMAIN (optional: output to FILE) -a - Lists the canonical name and aliases -d - Lists all records -t TYPE - Lists a given RFC record type (e.g. A, CNAME, MX, NS, and PTR, etc.) record view FILE - sorts the output files of 'ls' and uses pg to view them exit - exit procedure
Query the ns record using a different DNS server
(Note: Because I just did.)Alibaba Cloud's cloud resolution was replaced with DNSPodSome DNS node servers have caches, and all DNS nodes have not been fully updated, resulting in different NS records queried from different DNS servers. )
List detailed records
The command is as follows:
Query the txt record
The command is as follows:
With many advanced options for testing name resolution and detailed debugging modes for advanced troubleshooting, mastering the program is important for system and network engineers/administrators managing DNS services within their organization.
|