Red Hat Bugzilla – Bug 510253
[enh] enable NetworkManager Applet to configure the DHCP Hostname option (12)
Last modified: 2010-04-13 19:14:36 EDT
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)
Although NetworkManager can be manually configured to send DHCP option 12 (hostname) by editing ~/.gconf/system/networking/connections/1/ipv4/%gconf.xml and adding an <entry name="dhcp-hostname" ...>, NetworkManager Applet can only be used to set DHCP option 61 (dhcp Client-id).
Can an option be added to NetworkManager Applet to send dhcp-hostname instead of dhcp-client-id, and also the option should have a sub-option to send the system's hostname, rather than manually having to enter the hostname as part of the option.
Thanks for filling this bug.
It looks like more than a enhancement request. Therefore I changed the title to
reflect the enhancement request. Thanks for this.
This bug has been triaged
Fedora Bugzappers volunteer triage team
This would be a great feature to have, and it would have been nice if it was enabled by default too. Many broadband routers as well as dnsmasq will use this data to provide a dynamically updated DNS service for the local LAN.
This problem was previously reported and "supposedly" "fixed in next release" ... I guess it was not fixed.
Anyway, to get the functionality you want, you need to create/have a /etc/dhclient-<your_interface>.conf with:
send host-name "your_hostname"
This works for both wired and wireless interfaces but if you have both the names must be different.
This is an obvious (at least to me) lack in NM functionality. While NM supports DHCP hostname dynamic dns updating (supported by both bind(named)-dhcp and dsnmasq), NM does not provide an "easy" way to set the name.
Thus, NM'c connection-editor should be updated to support this feature.
I would like to see this as one of the goals for F13 and (if practical) backported to F12 and F11 as updates.
What can I do to raise the priority of getting this done.
NM's connection-editor uses glade for its gui interface and I am not glade literate (unfortunately) or I would implement the change myself and propose a patch.
The name should be pulled from the system persistent hostname, if present. Are there cases where the hostname that that is sent to the DHCP server is different than the system persistent hostname?
Ideally no ... unfortunately yes (at least the last time I tried it).
Laptop with two NICs: hardwired and wireless ... the last time I tried (Fedora 9), the DHCP hostnames had to be different.
I just ran a test on F12 and, yes, the system's name from /etc/sysconfig/network is (or appears to be) used to set the DHCP hostname.
Then I tried it on a real baremetal system changing the hostname from "falcon" to "falcon2" and changing the static IP to use DHCP. This did not register the hostname.
In the first case, this was a qemu-kvm guest with two NICs -- a NAT network and a "private" network. Qemu-kvm uses dnsmasq to support NAT and also has a small dns.
In the second case, I am using DHCP and named running on a F11 host with DHCPD capable of updating named via the dynamic-dns interface ... and this does work. I set DHCP_HOSTNAME=falcon2 in the ifcfg-eth0 file and the name was registered.
Another reason for the addition to the editor to be able to manually set the DHCP hostname is for completeness ... I can set this with system-config-network or with the "standard" configuration tool ("vi") so why can't I set it with NetworkManager?
Just because the option is there doesn't mean it should be exposed if it can be figured out automatically. I can change fuel injection timings in my car's engine, but there isn't a dial on the dashboard to do so. Likewise it doesn't mean that the text entry box needs to be exposed by default. Maybe it does, but not *necessarily* just because the option can be configured somewhere on the system is my point. I'm not going to advocate adding a bunch more stuff to the UI without a little investigation first.
On the bare-metal system you'll need a bit of extra help to get the DHCP hostname sent, you need to set DHCP_HOSTNAME in the ifcfg file to whatever you'd like to send to the DHCP server. I dont' believe ifup/ifdown actually grab HOSTNAME for this since they dont' send dhcp-hostname by default.
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.
More information and reason for this action is here:
*** This bug has been marked as a duplicate of bug 488975 ***