-2

I am trying to send dns query with NAPTR+SRV+A query but after NAPTR query it dns send NAPTR response with NS response and with additional records that is SRV and A but I want to send SRV and A query exclusively.

  • 1
    I am unable to really understand the question. Can you clarify what the question and/or actual goal is as? I think that it would also make it easier if you could show what you sent and received rather than only describing it in words. – Håkan Lindqvist Aug 13 at 18:18
  • I want dns response like this: 3 10.19.89.10 ? 10.10.10.10 DNS 79 Standard query 0x0000 NAPTR peer.newdns.co 4 10.10.10.10 ? 10.19.89.10 DNS 135 Standard query response 0x0000 NAPTR peer.newdns.com NAPTR 10 0 s 5 10.19.89.10 ? 10.10.10.10 DNS 89 Standard query 0x0000 SRV _sip._udp.peer.newdns.com 6 1.179967663 10.10.10.10 ? 10.19.89.10 DNS Standard query response 0x0000 SRV _sip._udp.peer.newdns.com SRV 40 50 4581 peer.newdns.com SRV 21 50 7888 peer.newdns.com SRV 80 50 4581 peer.newdns.com 7 10.19.89.10 ? 10.10.10.10 DNS 79 Standard query 0x0100 A peer.newdns.com – Shivani Aug 13 at 18:40
  • But instead I am getting it like: 1 6927.033493693 10.54.41.42 ? 10.10.10.10 DNS 79 Standard query 0x0000 NAPTR peer.newdns.com 2 6927.034282436 10.10.10.10 ? 10.54.41.42 DNS 291 Standard query response 0x0000 NAPTR peer.newdns.com NAPTR 10 0 s NS indns02.newdns.com A 10.30.40.78 A 10.10.10.10 AAAA fd00:10:6b50:4510::51 SRV 10 50 8090 peer.newdns.com SRV 20 50 8099 peer.newdns.com – Shivani Aug 13 at 18:43
  • It should ideally go for SRV and A query after dns sends NAPTR response but instead after NAPTR query I am getting NAPTR response along with NS response having additional records i.e SRV and A – Shivani Aug 13 at 18:46
  • 1
    So the question is about why there is additional data in the initial response? Or what is the actual question? Regardless, I would recommend that you edit this additional data into the question (preferably formatted in a readable way). – Håkan Lindqvist Aug 13 at 18:56
1

I am trying to send dns query with NAPTR+SRV+A query

If you mean doing one DNS query for multiple record types at the same time, then no, this is not possible under current DNS specifications.

There have been various works and ideas floating around to do that (specially to be able to get A and AAAA records together) but nothing emerged as a standard, so you have to do multiple queries, one per record type.

If instead your question is why a query for NAPTR returns more than just NAPTR records, you may wish to read section "Flags" of https://tools.ietf.org/html/rfc2915 (which describes NAPTR) as it has the following:

DNS servers MAY interpret these flags and values and use that information to include appropriate SRV and A,AAAA, or A6 records in the additional information portion of the DNS packet. Clients are encouraged to check for additional information but are not required to do so.

(A6 being of course today completely deprecated, but that is another story).

| improve this answer | |

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