nslookup is a command-line administrative tool for testing and troubleshooting DNS servers (Domain Name Server). It is used to query specific DNS resource records (RR) as well. Most operating systems come with a built-in nslookup feature.
This article demonstrates the widely used nslookup command in detail. Nslookup can be run in two modes: Interactive and Non-Interactive.
The Interactive mode is used to query DNS-Server about various domains and hosts. Non-Interactive mode is used to query about information of a domain or host.
1. Find out “A” record (IP address) of Domain
Above command query domain www.yahoo.com with 4.2.2.2 public DNS server and below section shows Non-authoritative answer: displays A record of www.yahoo.com
2. Find out Reverse Domain Lookup
3. Find out specific Domain Lookup.
4. To Query MX (Mail Exchange) record.
MX record is being used to map a domain name to a list of mail exchange servers for that domain. So that it tells that whatever mail received/sent to @yahoo.com will be routed to the mail server.
5. To query NS(Name Server) record.
6. To query SOA (Start of Authority) record.
6. To query SOA (Start of Authority) record.
7. To query all Available DNS records.
8. Enable Debug mode
To enable Debug Mode ‘set debug’ will return you verbose information like TTL, here’s the output.