RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 590096 - [enh] default to sending current hostname as DHCP DNS name
Summary: [enh] default to sending current hostname as DHCP DNS name
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: NetworkManager
Version: 6.1
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Dan Williams
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-07 17:32 UTC by Sean Stewart
Modified: 2011-12-06 15:19 UTC (History)
5 users (show)

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.
Clone Of:
Environment:
Last Closed: 2011-12-06 15:19:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1632 0 normal SHIPPED_LIVE NetworkManager bug fix and enhancement update 2011-12-06 00:50:44 UTC

Description Sean Stewart 2010-05-07 17:32:27 UTC
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 Program Management 2010-05-07 18:51:02 UTC
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 19:21:00 UTC
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 21:03:35 UTC
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 17:27:48 UTC
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 17:32:45 UTC
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 17:24:10 UTC
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 16:42:54 UTC
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 15:58:15 UTC
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 Program Management 2011-05-13 23:08:28 UTC
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 10:25:34 UTC
    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 09:33:01 UTC
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 15:19:27 UTC
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.