Bug 404663

Summary: DHCP does not update DNS when configured to do so in Yast on x86_64
Product: [openSUSE] openSUSE 11.3 Reporter: David Rankin <drankinatty>
Component: NetworkAssignee: Bin Li <bili>
Status: VERIFIED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Critical    
Priority: P2 - High CC: cmaessen, forgotten_bEGezgeaZI, htenberge, ian, opensuse.lietuviu.kalba, r.ems, radmanic, rob
Version: Final   
Target Milestone: Final   
Hardware: x86-64   
OS: openSUSE 11.3   
Whiteboard: .
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Deadline: 2011-06-23   
Attachments: /var/log/NetworkManager

Description David Rankin 2008-06-27 19:13:36 UTC
Devs,

    11.0 doesn't update dns when using either dhcpcd or dhclient. This occurs over both wired (dhcpcd) and wireless (dhclient) connections. Yast is configured with "[x] Update DNS data via DHCP", just as it aways is by default. Both wired and wireless connect fine and receive address, gateway, wins and dns info just fine. The problem is that the client does not update DNS with its hostname to allow it to be found on the network.

    Example: 11.0 x86_64 laptop connecting wirelessly.

Jun 25 22:08:46 acrp205d rcnetwork: Starting the NetworkManager
Jun 25 22:08:50 acrp205d kernel: r8169: eth0: link down
Jun 25 22:08:50 acrp205d kernel: ADDRCONF(NETDEV_UP): eth0: link is not ready
Jun 25 22:08:52 acrp205d avahi-daemon[2350]: Registering new address record for fe80::21b:9eff:fea9:382d on ath0.*.
Jun 25 22:09:01 acrp205d kernel: ath0: no IPv6 routers present
Jun 25 22:15:33 acrp205d dhclient: Internet Systems Consortium DHCP Client V3.0.6
Jun 25 22:15:33 acrp205d dhclient: Copyright 2004-2007 Internet Systems Consortium.
Jun 25 22:15:33 acrp205d dhclient: All rights reserved.
Jun 25 22:15:33 acrp205d dhclient: For info, please visit http://www.isc.org/sw/dhcp/
Jun 25 22:15:33 acrp205d dhclient:
Jun 25 22:15:33 acrp205d dhclient: wifi0: unknown hardware address type 801
Jun 25 22:15:33 acrp205d dhclient: wifi0: unknown hardware address type 801
Jun 25 22:15:33 acrp205d dhclient: Listening on LPF/ath0/00:1b:9e:a9:38:2d
Jun 25 22:15:33 acrp205d dhclient: Sending on   LPF/ath0/00:1b:9e:a9:38:2d
Jun 25 22:15:33 acrp205d dhclient: Sending on   Socket/fallback
Jun 25 22:15:33 acrp205d dhclient: DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 5
Jun 25 22:15:34 acrp205d dhclient: DHCPOFFER from 192.168.6.17
Jun 25 22:15:38 acrp205d dhclient: DHCPREQUEST on ath0 to 255.255.255.255 port 67
Jun 25 22:15:38 acrp205d dhclient: DHCPACK from 192.168.6.17
Jun 25 22:15:38 acrp205d avahi-daemon[2350]: Joining mDNS multicast group on interface ath0.IPv4 with address 192.168.6.135
.
Jun 25 22:15:38 acrp205d avahi-daemon[2350]: New relevant interface ath0.IPv4 for mDNS.
Jun 25 22:15:38 acrp205d avahi-daemon[2350]: Registering new address record for 192.168.6.135 on ath0.IPv4.
Jun 25 22:15:38 acrp205d dhclient: bound to 192.168.6.135 -- renewal in 1408 seconds.
Jun 25 22:15:39 acrp205d nm-dispatcher.action: Script '/etc/NetworkManager/dispatcher.d/autofs' exited with error status 1.
Jun 25 22:15:39 acrp205d SuSEfirewall2: SuSEfirewall2 not active
Jun 25 22:15:39 acrp205d nm-dispatcher.action: Script '/etc/NetworkManager/dispatcher.d/netcontrol_global_hooks' exited wit
h error status 1.
Jun 25 22:15:39 acrp205d nm-dispatcher.action: Script '/etc/NetworkManager/dispatcher.d/nfs' exited with error status 2. 

    After connect, the server DNS (bind 9.4.1 openSuSE 10.3 x86_64) is not updated with the client information. All other machines (10.3, xp, and god forbid vista) all work OK. Here is the DNS zone after connect by "acrp205d":

$ORIGIN .
$TTL 172800     ; 2 days
3111skyline.com         IN SOA  nirvana.3111skyline.com. root.nirvana.3111skyline.com. (
                                2008030946 ; serial
                                86400      ; refresh (1 day)
                                7200       ; retry (2 hours)
                                3600000    ; expire (5 weeks 6 days 16 hours)
                                172800     ; minimum (2 days)
                                )
                        NS      nirvana.3111skyline.com.
                        NS      nemesis.3111skyline.com.
                        MX      10 nirvana.3111skyline.com.
                        MX      20 nemesis.3111skyline.com.
$ORIGIN 3111skyline.com.
$TTL 10800      ; 3 hours
alchemy                 A       192.168.6.102
$TTL 172800     ; 2 days
ftp                     CNAME   nirvana
gw                      A       192.168.6.13
$TTL 14400      ; 4 hours
kidsdell                A       192.168.6.150
                        TXT     "31187155d49801422fdafba6e674914fe6"
$TTL 172800     ; 2 days
lakehouse               A       192.168.6.20
localhost               A       127.0.0.1
mail                    CNAME   nirvana
nemesis                 A       192.168.6.16
nirvana                 A       192.168.6.17
$TTL 10800      ; 3 hours
Rankin-P35a             A       192.168.6.101
$TTL 86400      ; 1 day
ripper                  A       192.168.6.149
                        TXT     "313c41f262462bc25dedc4fa3bb99bc318"
$TTL 172800     ; 2 days
trinity                 A       192.168.6.18
www                     CNAME   nirvana
zion                    A       192.168.6.19

    Reverse zone is likewise not updated. This may apply equally to 11.0 i386 as well, but I haven't tested. Let me know what else I can send you and I'll be happy to do so. Not knowing more, it looks like a problem with "nm-dispatcher."
Comment 1 Robert Vojcik 2008-07-08 16:38:39 UTC
hello, 

hmm I am not sure if I realy understand your problem but I think this is not a bug.
DHCP client update only ip adress and dns servers in /etc/resolv.conf where are DNS servers which you use for resolving hostnames. 

It doesn't update any record in bind zones informations.

Comment 2 David Rankin 2008-07-09 19:00:03 UTC
Hello Robert,

    Thanks for looking into this with me. I agree with your statement about /etc/resolv.conf, but disagree about your conclusion regarding whether there is a bug. The /etc/resolve.conf is:

13:44 acrp205d~> cat /etc/resolv.conf
nameserver 192.168.6.17
search 3111skyline.com


    Specifically, since SuSE 8.0 pro, I have run servers with BIND configured to accept dynamic updates from dhcpd to update the forward and reverse zones. See:

/usr/share/doc/packages/dhcp-server/DDNS-howto.txt included in the 11.0 dhcp-server documentation.

<quote>

Short outline of how things work together:
  - DHCP clients send their preferred hostname along the request
  - dhcpd acknowledges the lease
  - dhcpd contacts named, asking it to update the zone, using an HMAC-MD5 key
    (TSIG, short for transaction signature) for authentication
  - named updates the zone (and rewrites the zone files periodically)
  - when the lease times out or is freed, named will remove it

</quote>

That is what is broken for 11.0 clients, whatever you call it. For some reason in the dhcp transaction with 11.0 clients, the zone files are not updated with the client preferred hostname and IP.

    For the above server "nirvana" it servers roughly 4-Win XP, 3-openSuSE 10.3, 1-vista and 1-opensuse 11.0 client. Every client except the 11.0 client properly cause the BIND zones to be updated with the preferred hostname and IP. For some reason the 11.0 client will not do this. That is the bug. It doesn't matter whether the 11.0 client establishes the connection via eth0 or wirelessly with ath0, the result is the same.

    Let me know what else I can send. Thanks.


Comment 3 David Rankin 2008-07-09 20:20:01 UTC
sorry, forgot to change the status...
Comment 4 Forgotten User bEGezgeaZI 2008-07-09 21:11:52 UTC
I have the same problem. After upgrading a client to 11.0 DynDNS on the server (10.3) was not working any more.

I found out that dhclient doesn't send the hostname during DHCPREQUEST. My DHCPD does not send a hostname to the clients (via setting a ddns-hostname) and so it has no hostname to update the zone.

There is an option in Yast -> Network settings -> General -> DHCP Client -> Hostname.
This option was set to AUTO, but even setting the hostname there does not help.

There is a forum post related to the problem: http://forums.opensuse.org/network-internet/387180-hostname-issues.html

They found a workaround by setting:
send host-name "computername";
in /etc/dhclient.conf.

It seems to me that the mentioned option in Yast does nothing at all.
Comment 5 Michal Zugec 2008-07-10 09:04:48 UTC
from log:
Jun 25 22:08:46 acrp205d rcnetwork: Starting the NetworkManager
...

reassigned to NetworkManager maintainer
Comment 6 Rob Hasselbaum 2008-07-26 22:38:57 UTC
Confirmed here as well with 32-bit version of openSUSE 11.0. Version 10.3 worked fine.
Comment 7 Jay Mistry 2008-08-28 17:50:22 UTC
Hello,

Not sure if my problem is related to the above bug. Am using the x86 (32-bit) version of openSUSE 11 & the following relates to that. 

The problem is as follows- (mentioned between the "=====" lines for
sake of clarity-
===============================================================================

On openSUSE 11.0 with updates (as of 27 Aug 08), the net connection using a DSL Router connected through a USB port (detected as eth1: TI NDIS USB Device, where TI = Texas Instruments) worked fine till now (installed a week ago) ; but by error I altered the connection settings to include DHCP (i.e. obtain DNS Name addresses via DHCP). Now, I cannot configure it connect using a static IP & using the DNS Servers that the ISP provides.

Now, the 'Update DNS data via DHCP' box remains checked (it is greyed out, as seen in the picture) & I cannot connect to the web. The screenshot is that of the Yast Network Configuration screen with the error is here -

http://lvznow.bay.livefilestore.com/y1p8roNEK4Ir1jpwshCeT66N06PsZGI5uIOHrNuoq7VAGwRfbcwHxg2Xrz2rIIcTYgg4mAY4olQsvo/Screenshot-Network%20Settings%20-%20YaST_28Aug08.jpg

I have a feeling that if I can get rid of the DHCP-enable option (the grayed-out button in the pict in url above), then after changing to static IP & DNS (ie I would enter them manually from provided by ISP), it would resolve the problem, since the past week, I had net access with the static IP option).  Any suggestions/further steps on how to resolve this?

PS:
- On shutting down the system yesterday, there was a message stating
the eth1 (TI NDIS USB Device) connection was not detected/changed &
that I should file a bugzilla report. It scrolled out too fast for to
note the exact message.

- I have not added any additional hardware or made any significant
system changes other checking the DHCP one (obtain IP Address & update
DNS address via DHCP) by mistake; that I can't seem to reverse now.

- eth0 is the inbuilt ethernet card (mcp73) of the mainboard (nvidia 610i chipset). I do not use this for networking or connecting to the net.
================================================================================

Thanks,
Comment 8 Brandon Philips 2008-11-04 20:11:54 UTC
In 11.1 Beta3 I still need to set send host-name "computername"; in /etc/dhclient.conf.

Can this be fixed by RC1?
Comment 9 Tambet Ingo 2008-11-05 08:33:24 UTC
> In 11.1 Beta3 I still need to set send host-name "computername"; in
> /etc/dhclient.conf.

You can do that - go to NM's connection editor, choose the connection, click edit, go to "IPv4 Settings" tab and specify the host name in "DHCP Client ID" field.
Comment 10 Brandon Philips 2008-11-05 21:43:10 UTC
(In reply to comment #9 from Tambet Ingo)
> > In 11.1 Beta3 I still need to set send host-name "computername"; in
> > /etc/dhclient.conf.
> 
> You can do that - go to NM's connection editor, choose the connection, click
> edit, go to "IPv4 Settings" tab and specify the host name in "DHCP Client ID"
> field.

No, this doesn't work.

"send dhcp-client-identifier" is not the same as "send host-name".  And according to the dhclient.conf that network manager generates it is sending a dhcp-client-identifier <value of DHCP Client ID box>.

Comment 11 Tambet Ingo 2008-11-19 09:37:06 UTC
Ah right, my mistake. You can configure "send host-name" directly in /etc/dhclient.conf file (as comment #4 already suggests). NM will overrider the "send dhcp-client-identifier" from that configuration file with the value from connection editor (if set), but all the other variables are still used.

What do you think of an idea of always using "send host-name" when static hostname is used? Would it produce any side effects?
Comment 12 Brandon Philips 2008-11-20 08:55:39 UTC
(In reply to comment #11 from Tambet Ingo)
> What do you think of an idea of always using "send host-name" when static
> hostname is used? Would it produce any side effects?

I think this is reasonable. 

You may consider informing users that setting the hostname will cause the hostname to be advertised via DHCP. 

Or, just have a checkbox in the network manager to enable sending of the current /etc/HOSTNAME.

Thanks, Brandon
Comment 13 Rob Hasselbaum 2008-11-20 18:00:33 UTC
At some point (probably following an update to 11.0), the workaround described in comment #4 stopped working for me. The send host-name directive still appears in my /etc/dhclient.conf file, but it no longer seems to have an effect. Have others noticed this?
Comment 14 Tambet Ingo 2008-11-21 07:15:39 UTC
There hasn't been any NM updates for 11.0.
Comment 15 Caspar Maessen 2008-11-22 21:39:37 UTC
(In reply to comment #13 from Rob Hasselbaum)
> appears in my /etc/dhclient.conf file, but it no longer seems to have an
> effect. Have others noticed this?

Yes. Inspecting active processes with ksysguard, I found dhclient and its commandline: 
"/sbin/dhclient -d -sf /usr/lib/NetworkManager/nm-dhcp-client.action -pf /var/run/dhclient-eth0.pid -lf /var/run/dhclient-eth0.lease -cf /etc/dhclient-eth0.conf eth0"

No option -H <hostname>, and I couldn't figure out where this commandline was assembled. Then I noticed that a configfile is used per interface. I created therefore a config for both my interfaces (eth0 and wlan0). This solved the problem. At least for now.
Comment 16 Rob Hasselbaum 2008-11-23 15:34:56 UTC
(In reply to comment #15 from Caspar Maessen)
> Then I noticed that a configfile is used per interface. I created
> therefore a config for both my interfaces (eth0 and wlan0). This solved the
> problem. At least for now.

Ahh, thanks. Yes, I created /etc/dhclient-eth0.conf and /etc/dhclient-wlan0.conf containing only the send host-name directive and it works again. It will be nice to get this fixed for real in 11.1, though.
Comment 17 Brandon Philips 2009-03-17 00:25:15 UTC
(In reply to comment #16)
> (In reply to comment #15 from Caspar Maessen)
> > Then I noticed that a configfile is used per interface. I created
> > therefore a config for both my interfaces (eth0 and wlan0). This solved the
> > problem. At least for now.
> 
> Ahh, thanks. Yes, I created /etc/dhclient-eth0.conf and
> /etc/dhclient-wlan0.conf containing only the send host-name directive and it
> works again. It will be nice to get this fixed for real in 11.1, though.

Should this become a FATE request for 11.2?

Cheers, Brandon
Comment 18 Richard Ems 2009-05-30 17:53:20 UTC
I'm having the same problem on 11.1 and none of the workarounds work, nor adding 'send host-name "computername";' to /etc/dhclient.conf neither creating a file called /etc/dhclient-wlan0.conf with the previous content.

Is this bug going to be solved?
Or is there another workaround?
Can I help somehow with more info?

This bug is now almost one year old! 8(

Thanks, Richard


openSUSE 11.1 64 bit
kernel-default-2.6.27.21-0.1.2
NetworkManager-0.7.0.r4359-15.2.2
dhcp-client-3.1.1-6.4.1
Comment 19 Harry ten Berge 2009-06-14 08:37:52 UTC
As the previous poster I can confirm that it is indeed not working on 11.1.
I'm happy to provide more info if needed.


Regards Harry
Comment 23 Bin Li 2010-06-22 09:18:19 UTC
It should be works fine in 11.2 or 11.3.
Comment 24 Bin Li 2010-06-22 09:21:48 UTC
David,

 It's a long time for this bug, could you try it in 11.2 or 11.3?
Comment 25 Bin Li 2010-07-08 03:50:17 UTC
Noresponse. Feel free to contact me if any issue.
Comment 26 Ian Scott 2010-09-29 04:37:21 UTC
I can confirm that this bug is still present in 11.2 and 11.3.
Comment 27 Bin Li 2010-09-30 14:22:19 UTC
Ian,

 So could provide more debug info about it, let's focus it in 11.3? Which mode do you use ifup or NetworkManager? And if with ifup, please attach the /var/log/messages, and also the /var/lib/dhcpd/*, if with NetworkManager, please attach the /var/log/NetworkManager, and also the /var/lib/dhclient/*

 Thanks!
Comment 28 Ian Scott 2010-10-01 17:24:52 UTC
I use NetworkManager. The bug is not present with ifup AFAIK.

The workarounds I've seen involve adding a 'send host-name "myhostname"' line to /etc/dhclient.conf (or /etc/dhclient-eth0.conf, or /etc/dhclient-wlan0.conf, or ...). I added the line to /etc/dhclient.conf and the DHCP server gets my hostname and sets DNS accordingly.

I'm assuming that 10.3 and earlier used the '-H hostname' option to dhclient to specify the hostname, and 11.0 and later don't.

I am attaching my /var/log/NetworkManager, with a mix of connecting to various networks by wired and wireless ethernet. I have no /var/lib/dhclient on my system.
Comment 29 Ian Scott 2010-10-01 17:25:30 UTC
Created attachment 392615 [details]
/var/log/NetworkManager
Comment 30 Bin Li 2011-05-26 13:29:42 UTC
From the Comment#28, it should be same with bnc#557720.
Comment 31 Bin Li 2011-05-26 14:18:50 UTC
Ian ,
I've make a patch for this, could test it?

http://download.opensuse.org/repositories/home:/BinLi:/branches:/openSUSE:/11.3:/Update:/Test/standard
Comment 32 Swamp Workflow Management 2011-05-26 15:15:26 UTC
The SWAMPID for this issue is 41130.
This issue was rated as low.
Please submit fixed packages until 2011-06-23.
Also create a patchinfo file using this link:
https://swamp.suse.de/webswamp/wf/41130
Comment 33 Bin Li 2011-05-27 05:53:12 UTC
Done.

 71598  State:new     By:BinLi        When:2011-05-27T07:49:22
        submit:       home:BinLi:branches:openSUSE:11.3:Update:Test/NetworkManager  ->  openSUSE:11.3:Update:Test   
        Descr: send dhcp-hostname to server by default(bnc#404663,swampid#41130)
Comment 34 Bernhard Wiedemann 2011-05-27 06:00:11 UTC
This is an autogenerated message for OBS integration:
This bug (404663) was mentioned in
https://build.opensuse.org/request/show/71598 11.3 / NetworkManager
Comment 35 Christian Dengler 2011-06-06 12:29:56 UTC
update released
Comment 36 Swamp Workflow Management 2011-06-06 12:30:41 UTC
Update released for: NetworkManager, NetworkManager-debuginfo, NetworkManager-debugsource, NetworkManager-devel, NetworkManager-doc, NetworkManager-glib, NetworkManager-glib-debuginfo, NetworkManager-lang
Products:
openSUSE 11.3 (debug, i586, x86_64)
openSUSE 11.4 (debug, i586, x86_64)