nslookup cli

 

 


Win7 binary location

C:\Windows\SysWOW64\nslookup.exe

 


Usage

 

Syntax

nslookup [-option] [hostname] [server]             # CLI

nslookup [-opt ...] - server                               # interactive mode using 'server'

Opts

hostname / domain

獲得要查詢的 Domain 的 IP

server

查看 Default 的 Name Server

i.e.

nslookup
> server

Default server: 192.168.80.1
Address: 192.168.80.1#53

-q=(A, CNAME, MX, NS, PTR, TXT, SRV ...)

 


Example

 

CLI

nslookup.exe -q=mx datahunter.org 192.168.123.1

Interactive Shell

1) 設定 server

nslookup - 192.168.22.1

Default Server:  router.lan
Address:  192.168.22.1

2) 純進入 Interactive Shell

nslookup

server 192.168.123.1

set q=mx

datahunter.org

 


Window preferred, alternate dns

The preferred DNS is a specified primary choice to handle Internet protocol mapping.

If the preferred choice times out after a time limit defined by an operating system,

it will then attempt to try the alternate DNS.

 

 


DNS Resolver Cache

 

# Display the contents of the DNS Resolver Cache.

ipconfig /displaydns

 


 

 

 

Creative Commons license icon Creative Commons license icon