dhcpd sends 127.0.1.1 as DNS server

Bug #340383 reported by Patrick Ben Koetter
42
This bug affects 9 people
Affects Status Importance Assigned to Milestone
dhcp3 (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

Binary package hint: dhcp3-server

I believe this is a bug.

Ubuntu configures sets the hostname in /etc/hosts and assigns it to 127.0.1.1:

127.0.0.1 localhost
127.0.1.1 server.example.com server

The dhcpd server picks this up and sends it as primary DNS server (DHCP and DNS are on the same machine here) to dhcp clients (see attached dhcpdump output).
Assigning the wrong DNS server leads to timeouts on Mac and Linux (Unix) clients, but it does not seem to affect Windows systems.

As soon as I comment 127.0.1.1 in /etc/hosts out and restart the dhcpd server the problem is gone.

I did not find a configuration option for dhcpd to supress this and I also think even if it was there it should not be used for this. The entry 127.0.1.1 seems to be wrong in my opinion.

Thanks.

Revision history for this message
Patrick Ben Koetter (p-state-of-mind) wrote :
Revision history for this message
Mathias Gug (mathiaz) wrote : Re: [Bug 340383] [NEW] dhcpd sends 127.0.1.1 as DNS server

On Tue, Mar 10, 2009 at 09:01:48AM -0000, Patrick Ben Koetter wrote:
> Ubuntu configures sets the hostname in /etc/hosts and assigns it to
> 127.0.1.1:
>
> 127.0.0.1 localhost
> 127.0.1.1 server.example.com server
>
> The dhcpd server picks this up and sends it as primary DNS server (DHCP and DNS are on the same machine here) to dhcp clients (see attached dhcpdump output).
> Assigning the wrong DNS server leads to timeouts on Mac and Linux (Unix) clients, but it does not seem to affect Windows systems.
>

Could you post /etc/dhcpd.conf and /etc/resolv.conf from the system
running the dhcpd server?

  status incomplete

--
Mathias Gug
Ubuntu Developer http://www.ubuntu.com

Changed in dhcp3:
status: New → Incomplete
Revision history for this message
Wowbagger (ha87psc02) wrote :

I have seen this as well.

In my case what is happening is this:

1) I have one interface which is dynamically assigned via DHCP (upstream to my ISP)
2) I have a second interface which is statically assigned (my local LAN interface).
3) I have a local name server (for caching and for local name resolution).
4) I have /etc/network/interfaces configured to statically assign the local interface, and to set the name server for the local interface to 127.0.0.1, so that when %#@()&*$ network manager OVERWRITES THE /etc/resolv.conf file I SET UP it will at least overwrite it correctly for the local machine.
5) HOWEVER, the same entity that is overwriting /etc/resolv.conf is also overwriting /etc/dhcp3/dhcpd.conf and setting the nameserver to 127.0.0.1, which is then served out to the network clients.

FIRST OF ALL: There should be a way I can tell the network manager scripts "I have configured these files - LEAVE THEM THE HELL ALONE!"

Second of all, the scripts should be "smart" enough to detect a nameserver of 127.0.0.1 and NOT set DHCPD to do that.

Chuck Short (zulcss)
Changed in dhcp3 (Ubuntu):
importance: Undecided → Wishlist
status: Incomplete → Confirmed
Revision history for this message
Pierre van Male (vmalep) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.