dhcpcd-discuss

Re: If classless-static-route is specified, default route is not set

Roy Marples

Sat Oct 07 10:11:11 2017

Hi Jason

On 07/10/2017 04:49, Jason A. Donenfeld wrote:
Hi Roy,

If a static route is passed via dnsmasq, such as:

     dhcp-option=option:classless-static-route,10.10.0.0/16,10.10.10.1

, then dhcpcd will set this, but forget to set the default route.
tcpdump indicates that both the routers tag and the
classlessstaticroutes tag are being sent in the dhcp packet.

This is by design.
See RFC 3442, DHCP Client Behavior
https://tools.ietf.org/html/rfc3442

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

   Similarly, if the DHCP server returns both a Classless Static Routes
   option and a Static Routes option, the DHCP client MUST ignore the
   Static Routes option.

This is because the classless static route option can carry a default route.

Roy

Follow-Ups:
Re: If classless-static-route is specified, default route is not setJason A. Donenfeld
References:
If classless-static-route is specified, default route is not setJason A. Donenfeld
Archive administrator: postmaster@marples.name