# Default dhcpcd and Windows DHCP Server

## risq

Hi,

i notice some strange behaviour with several gentoo hosts in an enviroment with a windows DHCP Server.

While other linux host dont have any trouble those gentoo hosts wont get a reserved IP with the default configuration of their dhcpcd client

I used a standard procedure, doing some reservations for the mac adresses of the gentoo hosts.

But the gentoo hosts will not get a new Adress when restarting the network, they will keep their old ones.

What also is strange, that instead of a normal mac adress a very long adress (seems like the mac header) is shown up in the Windows DHCP Server.

Can someone help me with that? The problem only appears with the gentoo hosts, debian and redhat machines work well with the DHCP.

Thx in advance

risq

----------

## UberLord

Hi

dhcpcd will send a DUID + IAID by default as specificed by RFC4361 in the ClientID option.

I'm pretty sure that dhcpcd is the only DHCP client to actually do this, making dhcpcd the only RFC compliant DHCP client out there  :Smile: 

It might be that Windows DHCP server matches by this instead of the actual hardware address in the chaddr field of the DHCP message?

Debian and RedHat machines don't use dhcpcd (at least, not by default) so I don't know.

But for RedHat, newer releases so sent DUID + IAID according to this ticket:

https://bugzilla.redhat.com/show_bug.cgi?id=560361

https://bugzilla.redhat.com/show_bug.cgi?id=1154200

So newer dhclient releases will soon send this as well which means Debian eventually will as well.

Note that dhcpcd has been doing it by default since like forever and others are just catching up  :Wink: 

----------

## risq

Thx for the explanation Uberlord. But what is the solution? Using dhclient?! 

This is default dhcpcd and Default Windows 2012 DHCP Service Behaviour, so Gentoo is not Windows 2012 Server friendly? Not a very good situation i think

----------

## UberLord

No, I'm suggesting that Windows DHCP Server isn't RFC4361 friendly with reserved leases.

ISC dhcpd and dnsmasq manage just fine with reserved leases via mac address and the default dhcpcd.

AND future releases of dhclient will do the same thing.

EDIT: So I'm suggesting you change DHCP server

----------

## risq

 *Quote:*   

> EDIT: So I'm suggesting you change DHCP server

 

Not realistic. Its a complex productive enviroment, the solution needs to sit on the gentoo machines. im surprised no one else has these kind of problems before as dhcpcd is pretty common for all gentoo installatons. any way to make the dhcpcd Windows DHCP compliant? Will switching to dhclient be the simpliest solution?

----------

## UberLord

 *Quote:*   

> Its a complex productive enviroment, the solution needs to sit on the gentoo machines.

 

If you cannot change the DHCP server, then I suggest you take the problem to the vendor which is Microsoft.

Note that DHCPv6 reservations require the DUID and IAID so I'm very suprised you cannot do this for DHCPv4.

But you can also turn dhcpcd into a RFC in-compliant client which makes MS DHCP happy.

Edit /etc/dhcpcd.conf and enable clientid and disable duid.

 *Quote:*   

> im surprised no one else has these kind of problems before as dhcpcd is pretty common for all gentoo installatons.

 

dhcpcd is also the client of choice in Slackware, NetBSD and Android.

This tells me that either they don't use IP reservation for the installations or they don't use MS DHCP servers.

----------

## risq

for Android it seems clear, those devices will connect to some WLAN Device from which they will get a dynamic IP. Maybe most NETBSD systems also will not need to be in the AD. So both types will not depend on some MS DHCP Service.

thx for your hints, i will try

----------

