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 192.168.1.1 in 1 ms.
Shows my IP as the source of information not one of the NS records.
How can I found out, where did it get that information?
EDIT: Output of the Alfred's suggestion
# dig foo.example.com +all
; <<>> DiG 9.9.3-rl.156.01-P1-RedHat-9.9.3-3.P1.fc17 <<>> foo.example.com +all
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 1612
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;foo.example.com. IN A
;; AUTHORITY SECTION:
example.com. 2924 IN SOA sns.dns.icann.org. noc.dns.icann.org. 2015082460 7200 3600 1209600 3600
;; Query time: 1 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: St dec 02 14:36:24 CET 2015
;; MSG SIZE rcvd: 101
#
Server 192.168.1.1 is localhost (my cashing name server) ;; SERVER: 192.168.1.1#53(192.168.1.1) I need to find out which Authoritative Name Server provided the answer.
No output for subdomain +nssearch
# dig foo.example.com +nssearch
# dig www.google.com +nssearch
# dig en.wikipedia.org +nssearch
# dig www.fsf.org +nssearch
#
But when asking for the domain which has it's own zone file, +nssearch gives an answer
# dig example.com +nssearch
SOA sns.dns.icann.org. noc.dns.icann.org. 2018050821 7200 3600 1209600 3600 from server 199.43.135.53 in 108 ms.
SOA sns.dns.icann.org. noc.dns.icann.org. 2018050821 7200 3600 1209600 3600 from server 199.43.133.53 in 160 ms.
;; no response from 2001:500:8d::53
# dig google.com +nssearch
SOA ns1.google.com. dns-admin.google.com. 203084235 900 900 1800 60 from server 216.239.32.10 in 25 ms.
SOA ns1.google.com. dns-admin.google.com. 203084235 900 900 1800 60 from server 216.239.36.10 in 25 ms.
SOA ns1.google.com. dns-admin.google.com. 203084235 900 900 1800 60 from server 216.239.38.10 in 25 ms.
SOA ns1.google.com. dns-admin.google.com. 203084235 900 900 1800 60 from server 216.239.34.10 in 37 ms.
;; no response from 2001:4860:4802:34::a
;; no response from 2001:4860:4802:32::a
;; no response from 2001:4860:4802:36::a
# dig wikipedia.com +nssearch
SOA ns0.wikimedia.org. hostmaster.wikimedia.org. 2018031919 43200 7200 1209600 3600 from server 91.198.174.239 in 23 ms.
SOA ns0.wikimedia.org. hostmaster.wikimedia.org. 2018031919 43200 7200 1209600 3600 from server 208.80.154.238 in 139 ms.
SOA ns0.wikimedia.org. hostmaster.wikimedia.org. 2018031919 43200 7200 1209600 3600 from server 208.80.153.231 in 151 ms.
# dig fsf.org +nssearch
SOA ns1.gnu.org. hostmaster.gnu.org. 2941143849 3600 300 3600000 3600 from server 46.43.37.70 in 35 ms.
SOA ns1.gnu.org. hostmaster.gnu.org. 2941143849 3600 300 3600000 3600 from server 208.118.235.164 in 110 ms.
;; no response from 2001:41c8:20:2d3::a
#
Thank you again Alfred.