Bug 540887

Summary: Need to add DHCP_HOSTNAME
Product: [Fedora] Fedora Reporter: Neal Becker <ndbecker2>
Component: NetworkManagerAssignee: Dan Williams <dcbw>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dcbw, libbe, mailings, quentin
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-13 23:27:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Neal Becker 2009-11-24 13:10:41 UTC
Description of problem:

nm-applet has a place to add DHCP_CLIENT_ID, but not DHCP_HOSTNAME.
When connecting eth0 to my corporate lan (which must use some sort of cisco box), without setting DHCP_HOSTNAME, my machine is not in DNS.

I have to manually add DHCP_HOSTNAME to /etc/sysconfig/network-scripts/if-cfg.eth0.



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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Quentin Armitage 2009-12-09 11:19:51 UTC
See a lso bug #510253

Comment 2 Ferry Huberts 2009-12-31 16:11:30 UTC
I can confirm this bug.

I have a dhcp/bind setup with ddns and when DHCP_HOSTNAME is not present in the client then the dns is not updated.

NetworkManager only allows setting of DHCP_CLIENT_ID, which then obviously breaks the ddns setup.

Manually adding the DHCP_HOSTNAME=... to the interface configfile is a temporary workaround but not very desirable

Comment 3 Ferry Huberts 2009-12-31 16:24:11 UTC
actually grepping in /etc/sysconfig/network-scripts for DHCP_CLIENT_ID show NO matches. so the client id isn't used in the interface scripts.

maybe you confused client id with hostname / forgot to add support for client id to the interface scripts?

Comment 4 Dan Williams 2010-01-04 23:16:36 UTC
I think most of the time NM should simply send your machine's current persistent hostname (which is set via HOSTNAME in /etc/sysconfig/network) to the DHCP server instead of having a text box for it.

Comment 5 Ferry Huberts 2010-01-05 09:54:42 UTC
it should, but that's not what I'm seeing.
it's what the default nw i/f scripting does. NM apparently doesn't do this

Comment 6 Dan Williams 2010-01-17 00:46:27 UTC
I'm not certain that NM currently does that actually, I'll need to check.  I suggest the behavior is this:

1) if a configured hostname is set in the connection profile itself, use that
2) otherwise, if send-hostname is set in /etc/dhclient-eth0.conf, use that
3) otherwise, if the system has a persistent hostname (from /etc/sysconfig/network) use that
4) otherwise, send no hostname

sound OK?

Comment 7 Ferry Huberts 2010-01-17 01:11:07 UTC
seems ok and logical

I would go a bit further though:
0) add a bit of user interface to 'Edit connections' so that the user can configure the hostname that is sent, and persist this in the /etc/sysconfig/network-scripts/ifcfg-xxxx files. use the order you suggested to provide the default in case the variable is not set.

Comment 8 Dan Williams 2010-04-13 23:27:25 UTC

*** This bug has been marked as a duplicate of bug 488975 ***