Comment 2 for bug 2020400

Revision history for this message
Donna Whisnant (dewhisna) wrote :

I encountered a similar issue. However, it seems that `dhcpcd5` is correct on this detail if your classless static routes list on the DHCP server isn't also setting the default route. According to the RFC 3442 spec (https://www.rfc-editor.org/rfc/rfc3442.txt), it states:

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

I fixed this specific issue on mine by changing the classless-static-routes to add the default gw route: "0 192 168 1 1", for a default route to 192.168.1.1, to the end of the classless-static-routes list I previously had. And that made my Raspbian install see it and properly set the default gw.

I'm actually struggling with another related issue. While this fixed the default route, it's not setting the other static route that the classless-static-routes list is specifying (though it didn't set it before I fixed this issue either). I'm guessing I have some additional configuration issue somewhere telling it not to add that other route that I haven't resolved yet. And ironically, all of the other clients on my network were previously setting both the default route and the route in classless-static-routes without the classless-static-routes list also specifying the default route (seemingly ignoring the RFC spec in this regard) and they all seem oblivious to this fix (i.e. do doubled up routes or anything).

But try adding the default gw route to your classless-static-route list too and see if that resolves it. You probably want to leave the routers entry too, though, in case there are clients that don't support the classless-static-routes option.