Results 1 to 6 of 6

Thread: DHCP Server May Be Sending Wrong DNS To Clients

  1. #1
    Join Date
    Dec 2004
    Location
    Waterford, MI
    Beans
    1,042
    Distro
    Kubuntu

    DHCP Server May Be Sending Wrong DNS To Clients

    I have a strange issue with my DHCP server (which runs Ubuntu Server). When my client machines (also Ubuntu) connect, they get the following in /etc/resolv.conf:
    Code:
    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    nameserver 127.0.1.1
    search localnet
    However, I have the following in /etc/dhcp/dhcpd.conf on the server:
    Code:
    default-lease-time 86400;
    max-lease-time 86400;
    option subnet-mask 255.255.255.0;
    option broadcast-address 172.16.254.255;
    option routers 172.16.254.1;
    option domain-name-servers 172.16.254.5, 172.16.254.1;
    option domain-name "localnet";
    
    subnet 172.16.254.0 netmask 255.255.255.0 {
    range 172.16.254.200 172.16.254.250;
    }
    It doesn't appear that the hosts are getting applied the DNS servers I declared. Instead, they are getting localhost as the DNS server.

  2. #2
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    7,790
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: DHCP Server May Be Sending Wrong DNS To Clients

    Hi jlacroix.

    It looks like the clients are running 12.04, which it has set up by default a dnsmasq plug in.

    You can see the actual name servers being used by running (known as 'upstream servers' on dnsmasq's terminology):
    Code:
    cat /var/run/nm-dns-dnsmasq.conf
    Let us know how it goes.
    Regards.

  3. #3
    Join Date
    Dec 2004
    Location
    Waterford, MI
    Beans
    1,042
    Distro
    Kubuntu

    Re: DHCP Server May Be Sending Wrong DNS To Clients

    Quote Originally Posted by papibe View Post
    Hi jlacroix.

    It looks like the clients are running 12.04, which it has set up by default a dnsmasq plug in.

    You can see the actual name servers being used by running (known as 'upstream servers' on dnsmasq's terminology):
    Code:
    cat /var/run/nm-dns-dnsmasq.conf
    Let us know how it goes.
    Regards.
    There is no output with that command. Why would dnsmasq be a factor? I don't use that. I have a DHCP server running Ubuntu Server 12.04.

    The clients are running 12.10.

  4. #4
    Join Date
    Jun 2009
    Location
    0:0:0:0:0:0:0:1
    Beans
    5,169
    Distro
    Kubuntu

    Re: DHCP Server May Be Sending Wrong DNS To Clients

    i am not running a dhcp server at home but at my moms i am i have the dns server set under the subnet section
    Code:
    shared-network 224-29 {
        subnet 10.0.0.0 netmask 255.255.0.0 {
            range 10.0.0.100 10.0.0.199;
            option routers 10.0.0.1;
            option domain-name-servers 8.8.8.8,8.8.4.4;
        }
    }
    when i connect my laptop (running 12.10) it always gives me the right DNS server settings
    Laptop: ASUS A54C-NB91 (Storage: WD3200BEKT + MKNSSDCR60GB-DX); Desktop: Custom Build - Images included; rPi Server
    Putting your Networked Printer's scanner software to shame PHP Scanner Server
    I frequently edit my post when I have the last post

  5. #5
    Join Date
    Dec 2004
    Location
    Waterford, MI
    Beans
    1,042
    Distro
    Kubuntu

    Re: DHCP Server May Be Sending Wrong DNS To Clients

    Quote Originally Posted by pqwoerituytrueiwoq View Post
    i am not running a dhcp server at home but at my moms i am i have the dns server set under the subnet section
    Code:
    shared-network 224-29 {
        subnet 10.0.0.0 netmask 255.255.0.0 {
            range 10.0.0.100 10.0.0.199;
            option routers 10.0.0.1;
            option domain-name-servers 8.8.8.8,8.8.4.4;
        }
    }
    when i connect my laptop (running 12.10) it always gives me the right DNS server settings
    I tried that just now and it didn't work. Here is how my file looked after I modified it based on your suggestion:

    Code:
    default-lease-time 86400;
    max-lease-time 86400;
    option subnet-mask 255.255.255.0;
    option broadcast-address 172.16.254.255;
    option domain-name "localnet";
    
    subnet 172.16.254.0 netmask 255.255.255.0 {
    range 172.16.254.200 172.16.254.250;
    option domain-name-servers 172.16.254.5, 172.16.254.1;
    option routers 172.16.254.1;
    }

  6. #6
    Join Date
    Dec 2004
    Location
    Waterford, MI
    Beans
    1,042
    Distro
    Kubuntu

    Re: DHCP Server May Be Sending Wrong DNS To Clients

    I found the answer. The following command gives me the DNS client addresses that I'm actually using:

    Code:
    nmcli dev list iface eth0
    They show up correctly there.

    Thanks everyone!

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
  •