Bug 469336
Summary: | NetworkManager does not send hostname to dhcp server | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Luca Botti <luca.botti> | ||||
Component: | NetworkManager | Assignee: | Dan Williams <dcbw> | ||||
Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 13 | CC: | axel.azerty, bugzilla, dcbw, dpierce, ivan.mironov, jan.public, jklimes, john, larryoleary, mail, peter.ryzhenkov, vedran, wtogami | ||||
Target Milestone: | --- | Keywords: | Reopened | ||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 546581 (view as bug list) | Environment: | |||||
Last Closed: | 2011-06-27 14:01:17 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: | |||||||
Attachments: |
|
Description
Luca Botti
2008-10-31 11:28:20 UTC
fixed upstream either yesterday or the day before... NetworkManager-pptp-0.7.0-0.12.svn4326.fc10,NetworkManager-openvpn-0.7.0-16.svn4326.fc10,NetworkManager-vpnc-0.7.0-0.11.svn4326.fc10,NetworkManager-0.7.0-0.12.svn4326.fc10 has been submitted as an update for Fedora 10. http://admin.fedoraproject.org/updates/NetworkManager-pptp-0.7.0-0.12.svn4326.fc10,NetworkManager-openvpn-0.7.0-16.svn4326.fc10,NetworkManager-vpnc-0.7.0-0.11.svn4326.fc10,NetworkManager-0.7.0-0.12.svn4326.fc10 NetworkManager-0.7.0-0.12.svn4326.fc9,NetworkManager-vpnc-0.7.0-0.11.svn4326.fc9,NetworkManager-openvpn-0.7.0-16.svn4326.fc9,NetworkManager-pptp-0.7.0-0.12.svn4326.fc9 has been submitted as an update for Fedora 9. http://admin.fedoraproject.org/updates/NetworkManager-0.7.0-0.12.svn4326.fc9,NetworkManager-vpnc-0.7.0-0.11.svn4326.fc9,NetworkManager-openvpn-0.7.0-16.svn4326.fc9,NetworkManager-pptp-0.7.0-0.12.svn4326.fc9 NetworkManager-0.7.0-0.12.svn4326.fc8,NetworkManager-vpnc-0.7.0-0.11.svn4326.fc8,NetworkManager-openvpn-0.7.0-16.svn4326.fc8,NetworkManager-pptp-0.7.0-0.12.svn4326.fc8 has been submitted as an update for Fedora 8. http://admin.fedoraproject.org/updates/NetworkManager-0.7.0-0.12.svn4326.fc8,NetworkManager-vpnc-0.7.0-0.11.svn4326.fc8,NetworkManager-openvpn-0.7.0-16.svn4326.fc8,NetworkManager-pptp-0.7.0-0.12.svn4326.fc8 OK...but how do you get NetworkManager to send the hostname. Setting the desired hostname isn't nm-applet's UI (even in Fedora 10 Preview) and the hostname doesn't seem to get sent... Is this a system connection (ie an ifcfg file) or a connection you created yourself from the applet? For the ifcfg file, make sure DHCP_HOSTNAME=<your desired hostname>. For the user connection, use gconf-editor to drill down to your connection (in /system/networking/connections/) and in the ipv4 directory, add a string property with the name 'dhcp-hostname' and your desired hostname value there. It's unlikely this will ever make it into the applet's UI, instead NM will (by default unless you override it with the methods above) simply send the current hostname of the machine, which I'm sure you've set to what you want it to be. OK, so that's rather what I expected the behaviour should be, but for me it's not working in a Fedora 10 Preview installation. NetworkManager-glib-0.7.0-0.11.svn4229.fc10.i386 NetworkManager-gnome-0.7.0-0.11.svn4229.fc10.i386 NetworkManager-0.7.0-0.11.svn4229.fc10.i386 dhclient-4.0.0-30.fc10.i386 I'm trying to configure a system connection, but my chosen hostname does not end up being sent to the DHCP server. /etc/sysconfig/network-scripts/ifcfg-eth0: # Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] DEVICE=eth0 HWADDR=00:50:56:8a:2c:83 ONBOOT=yes DHCP_HOSTNAME=vm-f10test.pace.internal /var/run/nm-dhclient-eth0.conf: # Created by NetworkManager So, the dhclient config doesn't contain 'send host-name "vm-f10test.pace.internal";', like it needs to... NetworkManager-0.7.0-0.12.svn4326.fc8, NetworkManager-vpnc-0.7.0-0.11.svn4326.fc8, NetworkManager-openvpn-0.7.0-16.svn4326.fc8, NetworkManager-pptp-0.7.0-0.12.svn4326.fc8 has been pushed to the Fedora 8 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing-newkey update NetworkManager NetworkManager-vpnc NetworkManager-openvpn NetworkManager-pptp'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-10263 NetworkManager-0.7.0-0.12.svn4326.fc9, NetworkManager-vpnc-0.7.0-0.11.svn4326.fc9, NetworkManager-openvpn-0.7.0-16.svn4326.fc9, NetworkManager-pptp-0.7.0-0.12.svn4326.fc9 has been pushed to the Fedora 9 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing-newkey update NetworkManager NetworkManager-vpnc NetworkManager-openvpn NetworkManager-pptp'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-10321 NetworkManager-pptp-0.7.0-0.12.svn4326.fc10, NetworkManager-openvpn-0.7.0-16.svn4326.fc10, NetworkManager-vpnc-0.7.0-0.11.svn4326.fc10, NetworkManager-0.7.0-0.12.svn4326.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report. svn4326 doesn't fix it for me... [root@localhost ~]# rpm -qa|grep NetworkManager NetworkManager-gnome-0.7.0-0.12.svn4326.fc10.i386 NetworkManager-glib-0.7.0-0.12.svn4326.fc10.i386 NetworkManager-0.7.0-0.12.svn4326.fc10.i386 [root@localhost ~]# cat /var/run/nm-dhclient-eth0.conf # Created by NetworkManager [root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 # Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] DEVICE=eth0 HWADDR=00:50:56:8a:2c:83 ONBOOT=yes DHCP_HOSTNAME=vm-f10test.pace.internal NetworkManager-0.7.0-0.12.svn4326.fc9, NetworkManager-vpnc-0.7.0-0.11.svn4326.fc9, NetworkManager-openvpn-0.7.0-16.svn4326.fc9, NetworkManager-pptp-0.7.0-0.12.svn4326.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report. NetworkManager-0.7.0-0.12.svn4326.fc8, NetworkManager-vpnc-0.7.0-0.11.svn4326.fc8, NetworkManager-openvpn-0.7.0-16.svn4326.fc8, NetworkManager-pptp-0.7.0-0.12.svn4326.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report. Doesn't work for me, using Fedora 11 beta : NetworkManager-0.7.1-3.git20090414.fc11.i586 NetworkManager-gnome-0.7.1-3.git20090414.fc11.i586 [root@axel-asus ~]# cat /var/run/nm-dhclient-eth0.conf # Created by NetworkManager [root@axel-asus ~]# I have Fedora 13 and this does not work for me either: [root@threshold sysconfig]# cat /var/run/nm-dhclient-wlan0.conf # Created by NetworkManager [root@threshold sysconfig]# Updating version per comment 15. --- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers [This triage is part of collective effort done by students of University of Rijeka Department of Informatics.] Created attachment 422176 [details] DHCP request "Host Name" option in wireshark (In reply to comment #15) > I have Fedora 13 and this does not work for me either: > > [root@threshold sysconfig]# cat /var/run/nm-dhclient-wlan0.conf > # Created by NetworkManager > > [root@threshold sysconfig]# It should work on F13. Works for me with: NetworkManager-0.8.1-0.1.git20100510.fc13.x86_64 In case you use a system connection (an ifcfg- file), check it specifies DHCP_HOSTNAME=<desired hostname> In case of using a user connection, check dhcp-hostname key in GConf (use gconf-editor or find your connection in ~/.gconf/system/networking/connections/) Is wlan0 the interface you are using? Is the 'cat /var/run/nm-dhclient-wlan0.conf' done while the connection is active? You should also see the "Host Name" in DHCP Request packet captured e.g. by wireshark. The only piece that is missing are the GUI bits in nm-connection-editor. There is a proposed patch for that in bug 596242. (In reply to comment #17) > Created an attachment (id=422176) [details] > DHCP request "Host Name" option in wireshark > > (In reply to comment #15) > > I have Fedora 13 and this does not work for me either: > > > > [root@threshold sysconfig]# cat /var/run/nm-dhclient-wlan0.conf > > # Created by NetworkManager > > > > [root@threshold sysconfig]# > > It should work on F13. Works for me with: > NetworkManager-0.8.1-0.1.git20100510.fc13.x86_64 That's the version I'm running: (mcpierce@mcpierce-work:~)$ rpm -q NetworkManager NetworkManager-0.8.1-0.1.git20100510.fc13.x86_64 > In case you use a system connection (an ifcfg- file), check it specifies > DHCP_HOSTNAME=<desired hostname> There is no entry in /etc/sysconfig/network-scripts/ifcfg-wlan > In case of using a user connection, check dhcp-hostname key in GConf (use > gconf-editor or find your connection in > ~/.gconf/system/networking/connections/) I don't see that key anywhere in that directory structure: (mcpierce@mcpierce-work:~)$ find ~/.gconf/system/networking/connections | xargs grep dhcp (mcpierce@mcpierce-work:~)$ > Is wlan0 the interface you are using? Is the 'cat > /var/run/nm-dhclient-wlan0.conf' > done while the connection is active? Yes. > You should also see the "Host Name" in DHCP Request packet captured e.g. by > wireshark. > > The only piece that is missing are the GUI bits in nm-connection-editor. There > is a proposed patch for that in bug 596242. (In reply to comment #18) > > In case you use a system connection (an ifcfg- file), check it specifies > > DHCP_HOSTNAME=<desired hostname> > > There is no entry in /etc/sysconfig/network-scripts/ifcfg-wlan > > > In case of using a user connection, check dhcp-hostname key in GConf (use > > gconf-editor or find your connection in > > ~/.gconf/system/networking/connections/) > > I don't see that key anywhere in that directory structure: > > (mcpierce@mcpierce-work:~)$ find ~/.gconf/system/networking/connections | > xargs grep dhcp > (mcpierce@mcpierce-work:~)$ > That's the problem. You didn't tell NM to send the hostname. It's done either by DHCP_HOSTNAME in ifcfg- file (in case of system connection via ifcfg-rh plugin) or "dhcp-hostname" key when using a user connection. They have to be inserted manually, since the GUI support is not available yet (see bug 596242). 1) ifcfg-* files: add DHCP_HOSTNAME=<your name> manually or you can use system-config-network GUI 2) user connection: you can edit xml file (.gconf/system/networking/connections/<number>/ipv4/%gconf.xml) manually or use gconf-editor to set "dhcp-hostname" key to your desired string. So figure out what kind of connection you use and update it accordingly. (In reply to comment #19) > 1) ifcfg-* files: add DHCP_HOSTNAME=<your name> manually or you can use > system-config-network GUI I did this as well: (mcpierce@mcpierce-work:~)$ vi /etc/sysconfig/network-scripts/ifcfg-wlan0 # Intel Corporation Centrino Ultimate-N 6300 DEVICE=wlan0 HWADDR=00:24:D7:11:54:98 ONBOOT=no DHCP_HOSTNAME=mcpierce-work > 2) user connection: you can edit xml file > (.gconf/system/networking/connections/<number>/ipv4/%gconf.xml) manually or use > gconf-editor > to set "dhcp-hostname" key to your desired string. I have this: (mcpierce@mcpierce-work:~)$ vi ~/.gconf/system/networking/connections/2/ipv4/%gconf.xml <?xml version="1.0"?> <gconf> <entry name="dhcp-send-hostname" mtime="1276048357" type="int" value="1"/> <entry name="dhcp-hostname" mtime="1276048321" type="string"> <stringvalue>mcpierce-work</stringvalue> </entry> ... </gconf> > So figure out what kind of connection you use and update it accordingly. Still no joy. Now here's the kicker: in #2 above, connection 1 is the wireless adaptor configuration and didn't have an ipv4 directory. Instead, that's on connection 2 which is general connection information. I put the dhcp details into connection 2 since it was the only one with ipv4. Well, I'll try to sum it up again. Sending hostname to DHCP server works both for system connections (when DHCP_HOSTNAME is in ifcfg file) and user connections (when dhcp-hostname and dhcp-send-hostname are specified). According to your ifcfg-wlan0, I suppose it's not used, rather a user connection is used. Missing ipv4 directory is weird, it should be there. So I suggest deleting wireless connections in nm-connection-editor. Then when you click on AP you want to connect to in nm-applet, new user connection will be created. You can edit that and add "dhcp-hostname" and "dhcp-send-hostname". One correction to what I've written: it's not possible to manually edit the xml. I've found that when you do that, the file is reverted back discarding your changes (probably by GConf daemon). So you have to use gconf-editor instead: 1. /system/networking/connections/<num>/ipv4 2. right-click in properties area -> New Key... 3. add "dhcp-hostname" as String set to your value 4. add "dhcp-send-hostname" as Boolean set True 5. close connection editor Now you can activate the connection by clicked your AP in nm-applet. The hostname will be added to /var/run/nm-dhclient-wlan0.conf and sent to DHCP server. (In reply to comment #21) I will try doing as you specify later and update this BZ with the results. Alternatively something nice and tidy like the following (once you know the connection number that is) gconftool-2 --type bool --set /system/networking/connections/<NUM>/ipv4/dhcp-send-hostname true gconftool-2 --type string --set /system/networking/connections/<NUM>/ipv4/dhcp-hostname <HOSTNAME> (In reply to comment #21) > You can edit that and add "dhcp-hostname" and "dhcp-send-hostname". > One correction to what I've written: it's not possible to manually edit the > xml. I've found that when you do that, the file is reverted back discarding > your changes (probably by GConf daemon). > > So you have to use gconf-editor instead: > 1. /system/networking/connections/<num>/ipv4 > 2. right-click in properties area -> New Key... > 3. add "dhcp-hostname" as String set to your value > 4. add "dhcp-send-hostname" as Boolean set True > 5. close connection editor > > Now you can activate the connection by clicked your AP in nm-applet. The > hostname will be added to /var/run/nm-dhclient-wlan0.conf and sent to DHCP > server. The problem seems to be, at least in part, related to there _not_ being an ipv4 element below the wireless connection. There is .../connections/1/ which is the wireless adaptor, and then .../connections/2/ which is where ipv4 is and which is not any specific adaptor. I can confirm this problem, it also occurs on my F13 box. ... and it seems somehow WLAN related, at least that's when this problem occurs with NM. If I connect with cable (after adding DHCP_HOSTNAME=abcd to ifcfg file) everything works. If I try to connect with WLAN (adding DHCP_HOSTNAME=abcd to other ifcfg file) no hostname gets sent. Also using gconf-editor as specified above does not work. This problem still exists. Not only on WLAN but on wired devices also. It works for me with the latest update on F13 (and with previous as well): NetworkManager-0.8.1-4.git20100817.fc13.x86_64 I've tested both Wifi and wired connections. As well as system (adding DHCP_HOSTNAME to ifcfg) and user (adding dhcp-hostname key via gconf-editor) connections. Verify that /var/run/nm-dhclient-<interface>.conf contains the hostname and it is also as option in DHCP Request packet (in wireshark). So could you provide more information to be able to found the issue? 1) What's your NM version? 2) What connection do you use? 3) cat /var/run/nm-dhclient-wlan0.conf (/var/run/nm-dhclient-eth0.conf) when you are connected (find the proper path by ps ax | grep dhc) Should contain something like this: # Created by NetworkManager send host-name "tux"; # added by NetworkManager I'm running Fedora 14. NetworkManager: 0.8.1 I can confirm that sending a hostname is working for a wired system connection after adding 'Hostname (optional):' with system-config-network, and next starting the network with nm-applet. cat /var/run/nm-dhclient-eth0.conf # Created by NetworkManager send host-name "thorin"; # added by NetworkManager However, in my opinion it is strange that you have to fill in the hostname in the system-config-network GUI. I would expect a check box to send the hostname. When selected this would send the current hostname of the machine. But you should be able to provide optionally an alternative DHCP hostname. But maybe this should be reported as another bug. Furthermore, is there any problem with sending the current machine hostname by default as the DHCP hostname? If not I suggest to make this the default. Fedora 14; Networkmanager 0.8.1 I tried now with wifi on a laptop, and the DHCP hostname is not send. I verified this with Wireshark. I set the dhcp hostname in with the system-config-network for wlan0. And I see it in /etc/sysconfig/network-scripts/ifcfg-wlan0 as well. When I look with gconf-editor, I see that /system/networking/connections has only one connection, while I have many wireless connections configured in NetworkManager. Furthermore, the only connection that there is, does not contain ipv4, as also reported by some users above. BTW it is not clear for me how the relation exactly is between a system and a user connection. cat /var/run/nm-dhclient-wlan0.conf # Created by NetworkManager If I can do additional tests, or provide other information, let me know. Solution for problem described in comment #30: I ran gconf-editor as root, instead of as the user that manages the connection. When I ran gconf-editor as the correct user, the ipv4 key was there. Adding dhcp-send-hostname with value true resulted in sending the DHCP hostname correctly. (Also all the other network connections that I configured were there as different numbers) This message is a reminder that Fedora 13 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 13. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '13'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 13's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 13 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed. |