dhcpv4, how to identify hosts by dhcp-client-identifier?

Simon Hobson dhcp1 at thehobsons.co.uk
Sat Dec 3 22:21:07 UTC 2016

Robert Senger <robert.senger at lists.microscopium.de> wrote:

> However, Windows and OS X and also *nix if the quotes are omitted, do
> not send the dhcp-client-identifier as an ascii string, instead, those
> operating systems send their dhcp-client-identifier in some binary
> format.

What you can do is simply specify a binary value to match against. So simply use (taking your example) 1:00:3a:63:b:1c:33 (note - no quotes) which means 7 bytes containing the values specified - ie 1, zero, 0x 3a, ...

If you put quotes around 1:00:3a:63:b:1c:33 (ie use "1:00:3a:63:b:1c:33" in the config file) then that means 19 bytes containing 0x31 (1), 0x3a (:), 0x30 (0), 0x30 (0), 0x3a (:), 0x33 (3), and so on.

If you look in the leases file, you'll see that the server can also work with a string with non-printable characters escaped - but that's not an easy format for humans to work with.

More information about the dhcp-users mailing list