pavement

Nslookup

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
Line 2: Line 2:
  
 
== On Unixlike systems ==
 
== On Unixlike systems ==
[[nslookup]] on unix-like systems is deprecated; use [[dig]] instead.
+
[[nslookup]] on unix-like systems is '''<font color="red">deprecated</font>'''; use [[dig]] instead.
  
 
== On Windows systems ==
 
== On Windows systems ==

Revision as of 13:46, 21 June 2007

nslookup is used to query DNS servers. Popular among MS Windows expatriates because there is also a Windows command-line tool called nslookup that does exactly the same thing the unix version does.

On Unixlike systems

nslookup on unix-like systems is deprecated; use dig instead.

On Windows systems

nslookup on Windows can be useful to know, so here's a few basics:

open a DOS-window by clicking Start, choosing "Run..." and entering "cmd.exe" and clicking OK. Start the program by typing in "nslookup". This will change the prompt from whatever drive you were in (e.g., "C:\>") to just ">". By default, you will be set to use whatever your primary DNS server is set to in your Network Properties.

If you would like to change this, run

> server 10.10.10.100

where 10.10.10.100 is the IP of the different server you would like to query. By default, typing in a domain/hostname will get you the A/HOST entry, if you want to change the TYPE of query you do, you'll need to set it:

>set type=NS

Type can be the standard types of DNS changes, including A, NS, MX, PTR, SOA, etc. When you've set all the options you want set, typing in the domain name will give you the info you want:

> freebsdwiki.net

> server 10.64.0.8
Default Server:  [10.64.0.8]
Address:  10.64.0.8

> freebsdwiki.net
Server:  [10.64.0.8]
Address:  10.64.0.8

Non-authoritative answer:
Name:    freebsdwiki.net
Address:  64.15.172.73

> set type=NS
> freebsdwiki.net
Server:  [10.64.0.8]
Address:  10.64.0.8

Non-authoritative answer:
freebsdwiki.net      nameserver = ns1.jrssystems.net
freebsdwiki.net      nameserver = ns2.jrssystems.net
ns1.jrssystems.net     internet address = 64.15.152.73
ns2.jrssystems.net     internet address = 64.15.152.73
>

When you're done with all the lookups you want to do, exit the nslookup shell by typing in

> exit

and you'll be dropped back to your C:\>

Personal tools