Default port for name resolving is 53:
$ nslookup -port=53 microsoft.com
$ nslookup -debug microsoft.com
Dumping all available resords:
$ nslookup -type=any microsoft.com
Timing information and traces available via:
$ dig +trace google.com $ dig @8.8.4.4 +noall +answer +stats A defun.work
Despite dig shown only names for NS replays also have IP adresses (to avoid chicken/egg ptoblem when you request name resolution but asked to resolve another name). To see IP addressed use +additional option:
$ dig +trace +additional google.com
This request is for the A record and default for nslookup command:
$ nslookup defun.work $ nslookup -type=a defun.work $ nslookup -type=a defun.work 8.8.8.8 $ dig @8.8.8.8 A defun.work $ dig +nocmd +noall +answer defun.work
If that information available:
$ nslookup -type=ptr 8.8.8.8 $ dig @8.8.8.8 -x 8.8.4.4 $ dig +noall +answer @8.8.8.8 PTR 4.4.8.8.in-addr.arpa 4.4.8.8.in-addr.arpa. 21599 IN PTR google-public-dns-b.google.com. $ host 8.8.4.4 4.4.8.8.in-addr.arpa domain name pointer google-public-dns-b.google.com.
$ dig ns defun.work $ nslookup -type=ns defun.work
$ dig mx mail.google.com $ nslookup -type=mx mail.google.com
$ dig -t TXT google.com $ dig google.com TXT $ nslookup -type=txt google.com $ nslookup -q=txt google.com $ host -t txt google.com
SOA ("Start Of Authority") Record for a domain provides technical information about the domain:
$ dig soa defun.work
Human readable format can be viewed via:
$ nslookup -type=mx defun.work origin = ns1.mindsandmachines.com mail addr = admin.mindsandmachines.com serial = 2011091101 refresh = 10800 retry = 7200 expire = 604800 minimum = 86400
Email adress for domain administrator is admin@mindsandmachines.com for above output.
$ dig ns dp.gov.ua ... ;; ANSWER SECTION: dp.gov.ua. 3600 IN NS ns.giknpc.com.ua. ... $ dig @ns.giknpc.com.ua dp.gov.ua AXFR ... dp.gov.ua. 3600 IN MX 200 relay2.giknpc.com.ua. dp.gov.ua. 3600 IN A 195.64.190.1 adm.dp.gov.ua. 3600 IN A 195.64.190.1
Version of running NS:
$ dig @4.2.2.1 version.bind chaos txt $ nslookup -q=txt -class=CHAOS version.bind. 4.2.2.1
Server name:
$ dig @4.2.2.1 id.server txt chaos $ nslookup -q=txt -class=CHAOS id.server. 4.2.2.1 $ dig @4.2.2.1 hostname.bind txt chaos $ nslookup -q=txt -class=CHAOS hostname.bind. 4.2.2.1
That strings come from BIND config:
options { version "none of your business"; server-id "Host A"; hostname "Host A"; };
Built-in DNS server respects hosts file located %WINDIR%\system32\drivers\etc\hosts.
Show DNS cache:
ipconfig /displaydns
Flush the cache content:
ipconfig /flushdns
Refreshes all DHCP leases and re-registers DNS names:
ipconfig /registerdns