3 ms·
It would be great if you could do a DNS lookup, and in the request, say I want x record types for y name. Like, give me A, AAAAA, CNAME and SRV records for appl
by amaccuish 8y ago
It would be great if you could do a DNS lookup, and in the request, say I want x record types for y name. Like, give me A, AAAAA, CNAME and SRV records for apple.com. I guess there's opportunity for abuse, but I think it would be better than ANY.
- JdeBP 8y agoIt would be better than ANY for starters because "any" does not mean "all". (-: * https://news.ycombinator.com/item?id=14720919 https://news.ycombinator.com/item?id=14720919 Of course, if we were redesigning the DNS protocol (which for what you want would be necessary, given how questions are structured) I would suggest being far more radical and not structuring things in terms of separate A, AAAA, CNAME, and SRV resource record sets in the first place; but rather in terms of <domain,transport,service> tuples and <priority,weight,address,port> tuples, as getaddrinfo() roughly is. Query goes out with <example.org,tcp,https>, full answer response comes back with a prioritized and weighted set of IPv4 and IPv6 addresses and port numbers (possibly with intermediate domain names, if one wanted to keep that concept in a redesigned protocol, which one possibly would not) all together.
- deleted 8y ago[deleted]
- pas 8y agoI'm wondering, is there support for multiple queries in one request in DOH (DNS over HTTPS)? Currently that looks like where browsers are most likely to try new things.
- lucb1e 8y agoYou can put in multiple queries in a single packet. It's just that the response header would be ambiguous (a NODATA status could refer to any one of your queries) and therefore not even a minority of clients or servers support this. It's right there in the protocol, we just need to figure out how to signal NODATA/NXDOMAIN/SERVFAIL/... for each individual query.
- amaccuish 8y agoDidn't know that thank you! I guess it should be more compact though. Sending multiple complete queries would almost certainly need TCP, not sure the browsers would like that. Then again I think we're getting to the point where DNS should now be considered a mostly TCP protocol.
- lucb1e 8y agoWith name compression, asking for multiple records wouldn't be that much work. The format is dead simple: http://www.tcpipguide.com/free/t_DNSMessageHeaderandQuestionSectionFormat-2.htm http://www.tcpipguide.com/free/t_DNSMessageHeaderandQuestion... A packet would look something like: A IN 38:mydomainnameislongerthanyourdomainname 3:com AAAA IN <2 bytes pointer> CNAME IN <2 bytes pointer> SRV IN <2 bytes pointer> So 43 bytes for the name (41 bytes data, 2 length fields), plus 4 bytes for the type and class, and 6 bytes (type, class pointer) for each additional type. Even if you would already consider 200 bytes to be a lot of overhead, that would fit `floor(200/6)`=33 question records, more than I think we'd ever use. (Sure, the exist more, but currently we only query for A and AAAA. The overhead of that, when using the current DNS format but using multiple queries in one packet, is a grand total of 6 bytes.) Pointer format: http://www.tcpipguide.com/free/t_DNSNameNotationandMessageCompressionTechnique-3.htm http://www.tcpipguide.com/free/t_DNSNameNotationandMessageCo...
- JdeBP 8y agoIt is time for https://news.ycombinator.com/item?id=503120 https://news.ycombinator.com/item?id=503120 . (-: