nslookup

from Wikipedia, the free encyclopedia

The nslookup command can be used on macOS , Windows and Unix to find out IP addresses or domains of a specific computer using DNS . The name of the command means “Name Server look up”, which means something like “look at the name server”. The dig command , which is available under Windows as a Cygwin port , has increasingly established itself as a more modern alternative to nslookup .

Options

The nslookup tool can be used to determine the domain name of an IP address or the IP address of a domain name. By default, in the non-interactive mode, the set DNS server is used to resolve the name or IP address. If another DNS server is to be used for resolution, e.g. B. to check this or because your own does not support certain requests, this must be specified additionally.

nslookup is available as a command on the command line / console.

Compared to the parameters in many other DOS and Windows programs, the " -q=" parameter is case sensitive . A capital "Q" leads to the output of:"*** Ungültige Option:"

example

$ nslookup www.wikipedia.org
Server:  ns0.southern.edu
Adresse:  216.229.224.4

Nicht autorisierte Antwort:
Name:    www.wikipedia.org
Adressen:  207.142.131.248, 207.142.131.235, 207.142.131.236, 207.142.131.245 207.142.131.247
C:\>nslookup -q=any wikipedia.org
Server:  dnsp03.hansenet.de
Address:  213.191.74.19

Nicht autorisierende Antwort:
wikipedia.org   internet address = 208.80.152.2
wikipedia.org   nameserver = ns2.wikimedia.org
wikipedia.org   nameserver = ns1.wikimedia.org
wikipedia.org   nameserver = ns0.wikimedia.org
wikipedia.org   MX preference = 50, mail exchanger = lists.wikimedia.org
wikipedia.org   MX preference = 10, mail exchanger = mchenry.wikimedia.org

ns1.wikimedia.org       internet address = 208.80.152.142
ns0.wikimedia.org       internet address = 208.80.152.130
ns2.wikimedia.org       internet address = 91.198.174.4
lists.wikimedia.org     internet address = 91.198.174.5
lists.wikimedia.org     AAAA IPv6 address = 2620:0:862:1::25:1

or using another DNS server:

C:\>nslookup -q=mx wikipedia.org 8.8.8.8
Server:  google-public-dns-a.google.com
Address:  8.8.8.8

Nicht autorisierende Antwort:
wikipedia.org   MX preference = 10, mail exchanger = mchenry.wikimedia.org
wikipedia.org   MX preference = 50, mail exchanger = lists.wikimedia.org

You can also use the IP address, this process is called reverse lookup :

C:\>nslookup 91.198.174.2
Server:   <Hostname>
Address:  <Host-IP>
Name:     rr.esams.wikimedia.org
Address:  91.198.174.2

You can also call nslookup without parameters and then enter them within the program:

$ nslookup
> server 8.8.4.4
Default server: 8.8.4.4
Address: 8.8.4.4#53
> set q=any
> heise.de
Server:		8.8.4.4
Address:	8.8.4.4#53

Non-authoritative answer:
heise.de
	origin = ns.heise.de
	mail addr = postmaster.ns.heise.de
	serial = 2013050201
	refresh = 10800
	retry = 3600
	expire = 604800
	minimum = 3600
heise.de	nameserver = ns.s.plusline.de.
heise.de	nameserver = ns.heise.de.
heise.de	nameserver = ns.pop-hannover.de.
heise.de	nameserver = ns2.pop-hannover.net.
heise.de	nameserver = ns.plusline.de.
Name:	heise.de
Address: 193.99.144.80
heise.de	has AAAA address 2a02:2e0:3fe:100::8
heise.de	mail exchanger = 10 relay.heise.de.
heise.de	text = "v=spf1 ip4:193.99.144.0/24 ip4:193.99.145.0/24 ?all" 

Authoritative answers can be found from:

First the DNS server was set to 8.8.4.4, then the query was expanded to include all entries (set q = any) and finally the zone heise.de was queried.

See also

Web links