NSLOOKUP is the name of a program that lets an Internet server administrator or any computer users enter a hostname (for example, “tekcetera.com”) and find out the corresponding IP address. It will also do reverse name lookup and find the host name for an IP address you specify.
For example, if you entered “tekcetera.com”, you would receive as a response our IP address, which happens to be “220.127.116.11”. NSLOOKUP sends a domain name query packet to a designated (or defaulted) domain name system (DNS) server. Depending on the system you are using, the default may be the local DNS name server at your service provider, some intermediate name server, or the root server system for the entire domain name system hierarchy. Now that we’ve define how DNS works lets dive into some commands that are invaluable when troubleshooting DNS issues.
Below you will find several NSLOOKUP commands that can help retrieve DNS records and troubleshoot DNS issues.
Check What Options Are Available With Help or ?
Press Enter on the keyboard
Type help or ? at the greater than sign
To Check Mail or MX Records
To Check DNS Mail or MX Records for a specific domain, it is easiest to first set the parameters, then to make the actual query, in two separate steps. (More advanced queries can have more than two parameters set across several commands.) To query for MX Records, use the SET TYPE option. So, to check the MX Records for the domain, tekcetera.com, type: set type=MX
Press ENTER on the keyboard. This tells nslookup that any subsequent queries are to return MX record information. This is not just a onetime setting, as all queries for this nslookup session will remain for the type set, until the type is changed.
To Check All or ANY Records
To check all or ANY DNS Records for a specific domain, it is easiest to first set the parameters, then to make the actual query, in two separate steps. This is similar to the method mentioned above, in “To Check Mail or MX Records.” To check for ANY Records for the domain, tekcetera.com, type: set type=ANY
To Change The Default DNS Server
Something which is very much misunderstood by most entities is that, at times, propagation can be bypassed. This is helpful to verify DNS changes without having to wait for propagation. One method for bypassing propagation is to change the nslookup session’s default DNS server to the authoritative DNS server of the domain which is to be
queried. This does not always work as expected, for various reasons, but it is usually worthwhile to try.
The authoritative name server, or DNS server, for the domain tekcetera.com.com has been ns01.tekcetera.com. So, to change the default DNS server to this name server, type: server ns01.tekcetera.com
To Receive Verbose Feedback ‐ Debug
To receive verbose or debugging information for each query, use the SET DEBUG option. To do this, type:
Press ENTER on the keyboard.
Now that the debug option has been set, subsequent queries will display more information about what queries and communication is actually taking place. To see an example of the debugging information, type: tekcetera.com
Press ENTER on the keyboard. You should see more output on the screen which gives more details regarding the query.
To see even more verbose output, use the SET D2 option. To do this, type: set d2
Press ENTER on the keyboard. Subsequent queries will yield a lot more output.