Home > All Tips > PC Networking Tips
Using the Nslookup Command
Posted: December 20, 2011
There are many command line networking tools that you can use to do various things from checking the connectivity of hosts on a network to finding out IP information about your computer.
DNS (Domain Naming Service) is the service that is used to resolve or translate computer names on local networks and the Internet to their respective IP addresses. IP addresses are used to identify hosts or network interfaces on networks so computers and other devices can communicate with each other.
The nslookup command is an administrative tool for testing and troubleshooting DNS servers. It is installed with the TCP\IP protocol suite and is available in Windows and other operating systems. Nslookup is used to query DNS servers to obtain domain name or IP address mappings for DNS records. For example if you would like to know the IP address of a computer on your network that you know the name of, you can use nslookup to query it by name and have it resolve it to an IP address. Or if you want to find the name of a computer based on its IP address then you can use nslookup for that as well. This is assuming you use DNS on your network and your computers\hosts are registered in DNS.
To use nslookup, simply open a command prompt and type nslookup and press enter. Then you will be at the nslookup prompt and be shown your DNS servers name and IP address. If you use your ISPs DNS servers then that is what will be shown. If you use a DNS server on your network then that is what will show up as your default server. Keep in mind that if you use an outside DNS server such as the one belonging to your ISP then you will not be able to resolve names on your local network since they won't be registered with your ISP's DNS servers.
After you have the nslookup prompt up you can type in the name or IP address of the computer you want to resolve. You can even resolve website IP addresses by simply typing in the website address. The first part of the results show what DNS server name and IP address was used to answer your request and the second part shows the name and IP address of the host or website you ran the query on.
One trick you can use to get all the name servers of a location is to set the type of nslookup to name servers. This is done by typing set type=ns at the prompt and pressing enter and then typing in the website address again.
Next Page - 1 | 2
Enable Telnet on Windows 7, Vista and 2008
Using Microsoft PorQryUI to Test for Open Ports
Using nbtstat to Find a Computer Name
How to Find Your IP Addres