Using dig I can query a specific DNS server for some DNS records, for instance

dig example.com A @

Where in this instance is my router's ip.

Is there a way, using dig or any other program, to find out what DNS servers my router is using? (when it doesn't have the query cached)

I have limited access to the router due to restrictions of the ISP. So in the web interface I cannot find anything.

  • are you asking how to find out which DNS servers your router itself is configured to use, when you don't have full access to the router?
    – Jeff Schaller
    Commented Apr 26, 2016 at 19:25
  • @JeffSchaller yes exactly! Commented Apr 26, 2016 at 19:26

1 Answer 1


You can use the +trace option to dig to see the entire sequence of queries, from your system to root servers, all the way down to the authoritative servers.

  • Great this seems to be what I'm looking when I use it on for example. However when I use it with my router it gives back nothing, just: ;; Received 12 bytes from in 11 ms. Does this mean it's disabled in the router somehow? Commented Apr 26, 2016 at 19:28
  • No, it means either the router has cached that the hostname you're looking up doesn't exist, or that the router doesn't have any referrers configured.
    – John
    Commented Apr 26, 2016 at 19:30
  • It could also mean that your router is configured to not answer your queries, which is fairly common in corporate environments, so if you bought a router from eBay and repurposed it for home use you really want to reconfigure it.
    – John
    Commented Apr 26, 2016 at 19:38
  • No the router is provided by my ISP and the disabled the admin side of the router for me, so I suppose it's also possible they would have disabled this. But this answers my original question, thanks! Commented Apr 26, 2016 at 19:41
  • While dig +trace is a very useful command, this does not answer the question at all and I can't see why OP marked it as such. OP asked about (confirmed) finding the chain of DNS servers that are used when local DNS queries are made. Trace goes from the bottom up, to find an authoritative answer, explicitly bypassing that normal resolution chain. It does nothing to inform the user how their queries are really resolved.
    – Walf
    Commented Sep 8, 2023 at 4:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .