dhcpv4, how to identify hosts by dhcp-client-identifier?
tmark at isc.org
Mon Dec 5 11:48:46 UTC 2016
On 12/3/16 5:21 PM, Simon Hobson wrote:
> 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
> 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.
> dhcp-users mailing list
> dhcp-users at lists.isc.org
As of 4.3.4, you can instruct both the server and client to output ID
values in hex:
The lease-id-format parameter
The format parameter must be either octal or hex. This
governs the format used to write certain values to lease
the default format, octal, values are written as quoted
which non-printable characters are represented as octal
escapes - a
backslash character followed by three octal digits. When
format is specified, values are written as an unquoted
pairs of hexadecimal digits, separated by colons.
Currently, the values written out based on lease-id-format
server-duid, the uid (DHCPv4 leases), and the IAID_DUID
leases). Note the server automatically reads the values in
This can make life easier when attempting to match values. Note that
this only influences what one sees in the lease and log files and is
done for readability. The formats do not have to be the same between
server and client, although having them both output in hex is sort of
ISC Software Engineering
More information about the dhcp-users