How in the world do I get hostname set on a dhcp connection managed by NM?
In nm-applet, edit connections/Auto Ethernet shows under IPv4 Setting DHCP Client ID: (my name)
But it doesn't seem to send the hostname.
Neal Becker wrote:
How in the world do I get hostname set on a dhcp connection managed by NM?
I have a
DHCP_HOSTNAME=evon800c
in the /etc/sysconfig/network-scripts/ifcfg-eth0 file, and the DHCP server sees it:
Mar 9 12:22:39 server1 dhcpd: DHCPDISCOVER from 00:08:02:6c:20:ad via bond0.20 Mar 9 12:22:40 server1 dhcpd: DHCPOFFER on 172.20.2.252 to 00:08:02:6c:20:ad (evon800c) via bond0.20 Mar 9 12:22:40 server1 dhcpd: DHCPREQUEST for 172.20.2.252 (172.20.0.1) from 00:08:02:6c:20:ad (evon800c) via bond0.20 Mar 9 12:22:40 server1 dhcpd: DHCPACK on 172.20.2.252 to 00:08:02:6c:20:ad (evon800c) via bond0.20
Mogens
Mogens Kjaer wrote:
Neal Becker wrote:
How in the world do I get hostname set on a dhcp connection managed by NM?
I have a
DHCP_HOSTNAME=evon800c
in the /etc/sysconfig/network-scripts/ifcfg-eth0 file, and the DHCP server sees it:
Mar 9 12:22:39 server1 dhcpd: DHCPDISCOVER from 00:08:02:6c:20:ad via bond0.20 Mar 9 12:22:40 server1 dhcpd: DHCPOFFER on 172.20.2.252 to 00:08:02:6c:20:ad (evon800c) via bond0.20 Mar 9 12:22:40 server1 dhcpd: DHCPREQUEST for 172.20.2.252 (172.20.0.1) from 00:08:02:6c:20:ad (evon800c) via bond0.20 Mar 9 12:22:40 server1 dhcpd: DHCPACK on 172.20.2.252 to 00:08:02:6c:20:ad (evon800c) via bond0.20
Mogens
Doesn't work here. I have in /etc/sysconfig/network-scripts/ifcfg-eth1:
DHCP_HOSTNAME=nbecker6
Mar 3 07:38:26 localhost dhclient: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8 Mar 3 07:38:26 localhost dhclient: DHCPOFFER from 10.32.111.2 Mar 3 07:38:26 localhost dhclient: DHCPREQUEST on eth1 to 255.255.255.255 port 67 Mar 3 07:38:26 localhost dhclient: DHCPACK from 10.32.111.2
Here is the entire file: DEVICE=eth1 HWADDR=00:e0:81:b1:49:f8 ONBOOT=yes DHCP_HOSTNAME=nbecker6 BOOTPROTO=dhcp TYPE=Ethernet USERCTL=no PEERDNS=yes IPV6INIT=no NM_CONTROLLED=yes
Neal Becker wrote: ...
Doesn't work here. I have in /etc/sysconfig/network-scripts/ifcfg-eth1:
DHCP_HOSTNAME=nbecker6
Mar 3 07:38:26 localhost dhclient: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8 Mar 3 07:38:26 localhost dhclient: DHCPOFFER from 10.32.111.2 Mar 3 07:38:26 localhost dhclient: DHCPREQUEST on eth1 to 255.255.255.255 port 67 Mar 3 07:38:26 localhost dhclient: DHCPACK from 10.32.111.2
How does the log look on the server? My log files were from the server.
Mogens
Mogens Kjaer wrote:
Neal Becker wrote: ...
Doesn't work here. I have in /etc/sysconfig/network-scripts/ifcfg-eth1:
DHCP_HOSTNAME=nbecker6
Mar 3 07:38:26 localhost dhclient: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8 Mar 3 07:38:26 localhost dhclient: DHCPOFFER from 10.32.111.2 Mar 3 07:38:26 localhost dhclient: DHCPREQUEST on eth1 to 255.255.255.255 port 67 Mar 3 07:38:26 localhost dhclient: DHCPACK from 10.32.111.2
How does the log look on the server? My log files were from the server.
Mogens
You mean dhcp server? I have no access to that.
Neal Becker wrote: ...
You mean dhcp server? I have no access to that.
So how do you know that the hostname isn't sent to the server?
Mogens
Mogens Kjaer wrote:
Neal Becker wrote: ...
You mean dhcp server? I have no access to that.
So how do you know that the hostname isn't sent to the server?
Mogens
Because
host <blah> fails for this machine, but works for lots of others.
I think it's like this: If you setup a new F10 box, and never play with any network setting or use NM, it works. If you ever use NM, you're screwed. I say this because the other machines that are working never had anyone login and mess with NM (these are all servers in a closet).
Neal Becker wrote: ...
Because
host <blah> fails for this machine, but works for lots of others.
I think it's like this:
I've never had any problems like this. If the machine gets an IP by DHCP, the server registers the hostname in DNS, independent of the client machine running NM or not. If the hostname is specified in DHCP_HOSTNAME.
Without access to the server's logfiles it would be difficult to find out what your problem is...
Unless you can sniff the DHCP packets, or make a local setup with your own DHCP server, not connected to the rest of the network.
Mogens
Mogens Kjaer wrote:
Neal Becker wrote: ...
Because
host <blah> fails for this machine, but works for lots of others.
I think it's like this:
I've never had any problems like this. If the machine gets an IP by DHCP, the server registers the hostname in DNS, independent of the client machine running NM or not. If the hostname is specified in DHCP_HOSTNAME.
Without access to the server's logfiles it would be difficult to find out what your problem is...
Unless you can sniff the DHCP packets, or make a local setup with your own DHCP server, not connected to the rest of the network.
Mogens
I can say now for certain, that it will send the hostname iff you create /etc/dhclient-<iface>.conf with: send host-name "<your hostname>";
Neal Becker wrote: ...
I can say now for certain, that it will send the hostname iff you create /etc/dhclient-<iface>.conf with: send host-name "<your hostname>";
This file do exist on my machines. It seems to be created automatically by /etc/sysconfig/network-scripts/ifup-eth:
# cat dhclient-eth0.conf send host-name "evon800c.crc.dk"; # temporary RHL ifup addition
Mogens