On Wed, Aug 18, 2021 at 07:48:10PM +0200, flor...@openbsd.org wrote: > > It seems dhcpleased is automatically adding the hostname of the machine > > in the DHCP message. That's the first instance of "browser" seen above. > > > > dhcpd(8) doesn't seem to catch correctly the client identifier. Is it > > supposed to work like that ? > > They both send the hostname, that's not the problem. Opinions differ on how > the client ID should be encoded. > > > Aug 13 18:10:11.599556 fe:e1:bb:d1:b2:92 ff:ff:ff:ff:ff:ff 0800 342: > > 0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] xid:0xba962e2 > > vend-rfc1048 DHCP:REQUEST HN:"browser" > ^^^^ hostname > > > CID:0.98.114.111.119.115.101.114 PR:SM+DG+NS+HN+DN+BR+119+121 > ^^^ client id > > > RQ:192.168.1.98 [tos 0x10] (ttl 128, id 0, len 328) > > > Aug 13 18:12:13.530188 fe:e1:bb:d1:c2:c4 fe:e1:ba:d0:b7:ec 0800 342: > > 192.168.1.219.68 > 192.168.1.12.67: [udp sum ok] xid:0xfbdfb850 > > secs:4188 C:192.168.1.219 vend-rfc1048 DHCP:REQUEST HN:"rex" > ^^^ hostname > > PR:SM+BR+TZ+121+DG+DN+119+NS+HN+BF+TFTP CID:114.101.120 [tos 0x10] > ^^^ client id > > (ttl 128, id 38490, len 328) > > dhclient sends this as client id: > CID:114.101.120 > > Which is hardware type 114 and hardware address 101.120 (in decimal) > Interpreted as ascii this is of course "rex". > > RFC 2132 has this: > The client identifier MAY consist of type-value pairs similar to the > 'htype'/'chaddr' fields defined in [3]. For instance, it MAY consist > of a hardware type and hardware address. In this case the type field > SHOULD be one of the ARP hardware types defined in STD2 [22]. A > hardware type of 0 (zero) should be used when the value field > contains an identifier other than a hardware address (e.g. a fully > qualified domain name). > > dhcpleased sends this: > CID:0.98.114.111.119.115.101.114 > > Which is hardware type 0 + "browser" > > dhcpleased.conf has this: > send client id client-id > Send the dhcp client identifier option with a value of client-id. > If client-id consists of a series of octets of two-digit > hexadecimal numbers separated by colons, the first octet is used > as the type and the rest as value. The MAC address > 00:53:FF:AA:BB:CC would be configured as > > send client id "01:00:53:FF:AA:BB:CC" > > Otherwise the string client-id is sent verbatim with type zero. > The default is to send the interface's MAC address as client > identifier. > > now, what will probably work for you is: > > send client id "00:62:72:6f:77:73:65:72" > > So in short, everything is terrible. > > Should dhcpleased do what dhclient does? > People who actually use this please speak up. >
Thanks you Florian for the detailed explanation. Appreciated. Best. -- Olivier Cherrier Phone: +352691570680 mailto:o...@symacx.com