** Description changed: [impact] the networkd UseRoutes parameter allowed ignoring all routes provided by a dhcp4 server, including the route via the dhcp4-provided gateway. This was the behavior of networkd until recently, and in Focal the UseRoutes parameter does *not* prevent networkd from adding the route via the dhcp4-provided gateway. This is now controlled with a new parameter, UseGateway. The systemd in Focal unfortunately has part of the upstream code; it no longer ignores the gateway route when UseRoutes=false is specified, but also it does not include the UseGateway parameter. + Before Focal, networkd did not allow ignoring dhcpv4 routes and the + gateway separately; the UseRoutes= parameter either used, or ignored, + both. This is why upstream added the UseGateway= paramter, which should + be backported to allow control of ignoring the dhcpv4 routes and gateway + separately. + [test case] - bug 1872589 has a good test case netplan config, but a very quick test - can be done with the networkd config: + In Focal, bug 1872589 has a good test case netplan config, but a very + quick test can be done with the networkd config: [Match] Name=eth0 [Network] DHCP=ipv4 LinkLocalAddressing=ipv6 [DHCP] RouteMetric=100 UseMTU=true UseRoutes=false - - this results in the system incorrectly setting a route via the default gateway: + this results in the system incorrectly setting a route via the default + gateway: root@lp1867375-f:~# ip r - default via 10.202.51.1 dev eth0 proto dhcp src 10.202.51.86 metric 100 - 10.202.51.0/24 dev eth0 proto kernel scope link src 10.202.51.86 - 10.202.51.1 dev eth0 proto dhcp scope link src 10.202.51.86 metric 100 + default via 10.202.51.1 dev eth0 proto dhcp src 10.202.51.86 metric 100 + 10.202.51.0/24 dev eth0 proto kernel scope link src 10.202.51.86 + 10.202.51.1 dev eth0 proto dhcp scope link src 10.202.51.86 metric 100 + + + Before Focal, the above test case shows "correct" behavior, but there is no way to ignore the dhcpv4 routes but use the dhcpv4 gateway. This pre-Focal, the test case would be to use the UseGateway= parameter, e.g.: + + [Match] + Name=eth0 + + [Network] + DHCP=ipv4 + LinkLocalAddressing=ipv6 + + [DHCP] + RouteMetric=100 + UseMTU=true + UseRoutes=false + UseGateway=true + + which *should* result in the default gateway being configured: + + root@lp1867375-f:~# ip r + default via 10.202.51.1 dev eth0 proto dhcp src 10.202.51.86 metric 100 + 10.202.51.0/24 dev eth0 proto kernel scope link src 10.202.51.86 + 10.202.51.1 dev eth0 proto dhcp scope link src 10.202.51.86 metric 100 [regression potential] - tbd + Any regression would likely involve incorrect setting, or ignoring, of + dhcpv4-provided routes, and/or incorrect setting, or ignoring, of the + dhcpv4-provided gateway. [other info] to properly support separation of 'routes' and 'gateways' received via dhcp4, SRU releases should also support the UseGateway parameter, which is what this bug was originally opened requesting. [original description] requesting backport of PR https://github.com/systemd/systemd/pull/14983 which fixes the issue described in https://github.com/systemd/systemd/issues/14982 to 18.04 (bionic)
** Description changed: [impact] the networkd UseRoutes parameter allowed ignoring all routes provided by a dhcp4 server, including the route via the dhcp4-provided gateway. This was the behavior of networkd until recently, and in Focal the UseRoutes parameter does *not* prevent networkd from adding the route via the dhcp4-provided gateway. This is now controlled with a new parameter, UseGateway. The systemd in Focal unfortunately has part of the upstream code; it no longer ignores the gateway route when UseRoutes=false is specified, but also it does not include the UseGateway parameter. Before Focal, networkd did not allow ignoring dhcpv4 routes and the gateway separately; the UseRoutes= parameter either used, or ignored, both. This is why upstream added the UseGateway= paramter, which should be backported to allow control of ignoring the dhcpv4 routes and gateway separately. [test case] In Focal, bug 1872589 has a good test case netplan config, but a very quick test can be done with the networkd config: [Match] Name=eth0 [Network] DHCP=ipv4 LinkLocalAddressing=ipv6 [DHCP] RouteMetric=100 UseMTU=true UseRoutes=false this results in the system incorrectly setting a route via the default gateway: root@lp1867375-f:~# ip r default via 10.202.51.1 dev eth0 proto dhcp src 10.202.51.86 metric 100 10.202.51.0/24 dev eth0 proto kernel scope link src 10.202.51.86 10.202.51.1 dev eth0 proto dhcp scope link src 10.202.51.86 metric 100 - - Before Focal, the above test case shows "correct" behavior, but there is no way to ignore the dhcpv4 routes but use the dhcpv4 gateway. This pre-Focal, the test case would be to use the UseGateway= parameter, e.g.: + Before Focal, the above test case shows "correct" behavior, but there is + no way to ignore the dhcpv4 routes but use the dhcpv4 gateway. This + pre-Focal, the test case would be to use the UseGateway= parameter, + e.g.: [Match] Name=eth0 [Network] DHCP=ipv4 LinkLocalAddressing=ipv6 [DHCP] RouteMetric=100 UseMTU=true UseRoutes=false UseGateway=true which *should* result in the default gateway being configured: root@lp1867375-f:~# ip r default via 10.202.51.1 dev eth0 proto dhcp src 10.202.51.86 metric 100 10.202.51.0/24 dev eth0 proto kernel scope link src 10.202.51.86 10.202.51.1 dev eth0 proto dhcp scope link src 10.202.51.86 metric 100 [regression potential] Any regression would likely involve incorrect setting, or ignoring, of dhcpv4-provided routes, and/or incorrect setting, or ignoring, of the dhcpv4-provided gateway. + [scope] + + One possible direction is this upstream PR + https://github.com/systemd/systemd/pull/15443 + + If accepted, that (and previous commits adding UseGateway= parameter) + would need to be applied to Debian and all Ubuntu releases; Focal, Eoan, + Bionic, and Xenial. + [other info] to properly support separation of 'routes' and 'gateways' received via dhcp4, SRU releases should also support the UseGateway parameter, which is what this bug was originally opened requesting. [original description] requesting backport of PR https://github.com/systemd/systemd/pull/14983 which fixes the issue described in https://github.com/systemd/systemd/issues/14982 to 18.04 (bionic) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1867375 Title: systemd-networkd: UseRoutes behavior change with introduction of UseGateway param To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1867375/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs