dhcpd does not answer DHCPDISCOVER from systemd-networkd

glenn.satchell at uniq.com.au glenn.satchell at uniq.com.au
Wed Feb 26 13:28:56 UTC 2020


On 2020-02-26 23:54, Frederik Himpe wrote:
> On Tue, 2020-02-25 at 20:31 +0000, Simon Hobson wrote:
>> Frederik Himpe <frederik at frehi.be> wrote:
>> 
>> > I have a Debian Buster server running dhcpd version 4.4.1-2 an a
>> > client
>> > with Ubuntu 18.04. When I use systemd-netword to get an IP using
>> > DHCP,
>> > the server does not answer the DHCPDISCOVER. However, when I run
>> > dhclient instead, dhcpd does answer the DHCPDISCOVER. Also PXE
>> > booting
>> > works.
>> >
>> >
>> 
>> > subclass "AI" 1:04:0e:3c:a3:b2:79;
>> 
>> So where is group AI defined ? How is it defined ?
> 
> Right, I had forgotten about that. It's defined like this, at the top
> level in the hierarchy in dhcpd.conf:
> 
> class "AI" {
>         match pick-first-value (option dhcp-client-identifier, 
> hardware);
> }
> 
> And there we have the problem...
> 
>> One really obvious difference there is that dhclient is not sending
>> Option 61, while systemd-networkd is sending a 19 byte Option 61.
> 
> So this option 61 is the dhcp-client-identifier I'm using in the class
> definition. Thanks for the pointing me in the right direction! With
> just match hardware it's now working as I want.
> 
> Regards,

Hi Frederik

The value of the dhcp-client-identifier, as shown in the packet dump, is 
b6:22:0f:eb:00:02:00:00:ab:11:f0:a4:5a:73:5e:e8:d2:07

and that doesn't match the sub-class value, so you can see why the 
client doesn't match class AI, and hence "no free leases" :)

Potentially you could have added another value to the sub-class with 
that identifier.

subclass "AI" b6:22:0f:eb:00:02:00:00:ab:11:f0:a4:5a:73:5e:e8:d2:07;

The other points are valid though, the whole group statement should be 
moved outside the shared-network block.

regards,
-glenn


More information about the dhcp-users mailing list