Project

General

Profile

Bug #6362

DHCP Client ID not used

Added by Rob Gormley almost 5 years ago. Updated about 1 month ago.

Status:
Confirmed
Priority:
Normal
Assignee:
-
Category:
DHCP (IPv4)
Target version:
-
Start date:
05/16/2016
Due date:
% Done:

0%

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

Description

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 - 10.78.0.28/23)

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";
fixed-address 10.78.0.28;
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 10.78.1.154: Host is down
May 16 21:25:17 dhcpd DHCPOFFER on 10.78.1.154 to f4:5c:89:8c:0d:f1 (myhostname) via em1
May 16 21:25:18 dhcpd DHCPREQUEST for 10.78.1.154 (10.78.0.2) from f4:5c:89:8c:0d:f1 (myhostname) via em1
May 16 21:25:18 dhcpd DHCPACK on 10.78.1.154 to f4:5c:89:8c:0d:f1 (myhostname) via em1

History

#1 Updated by Chris Buechler almost 5 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.

#2 Updated by Carlo Tognetti about 1 month ago

In pfSense, just pre-pending

\000

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

My test:

Settings

on pfSense

Ver. 2.5.0-RELEASE (amd64)

Services/DHCP Server/LAN/Edit Static Mapping

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

on raspbian

/etc/dhcpcd.conf

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

Results

on pfSense

/var/dhcpd/etc/dhcpd.conf

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

}
subclass "s_lan" "\000test02";

on raspbian

I get the correct DHCP values among them IP is 192.168.0.218

Also available in: Atom PDF