Nslookup
m (readability) |
(→On Windows systems) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
[[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. | [[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. | ||
− | [[nslookup]] on unix-like systems is deprecated; use [[dig]] instead. | + | == On Unixlike systems == |
+ | [[nslookup]] on unix-like systems is '''<font color="red">deprecated</font>'''; use [[dig]] instead. | ||
+ | == On Windows systems == | ||
[[nslookup]] on Windows can be useful to know, so here's a few basics: | [[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. | |
− | + | ||
− | This will change the prompt from whatever drive you were in (e.g., "C:\>") to just ">" | + | If you would like to change this, run |
− | By default, you will be set to use whatever your primary DNS server is set to in your Network Properties. | + | |
− | + | ||
> server 10.10.10.100 | > 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: | |
− | By default, typing in a domain/hostname will get you the A/HOST entry, if you want | + | |
− | + | ||
>set type=NS | >set type=NS | ||
− | + | Type can be the standard types of DNS changes, including A, NS, MX, PTR, SOA, etc. (see [[DNS record types]]). When you've set all the options you want set, typing in the domain name will give you the info you want: | |
− | 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 | > server 10.64.0.8 | ||
Line 28: | Line 25: | ||
Address: 10.64.0.8 | Address: 10.64.0.8 | ||
− | > | + | > freebsdwiki.net |
Server: [10.64.0.8] | Server: [10.64.0.8] | ||
Address: 10.64.0.8 | Address: 10.64.0.8 | ||
Non-authoritative answer: | Non-authoritative answer: | ||
− | Name: | + | Name: freebsdwiki.net |
− | + | Address: 64.15.172.73 | |
> set type=NS | > set type=NS | ||
− | > | + | > freebsdwiki.net |
Server: [10.64.0.8] | Server: [10.64.0.8] | ||
Address: 10.64.0.8 | Address: 10.64.0.8 | ||
Non-authoritative answer: | 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:\> | ||
+ | |||
+ | [[Category:System Commands]] | ||
+ | [[Category:DNS]] |
Latest revision as of 11:11, 6 October 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.
[edit] On Unixlike systems
nslookup on unix-like systems is deprecated; use dig instead.
[edit] 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. (see DNS record types). 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:\>