How dhcp client can set its hostname properly on lease time

Torfinn Ingolfsen torfinn.ingolfsen at broadpark.no
Thu Oct 7 17:52:26 UTC 2010


On Thu, 07 Oct 2010 21:37:52 +0900
Mamoru Iwaki <1wkmmr at gmail.com> wrote:

> Are there good way for dhcp client to set its hostname properly on lease
> time?

Well, you *can* have the dhcp client on FreeBSD send an identifier, and
with that identifier the dhcp server can assign the client a static ip
lease. If that static ip is registered in your local dns, you're all
set. Doesn't work well if you use the client on another network who
doesn't offer static ip's. YMMV.

> The following will be a possble workaround, but I'm wondering there can
> be a smart answer in FreeBSD itself.
> 
> It is possible to resolve the hostname corresponding to a dhcp-delivered
> ip-address with a local name server. So, (1) resolve the corresponding
> hostname from the local name server, (2) set it as hostname, and (3)
> call them every time when dhcp lease is updated

Isn't the proper way with dns to configure dynamic DNS updates, and
allow the client to do that?

HTH
-- 
Regards,
Torfinn Ingolfsen



More information about the freebsd-stable mailing list