Open nogweii opened 2 months ago
It's a bit arbitrary to show AAAA records along with A. If it makes sense, you can alias/make a bash function to do the same? doggo A AAAA
I'd also argue it's a bit arbitrary to only show A. Especially with the recent pushes to move more and more to IPv6, I think it's time to re-evaluate that particular default. IPv4 won't go away, so showing only AAAA and not A wouldn't be correct.
I want to refer back to glibc's getnameinfo(3), it looks up both record types for the calling application. Which means most applications implicitly use IPv6 without any special configuration, and could cause confusion with dns tools: doggo example.com
returns an IPv4 address but the application actually connected to an IPv6 address. (How often that actually matters is probably quite rare these days. Most dual-stacks are the same host.)
I'm not expecting the default to change yet (even if I think it should), but was asking for a way to easily enable showing both-by-default. I see three options:
doggo -b example.com
? ("b" for both 😆)DOGGO_DEFAULT_BOTH
?I might be missing something, but that's my perspective.
Noted. 2 or 3 should be possible. Not willing to change default behaviour just after a major release. 😅
systemd's resolvectl
will query for both if a type is not specified:
$ resolvectl query google.com
google.com: 2a00:1450:400f:800::200e
142.250.74.14
nslookup
shares that behaviour:
$ nslookup google.com
Non-authoritative answer:
Name: google.com
Address: 142.250.74.14
Name: google.com
Address: 2a00:1450:400f:800::200e
Despite dig
and nslookup
typically being provided by the BIND package on Linux, dig
goes A only by default whereas nslookup
seem to lookup both.
Hi @mr-karan If anyone else is not working I would like to pick it up.
Hey. I was re-thinking about this, and adding a vague flag like --both
(esp when there are so many record types) is not clear. Additionally, I've also added --any
flag which queries all common record types.
So, I think 1) changing the default to show both A and AAAA should be alright? Also, now that the resolver lookup is concurrent, this shouldn't affect the default query latency too much either.
So, I am okay to change the default query type from just A to A and AAAA both, aligning with nslookup
/ resolvectl
.
@rohit1kumar You're free to pick this up, thanks.
When I type
doggo example.com
, I would like to see both A and AAAA records (properly indicated, of course). That's pretty similar to what most software does (thanks to them delegating to glibc, etc).Probably as a CLI flag?