dig - difference between type ANY and A
by hunter86_bg from LinuxQuestions.org on (#5K0SJ)
I have recently noticed that my local firewall (which also plays the role of DNS) is behaving strangely and I got the following output:
Code:user@laptop:~> dig +noall +answer engine.localdomain ANY
user@laptop:~> echo $?
0
user@laptop:~> dig +noall +answer engine.localdomain A
engine.localdomain. 3600 IN A 192.168.1.2
user@laptop:~> echo $?
0The full output is:
Code:user@laptop:~> dig engine.localdomain
; <<>> DiG 9.16.6 <<>> engine.localdomain
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36115
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;engine.localdomain. IN A
;; ANSWER SECTION:
engine.localdomain. 3600 IN A 192.168.1.2
;; Query time: 0 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: 13 16:31:48 EEST 2021
;; MSG SIZE rcvd: 63What's the difference between ANY and A ? I always thought that ANY should provide the A and any other type of record for this system.
Code:user@laptop:~> dig +noall +answer engine.localdomain ANY
user@laptop:~> echo $?
0
user@laptop:~> dig +noall +answer engine.localdomain A
engine.localdomain. 3600 IN A 192.168.1.2
user@laptop:~> echo $?
0The full output is:
Code:user@laptop:~> dig engine.localdomain
; <<>> DiG 9.16.6 <<>> engine.localdomain
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36115
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;engine.localdomain. IN A
;; ANSWER SECTION:
engine.localdomain. 3600 IN A 192.168.1.2
;; Query time: 0 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: 13 16:31:48 EEST 2021
;; MSG SIZE rcvd: 63What's the difference between ANY and A ? I always thought that ANY should provide the A and any other type of record for this system.