nslookup
Use this command to query the DNS server for domain name or IP address mapping or for any other specific DNS record.
Syntax
execute nslookup name <fqdn | ip> type <type> class <class> server <dns_server> port <port_number>
Example
You could use this command to determine the DNS resolution for the fully qualified domain name mail.example.com
execute nslookup name mail.example.com
The CLI would display the following:
Name: example.com
Address: 192.168.1.15
Similarly, you could use this command to determine the domain name hosted on the IP address 192.168.1.15:
execute nslookup name 192.168.1.15 type ptr
The CLI would display the following:
Address: 192.168.1.15
Name: mail.example.com
You could also use this command to determine the host that is mail exchanger (MX) for the domain example.com:
execute nslookup name example.com type mx
The CLI would display the following:
example.com mail exchanger = 10 mail.example.com.