Author Topic: DNS Resolution  (Read 4450 times)

nasmith1985

  • Newbie
  • *
  • Posts: 9
    • View Profile
DNS Resolution
« on: September 24, 2009, 09:25:35 am »
I have a clean install of LinuxMCE 0710 from DVD with the recommended dual NIC setup. Everything seems to be working correctly except for my internet. My client machines receive an IP from the core, but cannot resolve domain names. If I change the domain-name-servers in dhcpd.conf to the router on my external network they are able to resolve dns, but this does not last as dhcpd.conf gets re-written upon reboot and/or adding new devices. Not sure where to go from here.

pigdog

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1105
    • View Profile
Re: DNS Resolution
« Reply #1 on: September 24, 2009, 03:55:32 pm »
HI,

Do a search on domain name resolution and/or domain name server back at the main forum page and see if one of those posts can help you out.

jimbodude

  • Guru
  • ****
  • Posts: 372
    • View Profile
Re: DNS Resolution
« Reply #2 on: September 24, 2009, 05:18:46 pm »
Is your core configured to have a static IP behind your router?  I had similar issues - basically, the router was having a bad time processing DNS requests, so name resolution wasn't working (or was so slow that requests timed out before the DNS response) for systems behind the core.

I now use OpenDNS for the core's upstream DNS server (not using DNS from the router or my ISP at all), and the problems have vanished.  You can configure this in the web admin under the Advanced menu; the IPs for OpenDNS's servers are on their website.

nasmith1985

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: DNS Resolution
« Reply #3 on: September 25, 2009, 07:24:29 pm »
That seemed to work, but only for about an hour. Now it looks like the client machines will resolve dns, but it's so slow that they end up timing out before resolution. I'm using OpenDNS's servers as recommended. 208.67.220.220, 208.67.222.222 This is an odd issue and I've tried looking through the forum and google for something related, but to no avail. Any help is most definitely appreciated!

jimbodude

  • Guru
  • ****
  • Posts: 372
    • View Profile
Re: DNS Resolution
« Reply #4 on: September 25, 2009, 07:30:10 pm »
Play around with dig ( http://www.manpagez.com/man/1/dig/ ) see if you can locate the issue more exactly.

MDs don't have dig - you need to install it with:
sudo apt-get install dnsutils

nasmith1985

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: DNS Resolution
« Reply #5 on: September 25, 2009, 07:54:24 pm »
Thanks for the reply, that link doesn't seem to work. I've never used dnsutils, but am trying to find a how-to on google.

jimbodude

  • Guru
  • ****
  • Posts: 372
    • View Profile
Re: DNS Resolution
« Reply #6 on: September 25, 2009, 07:59:38 pm »
Link works great here.

Just do:
man dig

after you install the dnsutils package. It's not a terribly complex program.

nasmith1985

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: DNS Resolution
« Reply #7 on: September 25, 2009, 08:21:57 pm »
Hmm, I used it, but I'm not exactly sure what I'm looking for in the results. Is there anyway that I can just change the default DNS server from 192.168.80.1?

jimbodude

  • Guru
  • ****
  • Posts: 372
    • View Profile
Re: DNS Resolution
« Reply #8 on: September 25, 2009, 08:37:07 pm »
...no, that will break everything - you would never be able to resolve "dcerouter" or any of your MDs.  You need to figure out why the Core's upstream DNS server is taking too long (or if it is taking too long).  Put the network settings back the way you found them, and locate the problem server.

If you read the man page for dig, you'll see that you can run DNS queries against different servers to see what the results are.  For instance, on the core, you can run
dig @127.0.0.1
to find out how well the Core's DNS is working or
dig @192.168.1.1
to see how the core does talking to the router (assuming that's your router's IP)

Run similar queries from the clients and the core on each of these DNS servers:
1) the core
2) the router (if there is a router on your external network before the internet modem)
3) your ISP's DNS
4) openDNS or other public DNS servers

You may need to add "+time=9999" if you're getting timeouts.  Switch up the host names that you query on - sometimes the resolved IPs are stored for a period of time for quicker retrieval.

Armed with the information from dig, you will understand where things are getting bogged down, and you can stop talking to the offending server.  In my case, it was the router and my ISP - so I was able to simply use OpenDNS for the core's upstream DNS servers.

nasmith1985

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: DNS Resolution
« Reply #9 on: September 25, 2009, 08:50:34 pm »
I used dig as suggested and got results for all options. Some had faster response times, the core and my router. I've used the web admin to use dns servers from opendns, my router, and my isp, but all produce the same result which leads me to believe it is something in the linuxmce configuration. I don't understand why I can change the dns in dhcpd.conf, restart dhcp3-server and then everything works, but when left up to linuxmce it fails. This is most annoying as my entire network is down. I love the idea of linuxmce and other than this small issue, everything else seems to be working.

jimbodude

  • Guru
  • ****
  • Posts: 372
    • View Profile
Re: DNS Resolution
« Reply #10 on: September 25, 2009, 10:47:36 pm »
After changing the DNS server settings in the web admin, what are you doing to make them take effect?  It sounds like the upstream DNS server is not being updated on the core's DNS server...  I haven't looked at how those settings end up in the configuration files in a while...

Use dig to check and see what servers are being used in the DNS request to make sure you're using what you expect.

If you're using the wrong upstream server, try
sudo /etc/init.d/bind9 restart
after changing the settings or reboot the machine.

nasmith1985

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: DNS Resolution
« Reply #11 on: September 25, 2009, 11:03:28 pm »
After updating the DNS servers from webadmin, I click update and the machine reboots itself. I checked named.conf.forwarders and it has the correct info. I suspect the problem lies within LinuxMCE because on the core I can access any website I wish, but on the clients I can only access websites by IP address.

jimbodude

  • Guru
  • ****
  • Posts: 372
    • View Profile
Re: DNS Resolution
« Reply #12 on: September 25, 2009, 11:13:45 pm »
From what I remember, DNS queries originating on the Core do not use the Core's DNS server - they go straight to the upstream server.  Local names are kept in the hosts file.

LinuxMCE doesn't do anything "magical" with DNS - it just configures bind...  There is either a configuration error, or a bug in bind.  Whatever you see in the configuration files is what is being used.

I'm not sure what else to tell you.  It's been quite a while since I've had any issues similar to this.  I've since started using the 0810 alpha release, so I can't even compare config files with you.

nasmith1985

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: DNS Resolution
« Reply #13 on: September 26, 2009, 08:30:12 pm »
This is really odd, I woke up this morning and dns resolution seems to be working. Hopefully it continues this way. Thanks for your help and guidance, I really appreciate it!

sk1

  • Regular Poster
  • **
  • Posts: 35
    • View Profile
Re: DNS Resolution
« Reply #14 on: September 26, 2009, 09:37:15 pm »
Sometimes it just takes a little while to get DNS to propagate across the internet, but in this case, across your network...   ;D