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 Mon, 16 Jul 2018, Roy Marples wrote:

> > Well, what do you know!  The YeeLoong successfully used 'dhcpcd' upon
> > netbooting.  And with "env force_hostname=YES", it gets an FQDN instead
> > of its short name (only).
> > 
> > And a SPARCstation 5 netbooting -8 has just done the same.  Looks like
> > a winner.

And evbarm-earmv7hf (BeagleBone Green, netbsd-8) has also accomplished
this.  One more step in having the machine do the work.

> After thinking about it some more, I think the best solution for the
> FQDN is to either fix the DHCP server to send the domain in the hostname
> field OR stop the kernel assigning a hostname OR leave things as they
> are.

What I've seen in searching "dhcpd.conf(5)" and "dhcp-options(5)" is
that settings/options related to hostname almost exclusively deal with
the client telling the server what its name is rather than the server
telling the client.  And what the server does tell the client the client
is free to ignore.

For my network arrangement I think I've found the appropriate solution,
so thanks for the input.

> "env force_hostname=YES" has it's own pitfall of flip-flopping in the same
> way, but that's your adminsitrative decision based on your network setup.

Can "env var=value" be part of the block guarded by an "interface ifN"
statement?  On a multi-homed machine, there should be only one host name
and one can choose the interface from which it receives (and acts on) the
information.

If not, that would be the only change I'd suggest.  Again, there is a
brief period of flip-flopping of hostname depending on the order in
which interfaces are configured.  The interface with "force_hostname=YES"
should override any prior assignment and any later interface configuration
should ignore the hostname as already set.

I only tried DHCP configuration of multiple interfaces a long time ago.
I found it wasn't a workable solution for me, but I forget what the
specific problems were.  I think it was my NAT router and I wanted the
bulk of the network setup (and ancillary information like name servers
and ntp servers, etc.) to be taken from the internal interface, and only
the public IP and default route set for/from the external interface.

Perhaps I'll revisit that when I don't mind the service interruption.

-- 
|/"\ 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