This question already has an answer here:
With resolvconf, dig always shows the loopback address. Is there anyway to see which server is actually answering?
|
This question already has an answer here: With resolvconf, dig always shows the loopback address. Is there anyway to see which server is actually answering? |
||||
|
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
|
That line of dig simply tells you where dig went for the answer, not its ultimate source. On your system, assuming it is Ubuntu 12.04 or later Desktop and you haven't disabled the local nameserver, dnsmasq is listening at the loopback address, port 53. Dnsmasq is a lightweight nameserver that uses other nameservers to resolve names. To see the server it uses enter the following:
or use aking1012's great suggestion:
In my case that's my router/modem, also running a lightweight server, obtained from my router/modem's DHCP server. I would have to sign on to the router and use a router-specific method to find out which dns server it uses. (It's configured by my ISP to forward to their domain name server). You can certainly override the domain name server your system uses with NetworkManager, or, if you use ifup instead of NetworkManager, in ifup's configuratino file /etc/network/interfaces. Assuming the request is forwarded to your ISP, the ISP's name server may do a recursive lookup to determine the answers, or, less probably, forward a recursive request even further. This chain of recursive requests continues until a domain name server is reached which is willing and able to do the full recursive look-up. It ends, perhaps prematurely, if there is no full domain name server before you reach one willing to respond to recursive requests. Most domain name servers won't do them for you, but an ISP will do them for its customers and business domain name servers will do them for their domains. You could install one yourself under Ubuntu. Google's 8.8.8.8 open domain name service will, as well. For any particular address I enter I might get the answer from dnsmasq if it has the answer in its cache, from my router/modem, if it has the answer in its cache, or from the ISP or beyond. Like aking1012, I don't think you can trace back the answers dig returns. If you want to know where such information might ultimately come from you may want to know where the source of authority information is kept for a domain. As an example:
Returns:
So the authoritative source of information about the domain bing.com can come from either ns1.msft.net or msnhst.microsoft.com. You can also track down information using the recursive algorithm a full domain name server does:
returns:
full domain name servers are configured with the address of at least one root server.
returns: ;; AUTHORITY SECTION:
returns
and
The Additional information section gives the domain name service address hints so it can easily find name servers. the CNAME record says that the canonical name for the alias www.google.com is www.l.google.com. Of course sites like google.com and msft.com do all kinds of things to distribute queries to various computers. |
||||
|
|
|
Not that I am aware of. You could use: It works for me. A cleaner invocation that doesn't rely on entering the interface name is: |
||||
|
|