[CentOS] DHCP_HOSTNAME in ifcfg-eth0

m.roth at 5-cent.us m.roth at 5-cent.us
Fri Dec 2 14:59:52 UTC 2011


Timothy Madden wrote:
> On 02.12.2011 13:25, Александр Кириллов wrote:
>>> Sorry for the wrong wording: what I want is the DHCP client to send
>>> the hostname when a lease is requested, but I do not want to give
>>> dhclient any explicit hostname to be sent.
>>>
>>> I want dhclient to read the hostname from `hostname` or from
>>> /etc/sysconfig/network or any other way, and use that name to send
>>> the hostname to DHCP server.
>>
>>   DHCP_HOSTNAME=$(hostname -s)
<snip>
> For some strange reasone, when I do that, I get 'host name lookup
> failure' during `service network restart´ invocation, so in the end I
> resorted to using just:
> 	DHCP_HOSTNAME=`hostname`
> which seems to work properly until now, and now my router can see the
> computer names for its DHCP clients, which is a big step compared to
> seeing just the MAC address. :)

I haven't closely followed this thread - did someone mention just putting
HOSTNAME= in /etc/sysconfig/network?

        mark




More information about the CentOS mailing list