NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: FQDNs for netbooted hosts via DHCP?



On Sun, 15 Jul 2018, Robert Elz wrote:

>     Date:        Sat, 14 Jul 2018 11:14:19 -0500 (CDT)
>     From:        "John D. Baker" <jdbaker%mylinuxisp.com@localhost>
> 
>   | I also needed to set "use-host-decl-names true;" in "dhcpcd.conf".
> 
> In dhcpd.conf I assume.

Yes.  I added that to "/etc/dhcpd.conf", i.e., the DHCP server config file.

>   | Some netbooted hosts would get their hostname without this, but most would
>   | not, ending up with "localhost".
> 
> As with most client/server systems, there are two separate things that
> need to be made to work - the server has to send the data that you
> want it to send (which might mean altering what the client requests,
> or server config, or ...) and then the client needs to "do the right
> thing" with the data that is returned.

The weird thing is that the client in each case was the NetBSD in-kernel
DHCP client.  On some machines I checked, it would get the hostname
(short) as "my_name=foo", but on most, that line was missing from the
boot-time dmesg output, picking up with "my_domain=example.com".  This
was without using "use-host-decl-names true;" on the DHCP server.

Thereafter, during rc processing, it would warn that hostname was not
set and the subsequent invocation of 'dhcpcd' would set it to 'localhost'.

The "dhcpd.conf(5)" manual seemed to imply that the host name would be
derived from that given in the "host" entry if not specified in some
other way (which I did not), but without "use-host-decl-names true;" it
seemed to happen only for some hosts, but mostly not at all.

-- 
|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645



Home | Main Index | Thread Index | Old Index