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
Task Type Feature Request
Category Arch Projects
Status Closed
Assigned To Jouke Witteveen (jouke)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

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
Comment by brent saner (sanerb) - Tuesday, 26 November 2019, 20:26 GMT
Correction:

"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)."
Comment by Jouke Witteveen (jouke) - Wednesday, 25 December 2019, 12:47 GMT
Thanks for your report. Patches are welcome. What you could do is include the following in your profile:
DhcpcdOptions="-L -G"

Would that do what you want?
Comment by brent saner (sanerb) - Friday, 11 September 2020, 04:55 GMT
Whoops, apologies for the delay... I somehow missed the notification on your comment, Jouke.

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=`.
Comment by Jouke Witteveen (jouke) - Friday, 09 October 2020, 11:41 GMT
The "-L" option was in my suggestion merely because it is added by default if no DhcpcdOptions= are provided. So if you provide dhcpcd options manually and want to mimic the default config, you should add it. If you have no use for it, you can leave it out, but for debugging the fallout of your changes, this is not advised.

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.
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.

Loading...