0

Ive written my own DNS request client but I'm having some interesting behavior.

If I send the request with the QTYPE section = 0xff, I get a valid response however with no entries.

My Request:
0x70 0x3c 0x1 0x0 0x0 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x6 0x67 0x6f 0x6f 0x67 0x6c 0x65 0x3 0x63 0x6f 0x6d 0x0 0x0 0xff 0x0 0x1 

Response: id=24729 query=google.com. answers=[] nameservers=[] additionals=[]
RAW:
0x60  0x99  0x83  0x80  0x0  0x1  0x0  0x0  0x0  0x0  0x0  0x0  0x6  0x67  0x6f  0x6f  0x67  0x6c  0x65  0x3  0x63  0x6f  0x6d  0x0  0x0  0xff  0x0  0x1 

However if I change the QTYPE to 0x01, then I get entries

Response: id=5496 query=google.com. answers=[A: name=. ttl=235 address=/172.217.4.174] nameservers=[] additionals=[]
0x15  0x78  0x81  0x80  0x0  0x1  0x0  0x1  0x0  0x0  0x0  0x0  0x6  0x67  0x6f  0x6f  0x67  0x6c  0x65  0x3  0x63  0x6f  0x6d  0x0  0x0  0x1  0x0  0x1  0xc0  0xc  0x0  0x1  0x0  0x1  0x0  0x0  0x0  0xeb  0x0  0x4  0xac  0xd9  0x4  0xae 

I would expect 0xff to return at least something considering its labeled in the RFC as "A request for all records". I'm very new to networking, so if someone can help me determine why this is correct behavior that would be greatly appreciated.

RFC for reference

QTYPE=0xff is All entries

QTYPE=0x01 is A host address

2
  • Programming questions are off-topic here. You might want to try on Super User. – Zac67 Oct 4 '20 at 18:48
  • 1
    While it looks like a programming question at first glance, that's not the problem. (it would be more correct to say DNS is off-topic) – Ricky Oct 4 '20 at 19:13
1

For security reasons (see also: DNS Amplification Attacks), many public DNS servers today ignore requests for "ALL".

Not the answer you're looking for? Browse other questions tagged or ask your own question.