Creating expressions to set hostname of client
Simon Hobson
dhcp at thehobsons.co.uk
Wed Jun 7 09:51:47 UTC 2006
Aaron Randall wrote:
>In the manual pages is says that the syntax is
>"option host-name = expression", and an example is "option host-name =
>binary-to-ascii(16,8,"-",substring(hardware,1,6));". Can anyone explain
>how this expression is constructed?
Try 'man dhcp-eval' for starters.
Also, there's been many examples on this list, such as this one from
Ray Phillips on 2nd June (thread: assigning client-hostname) :
>I've been able to assign a ddns-hostname to clients which don't
>provide one using
>
>option server.ddns-hostname = pick-first-value (
> option fqdn.hostname,
> option host-name,
> concat (
> "mac-",
> suffix (concat ("0", binary-to-ascii (16, 8, "",
> substring (hardware, 4, 1))),2), "-",
> suffix (concat ("0", binary-to-ascii (16, 8, "",
> substring (hardware, 5, 1))),2), "-",
> suffix (concat ("0", binary-to-ascii (16, 8, "",
> substring (hardware, 6, 1))),2)
> )
>);
More information about the dhcp-users
mailing list