Page 3 of 3 FirstFirst 123
Results 21 to 24 of 24

Thread: dhclient dns info from ISP not reaching resolvconf

  1. #21
    Join Date
    Apr 2007
    Beans
    26

    Question Re: dhclient dns info from ISP not reaching resolvconf

    Quote Originally Posted by cariboo907 View Post
    If you are using the desktop version, removing network manager, may solve your problem. Or you can download the server iso here, and restart without all the extra cruft the desktop version adds.
    Well, the situation is that I want to use it as a desktop as well. The machine is a gateway and server for the LAN but it's also my media center in my living room

    My innate insanity tells me to carry on trying it the hard way, rather than ditching my current installation and starting from scratch.

    More rationally, if I did have a server platform install, my guess is that I would probably then have issues with desktop stuff like sound or fonts or something.

    Anyway, that argument aside, I did remove --purge network-manager a while back.

    The current state of play is that dnsmasq is killing the dns nameserver entries in /etc/resolv.conf which dhclient puts there, one from the ISP and two (set by me) from the /etc/network/interfaces file.

    Could it be something really basic like the boot sequence? Should dnsmasq come up before dhclient sets up eth0? At the moment when I start it manually with the correct nameservers already in /etc/resolv.conf, it foobars them.

  2. #22
    Join Date
    Apr 2007
    Beans
    26

    dnsmasq issue?

    Actually just read this from www.thekellys.org.uk:

    In the simple configuration described above, processes local to the machine will not use dnsmasq, since they get their information about which nameservers to use from /etc/resolv.conf, which is set to the upstream nameservers. To fix this, simply replace the nameserver in /etc/resolv.conf with the local address 127.0.0.1 and give the address(es) of the upstream nameserver(s) to dnsmasq directly. You can do this using either the server option, or by putting them into another file, and telling dnsmasq about its location with the resolv-file option.
    so it looks like this is meant to happen.

    However I want dnsmasq to pick up the nameserver from my ISP automatically - sounds to me like an incompatibility. I will read on...

    OK there is a lot here. It looks like I need to set dhclient to write the name servers to a different file from /etc/resolv.conf and tell dnsmasq to read that.

    dnsmasq integrates dns-caching with dhcp for the lan really well. It seems to me that there is a big overlap in functionality between dns and dhcp so dnsmasq really makes sense as a solution. Helps me overcome my minimalist tendencies to research whether I can find and install a light-weight DNS server and a lightweight DHCP server
    Last edited by ahardy66; August 22nd, 2012 at 12:20 PM.

  3. #23
    Join Date
    Sep 2006
    Location
    Sol/Earth, MW, Univ 43325
    Beans
    27
    Distro
    Ubuntu

    Lightbulb Re: dhclient dns info from ISP not reaching resolvconf

    Solution:

    Code:
    sudo apt-get purge dhcp3-client
    Now instead of overwriting the /etc/resolv.conf, the symlink remains and the dhclient entry gets prepended as the top resolver between the head and tail of resolvconf.

    dhcp3-client is a old transitional package to the supported isc-dhcp-client. dhcp3-client kept it's config files under /etc/dhcp3 while isc-dhcp-client uses /etc/dhcp. I had two dhclient.conf files on my system. dhclient was using the wrong config.

    The Ubuntu supported isc-dhcp-client package includes a hook that runs as a script to function with resolvconf, located under /etc/dhcp/dhclient-enter-hooks.d/resolvconf

  4. #24
    Join Date
    Mar 2005
    Beans
    211

    Re: dhclient dns info from ISP not reaching resolvconf

    Quote Originally Posted by ahardy66 View Post
    Rats. Re-installing dnsmasq just brought back the problem. dnsmasq puts 127.0.0.1 into resolv.conf and chucks out the actual DNS server.

    I guess it's a dnsmasq issue so I'll do some more googling on dnsmasq and start a new thread if I still can't solve it.
    I gather you wanted the DHCP-server functionality of dnsmasq but not the DNS nameserver functionality. In that case you should set

    IGNORE_RESOLVCONF=yes

    in /etc/default/dnsmasq and edit /etc/dnsmasq.conf to disable DNS functionality. The following

    port=0

    should to it. After changing these settings do

    /etc/init.d/dnsmasq restart

    Now the dnsmasq initscript won't submit 127.0.0.1 as a nameserver address to resolvconf, so you should see upstream nameserver addresses in resolv.conf instead.

    If you still have problems please write to me directly at jdthood AT gmail DOT com.
    Last edited by jdthood; October 29th, 2012 at 09:48 PM.

Page 3 of 3 FirstFirst 123

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •