FS#64651 - [netctl] Add support for DefaultRoute to ethernet and wireless connections
Attached to Project:
Arch Linux
Opened by brent saner (sanerb) - Tuesday, 26 November 2019, 11:23 GMT
Last edited by Jelle van der Waa (jelly) - Friday, 11 August 2023, 15:48 GMT
Opened by brent saner (sanerb) - Tuesday, 26 November 2019, 11:23 GMT
Last edited by Jelle van der Waa (jelly) - Friday, 11 August 2023, 15:48 GMT
|
Details
Description:
I would like to suggest adding support for a DefaultRoute=(true|false) configuration options for connection types ethernet and wireless, in addition to an IgnoreRoutes=(true|false) option. dhcpcd has the -G flag for this, at least for ignoring a default route, but unfortunately dhclient does not. It can, however, be supported by a dhclient.conf file and accompanying script (by not requesting the "routers" DHCP option, option 3). This has the added benefit of providing an in-band resolution to this bug: https://wiki.archlinux.org/index.php/Netctl#RTNETLINK_answers:_File_exists_(with_multiple_NICs) as one can simply ignore the default route on additional NICs. IgnoreRoutes would ignore all RFC 3442 routes in the DHCP lease (by not requesting the "rfc3442-classless-static-routes" DHCP option, option 121). This is different from the "default route" or "gateway" option ("routes", option 3). |
This task depends upon
Closed by Jelle van der Waa (jelly)
Friday, 11 August 2023, 15:48 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/n etctl/issues/9
Friday, 11 August 2023, 15:48 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/n etctl/issues/9
"This is different from the 'default route' or 'gateway' option ('routes', option 3)."
should be:
"This is different from the 'default route' or 'gateway' option ('routers', option 3)."
DhcpcdOptions="-L -G"
Would that do what you want?
This (sort of- see #3) works for dhcpcd, yes, but:
1.) It is a bit more clumsy with dhclient on the configuration end
2.) It would be nice to have this parity with PPPOE and MOBILE_PPP connections' `DefaultRoute=false` at the least, and
3.) dhcpcd's -L option is to ignore Link-Local, which is not the same as RFC 3442 routes. (Link-Local/LL is the 169.254.0.0/16 prefix in IPv4, which is used by Bonjour/ZeroConf/etc., not additional static routes pushed by a DHCP lease).
Of course, the IPv6 equivalents would be perhaps to ignore RAs (link-local is ...a little different in IPv6, as the router does not determine/advertise the prefix - it's hardcoded to spec). This is already possible for IPv6 by using `static` or `no` values for `IP6=`.
The problem I see with your suggestion is that it will be very hard to implement for dhclient. As you mention yourself, dhclient would require changes to its configuration file, which netctl will not touch.