Nslookup for any web servers IP address
Let’s say I want to know the IP address of Microsoft’s web servers. So just nslookup microsoft.com in you command prompt and you will get the DNS server name and its IP address:
In the above screen, you can see that there is a term called Non-authoritative answer. This answer is shown when the reply comes from a source which is not considered authoritative for the domain which it’s returning a record for.
For example, in the above query, the response is coming from my default DNS server which would come as non-authoritative because it is not listed in the list of nameservers for microsoft.com.
Different types of Nslookup commands
In the table below, I am going to list out some of the famous Nslookup commands which can be used for different purposes. I will also list out a few examples in the beginning and then I will finally list out those all in a table at the end.
Nslookup example with a parameter:
Let’s understand the above Nslookup query first.
In the above query, the command follows this way:
- > set q=a
Now let’s see how to execute by setting different kinds of parameters (the list of which will be given in the table in the end) and do various DNS queries.
|set q=a||To know the IP address|
|set q=any||To know all types of data|
|set q=CNAME||To know the Canonical name|
|set q=MB||To know the Mailbox domain name|
|set q=MX||To know about the mail exchange server|
|set q=SOA||To know about the Start-Of-Authority of a DNS Zone|
|set q=WKS||To know about the Well Known service|