How to Find Your Closest Anycast DNS Server with Dig

Most ISP deploys Anycast DNS server on their network and bring the closest DNS server to their user for DNS resolver. You may see a DNS server with a single IP Address but there are multiple DNS Servers running on different geographical location.

So which DNS server do you resolve it from? For example we run a query on DNS F Root Server

$ dig hostname.bind  txt ch +short

On the result, it shows that I am using as resolver. Some DNS server does reply “chaos” (ch) request but some refuse; for example Google DNS and Open DNS Server. So if your ISP is running Anycast DNS, you can try to lookup where is the DNS server locate.

There is another command perform checking via “id.server” query, it only helpful when the DNS has server-id configured.

dig id.server txt ch +short