Results 1 to 1 of 1
Thread: DNS command for troubleshooting
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Jun 2006
DNS command for troubleshooting
I have just found a wonderful guide of DNS command at : Linux Web Admin Information
Zone file database records divide DNS information into three primary types: NS (Name Server) records, MX (Mail Exchange) records, and A (Address) records. NS records indicate the name servers. MX records indicate the hosts that handle email delivery; the priority (pri) number indicates the order in which mail servers are used, with the lowest number receiving the highest priority. The A (Address) records map hostnames to IP addresses, the real names of machines.
The nslookup program allows the user to query Internet domain name servers interactively or non-interactively
Set the query type to the Name Server record. Future queries of names and IP addresses return the NS record from that host.
Restore the query type to the Address record.
Make server the default server that is queried.
Use the dig command to determine whether the name server for your domain is configured correctly.
You can quickly determine the Name servers of your host or any other host:
# dig ns your-host.com
# dig any your-domain-name.com
Reverse DNS from command line. Quick and easy way to look up a domain name given an IP address.
# dig -x 192.168.52.2
This is the simplest of the DNS commands. It is a quick way to determine the IP address of a hostname.
The host command accepts arguments that are either the fully qualified domain name or the IP address of the server when providing results.
# host <FQDN, domain names, host names, or host numbers>
# host 192.1168.52.2
# host -a <domain names >
# host -a redhat.com
The -a option will return all of the DNS information in verbose format:
www.your-domain-name.com, try a reverse lookup:
# host <IP address>
# host -l <domain names>
# host -l redhat.com
The dnsquery program queries domain name servers via the resolver library calls /etc/resolv.conf.