How to Use nslookup to Find IP Address

nslookup is a network administration command-line tool for querying the Domain Name System (DNS) to obtain the mapping between domain names and IP addresses. It takes in two parameters, first being an input of either “domain” or “server”, followed by text that will be translated into its correct address on request. Inputting ‘nslookup google.com’ would yield Google’s server IP address. nslookup can also be used for troubleshooting network problems, and nslookup is a very useful tool when using nslookup to find IP address. You can use nslookup to troubleshoot DNS related problems with the help of a simple command. The tool is available in Windows, Mac OSX and many Linux distributions including Debian & Ubuntu. You can also use nslookup online tool like the one provided by Intecca.com You can use it in interactive and non-interactive mode, which means the program will wait for input from your keyboard or not. To use nslookup just type nslookup and hit the enter key. The nslookup program will prompt you to provide some details. If your query is nslookup a website name, then type nslookup followed by the website name such as

nslookup intecca.com

and hit Enter
In this example we are going to use nslookup to find out the IP address of a host. We will also look up email servers for that domain, and maybe even some other useful information like who runs it or what programming language is used on the site. If I wanted to know what my favorite website looks like from an outside perspective, then all I need it type nslookup at the command prompt and enter intecca.com The result will tell me its IP Address of the site. When trying to figure out what’s going wrong with DNS on your Mac computer or iPhone (or iPad), it isn’t always obvious which IP address was assigned as its default Domain Name Server (DNS).

By default NSLookUp will use any previously configured DNS servers but if none exist or they’re not working either proceed by performing some investigation: open system preferences , click on Network and select your active network connection (either Wi-Fi or Ethernet). If you have more than one active interface, select the one you’re using to access the Internet. When connected you should see that an IP address has been assigned as well as how it was obtained (eg: DHCP). If it is shown as ‘Configured’ then you’re either using DHCP or static IPs two options that are automatically set in system preferences.

Command line options for using nslookup

H:\>nslookup /?
Usage:
nslookup [-opt ...] # interactive mode using default server
nslookup [-opt ...] - server # interactive mode using 'server'
nslookup [-opt ...] host # just look up 'host' using default server
nslookup [-opt ...] host server # just look up 'host' using 'server'

 

Usage Examples of Using nslookup command

Check domain name (intecca.com) on specific DNS server (8.8.8.8)

H:\>nslookup intecca.com 8.8.8.8
Server: dns.google
Address: 8.8.8.8

Non-authoritative answer:
Name: intecca.com
Address: 54.91.41.105 

Check MX records (mail server) on specific domain (wikipedia.org)

H:\>nslookup -querytype=mx wikipedia.org 
Address: 8.8.8.8 
Non-authoritative answer: wikipedia.org 
MX preference = 10, mail exchanger = mx1001.wikimedia.org wikipedia.org 
MX preference = 50, mail exchanger = mx2001.wikimedia.org 

Check ALL records on specific domain (pbs.org) Long output!

H:\>nslookup -type=any pbs.org
Address: 8.8.8.8

Non-authoritative answer:

pbs.org MX preference = 10, mail exchanger = mxa-00303201.gslb.pphosted.com
pbs.org MX preference = 10, mail exchanger = mxb-00303201.gslb.pphosted.com
pbs.org
primary name server = ns-806.awsdns-36.net
responsible mail addr = awsdns-hostmaster.amazon.com
serial = 1
refresh = 7200 (2 hours)
retry = 900 (15 mins)
expire = 1209600 (14 days)
default TTL = 86400 (1 day)
pbs.org nameserver = ns-193.awsdns-24.com
pbs.org nameserver = ns-806.awsdns-36.net
pbs.org nameserver = ns-1230.awsdns-25.org
pbs.org nameserver = ns-1674.awsdns-17.co.uk
pbs.org internet address = 54.225.198.196
pbs.org internet address = 54.225.206.152

Conclusion:
nslookup is a useful tool for network administrators and use to find ip address. we can also used it for troubleshooting network problems. If you want to become IT specialist then you have to learn all about this tools, if a DNS-related problem should occur in your server or workstation than you try solving it by yourself using this and other networking tools.