With @(dns server ip here) you can query a different dns server to check what their answer is.
With +trace you can go through the complete dns chain from the root servers on to check for issues in the chain.
Sorry if this doesn’t help you or you knew this already.
dig -4 +short myip.opendns.com @resolver1.opendns.com
$ dig +short TXT o-o.myaddr.l.google.com @ns1.google.com
"A.B.C.D"
$ dig +short TXT o-o.myaddr.l.google.com
"172.253.195.202"
"edns0-client-subnet A.B.C.0/24"
$ dig +short TXT o-o.myaddr.l.google.com @9.9.9.9
"162.244.55.23"
$ dig +short TXT o-o.myaddr.l.google.com @1.1.1.1
"172.71.221.175"
The opendns implementation returns nothing if you try something similar to the last three.Akamai:
dig +short whoami.akamai.net @ns1-1.akamaitech.net
Google: dig +short o-o.myaddr.l.google.com txt @ns1.google.com
Cloudflare: dig +short whoami.cloudflare ch txt @1.1.1.1
OpenDNS: dig -4 +short myip.opendns.com @resolver1.opendns.com
Note that if you leave off the `@service.authoritative.nameserver` portion of all of the above, you get the IP address of the recursive resolver that your machine is configured to use. If you pass this to a service like https://ipinfo.io/, you can use this to figure out what company's DNS service is currently configured, be it your ISPs, or an internet company like Cloudflare/Google/Quad9.Arguably, that is the only valid reason to be using an IP address echoer via DNS, as if you truly wanted your own IP, you could fetch it far easier from a service like icanhazip.com.
Personally, Akamai's offering is by far the most useful and convenient--it's an A record, so you won't accidentally forget to add "txt" to your dig invocation, and has a very easy to remember name. Google's works too, though it requires remembering the strange domain name. Cloudflare tries to be cute and uses the Chaosnet DNS class, which while being an incredibly cool reference to internet history, unfortunately is not propagated by most public recursive resolvers. And like the parent comment mentions, OpenDNS somehow blocks requests that pass through a recursive resolver.
> And like the parent comment mentions, OpenDNS somehow blocks requests that pass through a recursive resolver.
https://web.archive.org/web/20131126131155/https://ndkyez8kh...
DNS is hard to implement, but for responding to a very specific type of query, should be easy?