Bug 590096 - [enh] default to sending current hostname as DHCP DNS name
[enh] default to sending current hostname as DHCP DNS name
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: NetworkManager (Show other bugs)
6.1
All Linux
low Severity medium
: rc
: ---
Assigned To: Dan Williams
Desktop QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-07 13:32 EDT by Sean Stewart
Modified: 2011-12-06 10:19 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
NetworkManager previously did not send the system hostname to a DHCP server unless it was explicitly configured with a configuration file. With this update, NetworkManager sends the hostname to the DHCP server by default.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-06 10:19:27 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sean Stewart 2010-05-07 13:32:27 EDT
Description of problem:
Our hosts are set to send their hostnames to the DHCP server, and the server registers this host name with the DNS and sends back an ip address to assign to the host. On RHEL 6, this functionality does not work. The hostname is instead always set to the "default":  eg. dhcp-135-15-74-83.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Open Network Connections, go to IPv4 settings
2. Set the DHCP client ID to the desired hostname
3. Restart the ethernet adapter
  
Actual results:
The DHCP client ID is not registered with the DNS, and the default name is instead. The DHCP server assigns an IP successfully.

Expected results:
The server should register the hostname with the DNS, and the hostname should show as the value set previously, instead of the default when typing "hostname"

Additional info:
This functionality works on every other release of RHEL. In RHEL5, this was set through system-config-network, on the DNS tab. There, you could set a "hostname" and when the host contacted the DHCP server, it would send this hostname and it would be registered with the DNS.  This global hostname option does not appear at all in RHEL6, as far as I have seen. Please let me know if there is another way to set it.
Comment 2 RHEL Product and Program Management 2010-05-07 14:51:02 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 3 Dan Williams 2010-05-12 15:21:00 EDT
Note that the "DHCP client ID" is *not* the hostname to send to the server.  It's something completely different.  You can use /etc/dhclient-eth0.conf (or eth1 or wlan0 or etc) and add the "send-hostname" option to that file, which will be used by NM and sent to the server as a workaround.

In the future, NM will simply send the current system hostname by default.
Comment 4 Sean Stewart 2010-05-12 17:03:35 EDT
I have searched and the only way I could find to set the hostname was by issuing the "hostname" command. Is there some other way to do this in the GUI?

Also, I tried the workaround and it works with the following syntax: 
send host-name "your-host";
Comment 5 Dan Williams 2010-05-13 13:27:48 EDT
You can set the hostname by modifying /etc/sysconfig/network and adding

HOSTNAME=yourhost

This will cause both the legacy system network scripts and NetworkManager to *always* assign that hostname to this machine.  Note that like I said in comment #3 though, you'll still need the dhclient-wlan0.conf workaround until we modify NM later on to push the hostname automatically.

So I'll turn this bug then into an enhancement request for the automatic hostname sending functionality.
Comment 6 Sean Stewart 2010-05-13 13:32:45 EDT
Am I to understand that this functionality will be added into the GUI later?

Thanks for letting me know about the /etc/sysconfig/network method.
Comment 8 Dan Williams 2010-06-29 13:24:10 EDT
It may get added to the GUI at some point, but for the moment I'd rather that people set the hostname they'd like to use as the permanent hostname, and then have NM automatically send that hostname up to the DHCP server.  If there are enough cases where people need different names sent up then perhaps we'll add an option to the UI.  It can always be added through either:

1) GConf, for user connections
2) ifcfg files using DHCP_HOSTNAME
3) setting the option in /etc/dhclient-<ifname>.conf
Comment 9 Jirka Klimes 2011-02-01 11:42:54 EST
Sending hostname as DHCP DNS name is now upstream by default - bug 488975.

Patch for possible GUI configuration is here https://bugzilla.redhat.com/show_bug.cgi?id=596242#c7
Comment 11 Sean Stewart 2011-05-09 11:58:15 EDT
I have noticed that as of RHEL 6 SP 1 RC 2, it still does not send the hostname as the dhcp hostname by default.  I still have to use the DHCP_HOSTNAME=  in ifcfg scripts method to get it to work.  Is it still planned to have this included in 6.1?
Comment 12 RHEL Product and Program Management 2011-05-13 19:08:28 EDT
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.
Comment 16 Miroslav Svoboda 2011-08-30 06:25:34 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
NetworkManager previously did not send the system hostname to a DHCP server unless it was explicitly configured with a configuration file. With this update, NetworkManager sends the hostname to the DHCP server by default.
Comment 18 Jirka Klimes 2011-10-26 05:33:01 EDT
The actual change of the code is described in https://bugzilla.redhat.com/show_bug.cgi?id=488975#c10

Before, you had to place the value, you wanted to send as a hostname to DHCP server, to DHCP_HOSTNAME variable.
Now, if DHCP_HOSTNAME is not present, but a hostname is configured (e.g. via HOSTNAME in /etc/sysconfig/network) the HOSTNAME value is send as DHCP hostname by default.
Comment 20 errata-xmlrpc 2011-12-06 10:19:27 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1632.html

Note You need to log in before you can comment on or make changes to this bug.