This article is a mirror article of machine translation, please click here to jump to the original article.

View: 11526|Reply: 3

nslookup command briefly introduced

[Copy link]
Posted on 2021-9-23 20:52:43 | | | |
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.




Previous:Under CentOS 7, Kafka often hangs up solutions
Next:[Practice] Make a green no-install version of Java JDK Windows
 Landlord| Posted on 2022-5-31 21:13:07 |
Practical Operation: Using Docker to Build DNS Service (dnsmasq)
https://www.itsvse.com/thread-10321-1-1.html
 Landlord| Posted on 2022-12-27 09:29:22 |
C:\Users\itsvse_11>nslookup -qt=a down.itsvse.com 8.8.8.8
Server: dns.google
Address:  8.8.8.8

Non-authoritative response:
Name: down.itsvse.com
Address:  106.15.82.202
 Landlord| Posted on 2023-4-14 22:03:16 |
Linux needs to install the following package to use the nslookup command



Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com