dhcpcd-discuss

Re: how to configure to accept both additional static routes AND a default gateway

Roy Marples

Fri Jun 12 08:44:56 2020

Hi Bruce

On 12/06/2020 06:08, Bruce Ferrell wrote:
I have a number of Raspberry PIs in use and I'd long noticed that they didn't seem to get the default gateway sent by my DHCP server.  I've been working around this but it has finally become vexing enough that I spent some time searching and trying to find a configuration that would do the right thing.  No dice.

That server is ISC DHCP Server 4.1.1-P1. The host for this dhcp server also hosts an openvpn server and the additional route is so that hosts on my internal network know how to reach openvpn clients.

The Windows 7/8/10 dhcp client does the right thing...  The OS X dhcp client does the right thing; sets the default gateway.  Using wireshark, I can see both being sent from the server.  Other linux systems that use ISC DHCPD in client mode does the right thing (kind of a no brainer).  Only DHCPCD fails to set the default gateway while setting the static route for the vpn network.

Yes, I understand I can set a rule file on the individual endpoints or otherwise manually configure, but doesn't that sort of defeat the purpose of dhcp?

So... What IS the solution?

Can you share the wireshark trace please?

I suspect that you've setup one route using Classless Static Routes and the other using the Default Router option. dhcpcd does not allow both to be used at the same time as this violates RFC 3442 under the DHCP Client Behavior section.

If my guess is correct you'll just need to set all the routes in the CSR.

Roy

Follow-Ups:
Re: how to configure to accept both additional static routes AND a default gatewayBruce Ferrell
References:
how to configure to accept both additional static routes AND a default gatewayBruce Ferrell
Archive administrator: postmaster@marples.name