In our last article we have showed you the most used 8 Nslookup commands with their examples, now here we come with another command line tool called Dig, which is much similar to Linux Nslookup tool. We will see the usage of dig command closely with their examples as shown below.
1. Query Domain “A” Record
Above command causes dig to look up the “A” record for the domain name yahoo.com. Dig command reads the /etc/resolv.conf file and querying the DNS servers listed there. The response from the DNS server is what dig displays.
Let us understand the output of the commands:
- Lines beginning with ; are comments not part of the information.
- The first line tell us the version of dig (9.8.2) command.
- Next, dig shows the header of the response it received from the DNS server
- Next comes the question section, which simply tells us the query, which in this case is a query for the “A” record of yahoo.com. The IN means this is an Internet lookup (in the Internet class).
- The answer section tells us that yahoo.com has the IP address 72.30.38.140
- Lastly there are some stats about the query. You can turn off these stats using the +nostats option.
2. Query Domain “A” Record with +short
By default dig is quite verbose. One way to cut down the output is to use the +short option. which will drastically cut the output as shown below.
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
► Read more: http://adf.ly/1n5oBC
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
No comments:
Post a Comment