Bug #6362


DHCP Client ID not used

Added by Rob Gormley almost 7 years ago. Updated over 1 year ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
Affected Architecture:


Situation: Mac OS X 10.11 client, wireless. DHCP is specified with 'myhostname' in DHCP Client ID.

In pfSense, DHCP Static Mapping for Client ID, IP address (outside pool, inside subnet -

Renew DHCP lease, and a pool address is given, not the static mapping.

Looking at /var/dhcpd/etc/dhcpd.conf shows this:

host s_lan_13 {
option dhcp-client-identifier "myhostname";
option host-name "myhostname";

So things appear configured correctly. No issues from dhcpd system logs:

May 16 21:25:16 dhcpd DHCPDISCOVER from f4:5c:89:8c:0d:f1 via em1
May 16 21:25:16 dhcpd icmp_echorequest Host is down
May 16 21:25:17 dhcpd DHCPOFFER on to f4:5c:89:8c:0d:f1 (myhostname) via em1
May 16 21:25:18 dhcpd DHCPREQUEST for ( from f4:5c:89:8c:0d:f1 (myhostname) via em1
May 16 21:25:18 dhcpd DHCPACK on to f4:5c:89:8c:0d:f1 (myhostname) via em1

Actions #1

Updated by Chris Buechler almost 7 years ago

  • Status changed from New to Confirmed
  • Affected Version changed from 2.3.1 to All

that is indeed the case. Appears it just doesn't work in dhcpd unless I'm missing something. Config is correct, and the dhcpd docs seem to indicate it can be used in that manner.

Actions #2

Updated by Carlo Tognetti almost 2 years ago

In pfSense, just pre-pending


to the string specified in DHCP client configuration ( DHCP Client ID = myhostname as stated in Rob Gormley example )
it works correctly

My test:


on pfSense

Ver. 2.5.0-RELEASE (amd64)

Services/DHCP Server/LAN/Edit Static Mapping

MAC Address =
Client Identifier = \000test02
IP Address =
Hostname =

on raspbian


clientid test02
clientid "test02" 
(it works either with and without quotes, all the other options in /etc/dhcpcd.conf left as default)


on pfSense


host s_lan_12 {
    option dhcp-client-identifier "\000test02";

subclass "s_lan" "\000test02";

on raspbian

I get the correct DHCP values among them IP is

Actions #3

Updated by Carlo Tognetti over 1 year ago


To me, just prepending \000 to the text content of the GUI field

Services / DHCP Server / LAN / Edit Static Mapping ==> Client Identifier

which should contain the same text as specified in client's DHCP configuration (clientid on debian or MacOs) should solve (or at least work around) the issue and let the feature work flawlessly.

As stated in my previous post, I regularly use it by prepending \000 directly in psSense GUI, and it works fine (in this case the MAC Address filed have to be empty).

In my opinion solving the issue should be now a priority for many sysadmin because of the increasing number of notebooks, or other mobile devices, without a built-in ethernet card, using usb/thundebolt => ethernet adapters that are frequently interchanged between different users on different devices. This way it's not possible to apply specific firewall rules based on the IP Address, that apply to users.

Setting the DHCP clientid parameter on the user's os dhcp configuration it's possible to apply rules precisely to each single user, no matter which network device is used to connect to the network.
This is also the case where users connect either via WiFi or via Ethernet card.

Furthermore, there is the benefit of decreasing the number of IP reservations; 1 IP per client (user Operating Sistem), no more 1 IP per user/network card)


Also available in: Atom PDF