Use this tool to do a nslookup on a hostname or IP address. Nslookup will retrieve the corresponding DNS information. To get the hostname associated with your current IP address just click the link what is my hostname. Over 18,234,644 nslookup's performed.
nslookup is a little software program that gets information about a hostname or IP address. The program is available on Windows, Mac, Linux, Unix and other operating systems.
nslookup isn't outdated but it is a basic, slimmed down version of more popular and full featured tools like dig and host.
Part of the reason it's used so much is because it's simple and straightforward to use, there's not a lot of customization that can be done, and its output is basic.
The nslookup program works by sending a "question" (known as a "query") to a nameserver who responds with an "answer" (known as a "response").
The information returned relates to the domain name system, "DNS." As part of the request, any nameserver can be specified. If a particular one isn't requested, the nameserver that the server or computer normally uses in its DNS settings is used by default.
The nameserver used isn't usually important because public nameservers usually have all the same information in them. However a nameserver in Europe might have more current up-to-the second DNS information in it for a European domain name than say, a nameserver in Japan.
If your company runs its own private DNS server then sometimes you cannot lookup private information on public DNS servers. To get DNS information on an internal, private IP address or internal hostname you must query your own local, private DNS server at your office. For example, let's say you have a internal web server running your employee Intranet. The hostname you decided to enter into your own DNS server is snow-white-webserver.mycompany.com and you assigned it an IP address of 127.0.0.50. If you did a nslookup on snow-white-webserver.mycompany.com using a public nameserver the response would come back saying something like "no such host" or "unable to resolve hostname." However if you did a nslookup and told it to send the query to your private nameserver, you would get the DNS information back, like the IP address, 127.0.0.50.
There are many different bits of DNS information that can be looked up using nslookup. I could support all of them because I'm a smart computer however my master has limited me to looking up:
- A record shows the IP address that the hostname resolves to. A hostname isn't required to resolve to an IP address although that's unusual. And it's possible to have a single hostname resolve to more than one IP address (round robin DNS). nslookup returns only one of the IP address. This is where dig and host tools come in handy.
- MX record shows the mail exchange information which, if it exists, should be another hostname. The mail exchange is basically the host that is going to be handling the sending and receiving of the email.
- NS record shows the nameserver information - it shows which nameserver is "authoritative." The authoritative nameserver is the one that has the most "correct" and up-to-date information, all other nameservers around the world are simply copies of whatever the authoritative nameserver has on file.
- PTR record shows the pointer information. This record is a bit complicated but basically the pointer record is used when you want to find the specific hostname associated with a specific IP address. Here's a bit of an example. It's easy to have a single hostname pointing to many IP addresses. And it's easy to have many hostnames all point to one IP address. However, a single IP address has only one official hostname that can be associated with it which is assigned by the ISP. This magical hostname is called the PTR record.
- SOA record is like the NS record. It shows the authoritative information about a DNS zone, including the primary name server, the email of the domain administrator, the domain serial number, and several timers relating to refreshing the zone.
- SPF record shows the "Sender Policy Framework" information which is used by email servers to confirm things so that the amount of SPAM being sent is reduced. This is a newer record because the SPF information used to be sent (and often times still is) in the TXT record below.
- TXT record shows what the human-readable text attached to the DNS record. The TXT record was originally supposed to be just arbitrary notes however now it often carries machine-readable data such as SPF information, opportunistic encryption, DomainKeys, DNS-SD and other cutting edge services for which there isn't (yet) a specific DNS record for. The TXT record has become something of a "catch all " way of sending information over then Internet using the DNS system.
Here's an example of:
- How to use nslookup on Linux (Redhat)
- How to use nslookup on Windows (XP Pro)