nslookup

nslookup [ -option ] [ name | - ] [ server ]

Nslookup is a program to query Internet domain name servers. Nslookup has two modes: interactive and non-interactive. Interactive mode allows the user to query name servers for information about various hosts and domains or to print a list of hosts in a domain. Non-interactive mode is used to print just the name and requested information for a host or domain.

To know A record of a domain, for example bizhat.com, do following

            server14# nslookup
            > bizhat.com
            Server:         216.39.90.2
            Address:        216.39.90.2#53

            Non-authoritative answer:
            Name:   bizhat.com
            Address: 65.98.61.140
            >
            

It resolve the domain name to IP: 65.98.61.140, this is A Record of the domain.

In the result, you see Non-authoritative answer: because you not not asking IP of the domain from the DNS server that really serve (authoritative) the domain name.

To check directly with the authoritative name server (the name server that serve the domain name), you need to use "server FQDN-OF-DNS-SERVER".

            server14# nslookup
            > server server10.hosthat.com
            Default server: server10.hosthat.com
            Address: 65.98.61.138#53
            > bizhat.com
            Server:         server10.hosthat.com
            Address:        65.98.61.138#53

            Name:   bizhat.com
            Address: 65.98.61.140
            > exit

            server14#
            

Here you have noticed there is no "Non-authoritative answer:" in result. This is because you are directly asking for A Record IP from a DNS server that host the domain name.

server10.hosthat.com is the hostname of the server that serves DNS for the domain name bizhat.com

If you need to see MX record, you can use "set type=MX", to change back to A Record mode, do "set type=A"

            server14# nslookup
            > set type=MX
            > bizhat.com
            Server:         216.39.90.2
            Address:        216.39.90.2#53

            Non-authoritative answer:
            bizhat.com      mail exchanger = 0 mail.gawab.com.

            Authoritative answers can be found from:
            > exit

            server14#
            

Get in touch with us

Questions? Concerns? Comments? We want to hear from you!
Drop us a line with whatever is on your mind and we will get back to you ASAP!!