Nslookup
From FreeBSDwiki
(Difference between revisions)
m |
m (readability) |
||
Line 10: | Line 10: | ||
By default, you will be set to use whatever your primary DNS server is set to in your Network Properties. | 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 | If you would like to change this, run | ||
+ | |||
> 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. | 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 |
+ | to change the TYPE of query you do, you'll need to set it: | ||
+ | |||
>set type=NS | >set type=NS | ||
+ | |||
Type can be the standard types of DNS changes, including A, NS, MX, PTR, SOA, etc. | 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: | When you've set all the options you want set, typing in the domain name will give you the info you want: | ||
+ | |||
>google.com | >google.com | ||
Revision as of 09:50, 24 January 2006
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.
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: >google.com > server 10.64.0.8 Default Server: [10.64.0.8] Address: 10.64.0.8 > google.com Server: [10.64.0.8] Address: 10.64.0.8 Non-authoritative answer: Name: google.com Addresses: 72.14.207.99, 64.233.187.99 > set type=NS > google.com Server: [10.64.0.8] Address: 10.64.0.8 Non-authoritative answer: google.com nameserver = ns1.google.com google.com nameserver = ns2.google.com google.com nameserver = ns3.google.com google.com nameserver = ns4.google.com >