Re: Option 121 Classless Static Routes
Roy Marples
Thu Apr 05 16:14:52 2018
On 05/04/2018 16:41, Neal P. Murphy wrote:
Aside, does the RFC provide a way to specify metrics for default routes? Technically, Linux *can* have multiple default routes. But they have to have different metrics so Linux will know which one to use as any given time.
No, because that's a Linux-ism.
dhcpcd uses metrics so that you can have same destination routes across
different interfaces - it's how wired is preferred to wireless for example.
Logically having >1 default route active at once makes no sense.
BSD has no route metrics, so dhcpcd changes the routing table as needed
on this platform. The end result is still the same though.
Static routes work well enough for (nearly) trivial internetworks. But they become unmanageable as complexity increases. That's why routing daemons and protocols were invented; but these reduce security (imagine a rogue host pushing/advertising a route to internet--through a teredo tunnel or via cellular data link--that bypasses the perimeter firewall). With neither routing daemons/protocols nor static routes, the only option is to employ hairpin routing on default gateways. This works, but can double the traffic on various links (e.g., traffic from .1.120/24 to .56.4/24 goes to the default gateway .1.1 which immediately sends it right back out the same link to .1.254 which is the gateway to .56.0/24); not as elegant or as efficient as having proper routes.
But is it worth adding such complexity to dhcpcd?
dhcpcd can already cope just fine with complex routing setup in the DHCP
server.
If it can't, then it's a bug.
Roy
Archive administrator: postmaster@marples.name