Red Hat Bugzilla – Bug 590096
[enh] default to sending current hostname as DHCP DNS name
Last modified: 2011-12-06 10:19:27 EST
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):
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
The DHCP client ID is not registered with the DNS, and the default name is instead. The DHCP server assigns an IP successfully.
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"
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.
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
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.
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";
You can set the hostname by modifying /etc/sysconfig/network and adding
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.
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.
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
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
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?
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.
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.
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.
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.
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.