2019-07-16 05:30:55 |
Alexey Zagarin |
bug |
|
|
added bug |
2019-08-20 13:31:02 |
Mathieu Trudel-Lapierre |
bug task added |
|
systemd (Ubuntu) |
|
2019-08-20 13:31:09 |
Mathieu Trudel-Lapierre |
netplan: status |
New |
Invalid |
|
2019-08-20 13:31:16 |
Mathieu Trudel-Lapierre |
systemd (Ubuntu): importance |
Undecided |
High |
|
2019-08-21 14:15:13 |
Dan Streetman |
bug |
|
|
added subscriber Dan Streetman |
2019-09-27 15:31:42 |
Dan Streetman |
description |
Consider the following setup:
network:
version: 2
renderer: networkd
ethernets:
ens4:
dhcp-identifier: mac
dhcp4: yes
dhcp4-overrides:
use-dns: no
use-ntp: no
send-hostname: no
use-hostname: no
use-routes: no
routes:
- to: 10.0.0.0/8
via: 10.50.0.1
optional: true
Thus I only need to get the IP address by DHCP, then add some static routes. This setup doesn't work. Apparently `routes` keyword only works when using static addresses. |
[impact]
a systemd-networkd configuration that uses ipv4 dhcp but ignores the dhcp-provided route, and instead sets up a static route, and also does not include a static ipv4 address, fails to actually create the static route.
This is due to networkd attempting to set up the static route before the dhcp ipv4 address is assigned, and the kernel does not allow creation of the route before setting up corresponding ipv4 address.
this results in a network that does have the dhcp-provided ipv4 address, but is missing both its dhcp-provided route (because networkd is configured to ignore it) and the static route (because networkd was not able to create it).
[test case]
(remove or unconfigure netplan, so it will not conflict with this manual networkd configuration)
create a networkd config file, e.g.:
$ cat /etc/systemd/network/10-eth0.network
[Match]
Name=eth0
[Network]
DHCP=ipv4
[Route]
Destination=10.0.0.0/8
Gateway=10.202.51.1
[DHCP]
UseRoutes=false
then *reboot* the system, and check that the static route was not applied:
$ ip r
10.202.51.0/24 dev eth0 proto kernel scope link src 10.202.51.254
note that because networkd does not remove ipv4 addresses that it manages (including dhcpv4 addresses), restarting networkd after the initial boot
will correctly create the static route, e.g.:
ubuntu@lp1836695-b:~$ ip r
10.202.51.0/24 dev eth0 proto kernel scope link src 10.202.51.254
ubuntu@lp1836695-b:~$ sudo systemctl restart systemd-networkd
ubuntu@lp1836695-b:~$ ip r
10.0.0.0/8 via 10.202.51.1 dev eth0 proto static
10.202.51.0/24 dev eth0 proto kernel scope link src 10.202.51.254
[regression potential]
adjusting how networkd works always carries the risk of breaking networking.
TBD detailed regression potential after analyzing fix.
[other info]
original description:
--
Consider the following setup:
network:
version: 2
renderer: networkd
ethernets:
ens4:
dhcp-identifier: mac
dhcp4: yes
dhcp4-overrides:
use-dns: no
use-ntp: no
send-hostname: no
use-hostname: no
use-routes: no
routes:
- to: 10.0.0.0/8
via: 10.50.0.1
optional: true
Thus I only need to get the IP address by DHCP, then add some static routes. This setup doesn't work. Apparently `routes` keyword only works when using static addresses. |
|
2019-09-27 15:32:08 |
Dan Streetman |
summary |
Netplan ignores static routes when using DHCP |
systemd fails to setup static routes at boot when using DHCP |
|
2019-09-27 15:33:27 |
Dan Streetman |
nominated for series |
|
Ubuntu Bionic |
|
2019-09-27 15:33:27 |
Dan Streetman |
bug task added |
|
systemd (Ubuntu Bionic) |
|
2019-09-27 15:33:27 |
Dan Streetman |
nominated for series |
|
Ubuntu Eoan |
|
2019-09-27 15:33:27 |
Dan Streetman |
bug task added |
|
systemd (Ubuntu Eoan) |
|
2019-09-27 15:33:27 |
Dan Streetman |
nominated for series |
|
Ubuntu Disco |
|
2019-09-27 15:33:27 |
Dan Streetman |
bug task added |
|
systemd (Ubuntu Disco) |
|
2019-09-27 15:33:34 |
Dan Streetman |
systemd (Ubuntu Eoan): status |
New |
Fix Released |
|
2019-09-27 15:33:37 |
Dan Streetman |
systemd (Ubuntu Eoan): importance |
High |
Medium |
|
2019-09-27 15:33:40 |
Dan Streetman |
systemd (Ubuntu Bionic): importance |
Undecided |
Medium |
|
2019-09-27 15:33:56 |
Dan Streetman |
systemd (Ubuntu Bionic): status |
New |
In Progress |
|
2019-09-27 15:33:58 |
Dan Streetman |
systemd (Ubuntu Bionic): assignee |
|
Dan Streetman (ddstreet) |
|
2019-09-27 15:34:01 |
Dan Streetman |
systemd (Ubuntu Disco): importance |
Undecided |
Medium |
|
2019-09-27 15:36:36 |
Dan Streetman |
systemd (Ubuntu Disco): status |
New |
In Progress |
|
2019-09-27 15:36:38 |
Dan Streetman |
systemd (Ubuntu Disco): assignee |
|
Dan Streetman (ddstreet) |
|
2020-01-14 13:05:06 |
Dan Streetman |
systemd (Ubuntu Disco): status |
In Progress |
Won't Fix |
|
2020-02-03 21:53:57 |
Steve Langasek |
systemd (Ubuntu Bionic): status |
In Progress |
Fix Committed |
|
2020-02-03 21:54:04 |
Steve Langasek |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2020-02-03 21:54:08 |
Steve Langasek |
bug |
|
|
added subscriber SRU Verification |
2020-02-03 21:54:13 |
Steve Langasek |
tags |
|
verification-needed verification-needed-bionic |
|
2020-02-06 15:23:23 |
Dimitri John Ledkov |
systemd (Ubuntu Bionic): status |
Fix Committed |
In Progress |
|
2020-02-06 21:47:09 |
Steve Langasek |
systemd (Ubuntu Bionic): status |
In Progress |
Fix Committed |
|
2020-02-16 14:00:47 |
Dan Streetman |
tags |
verification-needed verification-needed-bionic |
verification-done verification-done-bionic |
|
2020-02-17 09:57:58 |
Łukasz Zemczak |
removed subscriber Ubuntu Stable Release Updates Team |
|
|
|
2020-02-17 10:07:54 |
Launchpad Janitor |
systemd (Ubuntu Bionic): status |
Fix Committed |
Fix Released |
|