Please could someone help me figure out how to list my hosts current DNS setup. It’s driving me a little nuts
Situation is as follows:
Host is multihomed, one static IP - my internal network, one Dynamic - assigned by my ISP.
I am runing my own DNS Server on the same host. Recently my ISP seems to have have some issue or other and relocated their DNS servers, as such my staic forwarders no longer worked. Removing the entry fixed the problem, however i’d really like to know where the requests are now forwarded to.
I’ve looked in both resolver.conf, and named.conf, neither of which list ipaddresses of the DNS servers (resolf.conf simply has the “search” entry and nothing else, named.conf has the forwarders section commented out.)
Is there some way of finding out exactly where my names are being resolved? I’m sure there must be and i’m just being dumb
On Thu, 2009-09-10 at 18:56 +0000, ColJay wrote:
> Hi All,
>
> Please could someone help me figure out how to list my hosts current
> DNS setup. It’s driving me a little nuts
cat /etc/resolv.conf
for DNS. Others sources of host resolution available/searched might be
configured inside of /etc/nsswitch.conf
>
> Situation is as follows:
>
> Host is multihomed, one static IP - my internal network, one Dynamic -
> assigned by my ISP.
>
> I am runing my own DNS Server on the same host. Recently my ISP seems
> to have have some issue or other and relocated their DNS servers, as
> such my staic forwarders no longer worked. Removing the entry fixed the
> problem, however i’d really like to know where the requests are now
> forwarded to.
If your DNS doesn’t contain the data (cached or otherwise), then the
process begins with the top and goes down the zones in the “domain” of
the thing your searching for. Normal DNS behavior.
>
> I’ve looked in both resolver.conf, and named.conf, neither of which
> list ipaddresses of the DNS servers (resolf.conf simply has the “search”
> entry and nothing else, named.conf has the forwarders section commented
> out.)
resolv.conf
>
> Is there some way of finding out exactly where my names are being
> resolved? I’m sure there must be and i’m just being dumb
Uh… yes and no on that one. DNS finds it… that’s all you’re really supposed to know. However, as I said, bascially it starts at the top finds the tld part, then the next, etc until you get some kind of answer back from a DNS server that “knows” the info… which may or may not be authoritative data (gets complicated). It’s designed to be hierarchical with caching so that lookups don’t get really inefficient… makes it scale pretty far.
If your isp is changing dns server addresses, either use a different forwarder address or change the local dns server to ‘ppd daemon sets forwarders’.
(This will make your dns server start at the tld server and work down.)
or
use a known dns server that is more stable.
To simplify what cjcox said:
The dns server starts at the top and asks the question:
What is the ipaddress of xxx domain?
The tldp server for the domain (.com, .co.uk, .net, etc.) has a choice of 2 answers:
Yes I know, it is ipaddress …
or
I don’t know but this server does.
This is repeated down the line until an answer is reached.
That is why there can only be one authorative server for the domain that knows all the answers for your domain.
Once it has discovered the answer, your local dns will cache/store the information for the length of time specified in the ttl (time to live) that has been set. If the ipaddress seldom changes, it will be a long time (weeks, say) but if it is a ddns (dynamic dns) it could be hours.
After the ttl, the server will repeat the process to find the new address.
So only searches my local network. I’m thinking that running DNS on the box seems to be bypassing my ISP, and going straight for root servers - is that what DIG is telling me? (as below)
Just thought i’d add to the post. Oh and it seems like the DNS servers are actually set to what i’d manually set them before :-D. Guess things are fixed
ColJay wrote:
> Hi All,
>
> Thanks for your answers. Most useful. resolv.conf contents:
> ==============================================>
> ### /etc/resolv.conf file autogenerated by netconfig!
…]
> search homeplace.net
Not a good thing to use a routable address or hostname as local net name.
$whois homeplace.net
…]
Contact: toho@hcm.vnn.vn
> ==============================================>
>
> So only searches my local network. I’m thinking that running DNS on the
> box seems to be bypassing my ISP, and going straight for root servers -
> is that what DIG is telling me? (as below)
Yup.
If you want to specify another DNS server to test, you can use:
$dig @na.me.ser.ver domaim.tld
Not my actual home network there, i’m using .myhouse as my top level :). Guess i should have thought a bt longer when editing the data prior to posting.