[ltp] Getting full hostname from DHCP

Eric Jorgensen linux-thinkpad@www.bm-soft.com
Wed, 12 Jun 2002 21:33:11 -0600

On 13 Jun 2002 00:36:35 +0200
Edi Weitz <edi@agharta.de> wrote:

> One more thing: I realize this is not a Thinkpad-specific, but at
> least it seems to be a typical laptop question, so I'll try it anyway.
> I'm using DHCP at home as well as when I'm visiting customers of mine
> and it is started with the -H option to set the hostname of my
> laptop. However, no matter where I am I only get the first part of the
> hostname, i.e. 'bird' instead of the FQDN 'bird.agharta.de' for
> example.

	This behavior is correct. That is to say, it is standards compliant. 

> This isn't a problem at home because my domain is in /etc/resolv.conf,
> but it is a problem when I'm not at home, especially for apps like
> Apache or Postfix which seem to rely on fully qualified hostnames.
> Any ideas how to fix this? Is this a problem of the DHCP server(s) or
> is it related to my set-up?

	You can fix this symptom by defining the domain name on the DHCP server. Of
course, at work you will probably have to ask your kind network administrators
to make the change for you. 

	In ISC DHCPD, you would define something like this: 

option domain-name "areb.org";
option domain-name-servers,,;

	And then, most DHCP clients will apply this information to your local
resolv.conf. Certainly dhclient does for me on debian/woody, not sure about
others. Other popular possibilities are isc-dhcpcd and pumpd, not to mention
udhcpc, etc. 

	This may require some applications to restart in order to reinitialize an
internal resolver. Some versions of opera had this problem, for instance. 

	There are other solutions for your symptom, such as divine, but i haven't used

 - Eric

----- The Linux ThinkPad mailing list -----
The linux-thinkpad mailing list home page is at: