0

I just installed two Ubuntu 14.04LTS servers. The first one I installed bind9 and isc-dhcp-server on. The second one was left as installed to use DHCP. I created a new private network using VMware fusion to prevent the DHCP server from getting out on the rest of my network and attached both machines to that network. This private network is a host only network and does not allow the host to attach to the network or for VMware to assign addresses. There is no internet connectivity or any other network connectivity. Just two VMs in isolation.

Both forward and reverse DNS resolve. DHCP successfully adds forward and reverse records for the client server. The second server gets all the proper information from the DHCP server EXCEPT for the DNS server to use. Despite what I put in domain-name-servers the client server always gets 127.0.1.1.

I do feel that 127.0.1.1 is being sent by the dhcp server not being overwritten by anything on the client server since the value shows up in /var/lib/dhcp/dhclient.eth0.leases. I feel like if it was being overwritten by something on the client server it would show the proper value in that file but I may be wrong.

Server Configuration

/etc/dhcp/dhcpd.conf

root@srv1:~# cat /etc/dhcp/dhcpd.conf
ddns-update-style interim;
ddns-domainname "example.net.";
ddns-rev-domainname "in-addr.arpa.";

log-facility local7;

subnet 172.16.163.0 netmask 255.255.255.0 {

    range 172.16.163.10 172.16.163.20;

    option domain-name-servers 172.16.163.1;
    option domain-name "example.net";
    option routers 172.16.163.1;
    option broadcast-address 172.16.163.225;

    default-lease-time 600;
    max-lease-time 7200;

}

key DHCP_UPDATER {
    algorithm HMAC-MD5.SIG-ALG.REG.INT;
    secret "xxxxxxxxxxxxxxxxxx==";
};

zone example.net. {
    primary 127.0.0.1;
    key DHCP_UPDATER;
}

zone 163.16.172.in-addr.arpa. {
    primary 127.0.0.1;
    key DHCP_UPDATER;
}

/etc/resolve.conf

root@srv1:~# cat /etc/resolv.conf
nameserver 172.16.163.1
search example.net

/etc/network/interfaces

root@srv1:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0

iface eth0 inet static
    address 172.16.163.1
    netmask 255.255.255.0
    gateway 173.16.163.1

Like I said everything seems to be operating fine except that the second server is not getting the proper DNS entry. If I manually choose the correct DNS server it can resolve just fine.

If my configs seem simplistic this is just a test in a VM lab environment not anything being exposed to the wild yet.

Thanks

  • 127.*.*.* is the loopback address. No DHCP server would hand this out, since it wouldn't make any sense. – Zoredache Jun 17 '14 at 21:58
  • Can you post the /etc/dhclient.conf (I think that's where ubuntu sticks it) config? – Zypher Jun 17 '14 at 21:59
1

I hate to post and then immediately post my own answer but when I was working on getting the DHCP client configuration and leases file I noticed about half a dozen lease entries. Just to create a clean file to post here I deleted that file and rebooted. After that it grabbed the proper DNS server info.

While I feel there was more to it my solution was to delete /var/lib/dhcp/dhclient.eth0.leases on the client and reboot.

0

It's quite hard to quess from not being able to see anything in real. but as a first shout, I would say that because example.net is the domain in the domain name of subnet and then you specify a place "from where" to update the zone example.net by 127.0.0.1 I guess that where your problem is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.