Questions tagged [dig]

dig is a command-line client to make queries against DNS servers, the Internet name servers.

dig is a command-line client that allows you to make queries against DNS servers, which are servers that provide the Internet name service. While querying DNS servers is part of most Internet based applications (like web browsers, chat clients, email tools and so forth), those queries are done by the clients in the background, and without any user intervention. dig allows you to make such queries explicitly from the command-line. This is usually interesting for people that maintain DNS servers and want to test them, or network administrators that want to inspect name resolution in a particular network.

dig is part of the BIND software package, which runs on POSIX platforms, but ports to the Windows platform exist. An alternative tool is nslookup, but dig is usually preferred for its better configurability and scriptability.

This tag should be added to questions that explicitly refer to the dig tool and its workings. Related tags are dns, nslooup, domain-name and bind.

Further information:

215 questions
8
votes
2 answers

How to find what Authoritative Name Server provided the answer using dig?

I need to check the differences in records on master and slave when making changes. Is there some option for dig to show which Authoritative Name Server provided the answer? for example dig example.com +short +identify 93.184.216.34 from server…
Aas
  • 178
  • 1
  • 2
  • 9
8
votes
4 answers

Why doesn't `dig` show records?

Every time I use dig I get a vague feeling that I'm not really sure whether it's giving me correct data. Now I've used it like this: # dig socialimpactportfolio.com ; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> socialimpactportfolio.com ;; global…
Ram Rachum
  • 5,011
  • 6
  • 33
  • 44
7
votes
1 answer

Understanding the Difference Between DNS Resolvers

Intro In the attempt to debug a networking issue local to our intranet, it became apparent that curl host nslookup and dig behave differently. Where dig and host returns the IP address of the URL in question, curl and nslookup return: curl: (6)…
7
votes
4 answers

bind not able to query some servers / domains

We have been experiencing problems with our company's DNS server when trying to resolve only certain domains, we are running BIND 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6 on a CentOS 6.5 server. We are autoritative for some zones and our internal clients…
dragonov7
  • 71
  • 1
  • 4
7
votes
2 answers

How to determine which DNS server has the authority to set rDNS (PTR records)?

or to re-phrase... How to determine to whom authority has been delegated to set rDNS? Background In a multi-tier environment, where a block of IP's is assigned, then further split and assigned (process repeats a few more times), how can one…
Peter White
  • 576
  • 1
  • 7
  • 17
7
votes
3 answers

Combining dig +short command

This command will show the output of MX record: dig @ns1.myname.com myname.com +short MX and this will output A record: dig @ns1.myname.com myname.com +short A My question is how to output both A and MX with +short in one output display?…
sg552
  • 389
  • 3
  • 4
  • 11
7
votes
1 answer

Why do dig, host and nslookup return different results?

It seems my default (router) DNS server returns different results depending on the tool used to query it. Using dig: $ dig @192.168.1.2 test.example.com ; <<>> DiG 9.16.8-Debian <<>> @192.168.1.2 test.example.com ; (1 server found) ;; global…
Jaap Joris Vens
  • 561
  • 2
  • 7
  • 18
5
votes
4 answers

Determine if DNS server is master or slave with DiG

Is there a way to use DiG or nslookup to determine if a server is set to Master or Slave? And if a server is slave, return the Master's IP address?
Michael Moser
  • 219
  • 2
  • 4
  • 16
5
votes
1 answer

Why does dig +trace seem to ignore the DNS glue records?

Here are my questions: Why does dig +trace ignore the Glue Records? Is this behavior specific to dig or dig +trace, or does a recursive name server also "manually verify" glue records it receives? Here is the longer explanation: This is the full…
Eddie
  • 183
  • 6
5
votes
1 answer

Why does dig +trace sometimes fail against Windows Server DNS?

My team has a server pointing at the DNS supplied by Active Directory to ensure that it is able to reach any hosts managed by the domain. Unfortunately, my team also needs to run dig +trace frequently and we sporadically get strange results. I am a…
Andrew B
  • 31,858
  • 12
  • 90
  • 128
5
votes
1 answer

Using dig axfr to perform a zone transfer from a Windows Server 2012 DNS server

I'm working on setting up host auto-discovery for Nagios using DNS records. When I try to use dig axfr to do a zone transfer (dig axfr local.domain.com), however, I get the following output: [jwestbury@nagiosv local]# dig AXFR local.domain.com ;…
James Westbury
  • 145
  • 1
  • 2
  • 11
5
votes
3 answers

Simple dig output?

In a script I want to be able to write an IP address to somewhere easily, so I thought using dig (or a similar command) with back-ticks. However the simplest output I've been able to come up to wrt dig parameters is > dig -t A +noall +answer…
knocte
  • 347
  • 1
  • 6
  • 18
5
votes
4 answers

DNS Subdomain delegation issue

(Updated the post with more detailed example) I have my domain: example.com setup at DNS provider 1. Provider 1 has nameservers: ns1.dns1.com ns2.dns1.com I want to delegate authority for subdomain.example.com to another DNS provider, provider 2,…
Catalin
  • 53
  • 1
  • 1
  • 4
5
votes
3 answers

able to dig a hostname but doesn't resolve via ssh or ping

I am using Snow Leopard and cannot ping or ssh into a host but am able to dig: dig some.value.host.com When the ip address comes back in the answer section, then I am able to ssh via ip address ( ssh myname@12.45.45.12). Previously (> 1 week ago),…
timpone
  • 235
  • 4
  • 11
5
votes
1 answer

Querying and verifying dnssec

I hear http://www.isoc.org/ has Domain Name System Security Extensions on its DNS records. How do I see and verify the DNS using the tool dig?
hendry
  • 667
  • 2
  • 10
  • 23
1
2
3
14 15