On 2016-02-22, Etienne <[email protected]> wrote:
> Hello there,
>
> It seems to me that dhcpd is ignoring "option routers" when there is a 
> "option classless-static-routes" in the same configuration block. Ex:
>
> with the following:
>
>      option routers 192.168.0.254;
>      option classless-static-routes 192.168.32.0/24 192.168.0.1;
>
> dhcpd will start, the client will see its routing table populated with a 
> route to 192.168.0.32, but not with a default gateway. To achieve what I 
> intended with the above, I remove "option routers" completely, and I 
> add:
>
>      option classless-static-routes 192.168.32.0/24 192.168.0.1, 
> 0.0.0.0/0 192.168.0.254;
>
> Now the client has a default route and a route to 192.168.32.0/24. I 
> have verified this with both an OpenBSD client and a Linux client.

This is in the spec.  RFC 3442:

   "If the DHCP server returns both a Classless Static Routes option and
   a Router option, the DHCP client MUST ignore the Router option."

> I don't know if this is intended or not, but if it is, I would suggest 
> mentioning in man dhcp-options that using "option 
> classless-static-routes" overrides/ignores "option routers".

Probably worth it, I'll bake a diff.

Reply via email to