hostname issues

David Forrest drf at maplepark.com
Tue Feb 3 17:30:46 UTC 2009


On Tue, 3 Feb 2009, Steve wrote:

>
> ---- David Forrest <drf at maplepark.com> wrote:
>> On Tue, 3 Feb 2009, Steve wrote:

.. snipped

>>> So, here are my questions:

>>> 1 ) Anyone know why I would be getting the host name from the DHCP 
>>> server about every other time? (Other than the M$ DHCP server is hosed 
>>> - which leads me to my 2nd question)

>>> 2) Why am I seeing no output logging when using the -v flag of dhclient?
>>> 3) Why is the make failing?
>>>
>>> Thanks,
>>> Steve
>>
>> You can request a specific host name in the config file (which I notice is
>> not being called on your startup command) by creating a config file as
>> /etc/dhclient-eth0.conf containing this line:
>> send host-name "whatever";
>>
>> Then it should invoke as:
>>
>> /sbin/dhclient -q -cf /etc/dhclient-eth0.conf -lf /var/lib/dhclient/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0
>>
>> see man dhclient.conf
>
> In this case I >>want<< the DHCP server to tell me what host name to use.
>
> On my home machine I use an entry in /etc/dhclient.conf to have the 
> client tell the DHCP server what the host name should be but that is not 
> the case here.
>
> Thanks,
> Steve

Steve, it may be that the server is just giving you a new name if it has 
changed since the last boot.  You could capture your hostname as given by 
the DHCP server to a file kind of like this:
echo "$(hostname)" > /etc/hostname
and reset it per man hostname if you don't get a hostname response
hostname -F /etc/hostname

But what do I know as I don't use a Windows server....
-- 
David Forrest  St. Louis, Missouri



More information about the dhcp-users mailing list