[Bug 2073869] [NEW] systemd-networkd refuses to apply route with gateway out of the NIC's subnet
Alberto Contreras
2073869 at bugs.launchpad.net
Tue Jul 23 10:49:07 UTC 2024
Public bug reported:
The version of systemd-networkd on Ubuntu Focal refuses to configure a
route due to the fact that the address of the gateway is outside of the
subnet of the NIC. The onlink option is required. This does not happen
on Jammy and Noble.
Steps to reproduce:
```
# ip a
2: ens2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether de:00:00:62:c5:e9 brd ff:ff:ff:ff:ff:ff
inet 212.47.xxx.xxx/32 scope global dynamic ens2
valid_lft 800sec preferred_lft 800sec
inet6 2001:xxx:xxx:xxxx:xxxx:xx:xxxx:c5e9/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::dc00:ff:fe62:c5e9/64 scope link
valid_lft forever preferred_lft forever
# cat /etc/netplan/50-cloud-init.yaml
version: 2
ethernets:
ens2:
addresses:
- 2001:xxx:xxx:xxxx:xxxx:xx:xxxx:c5e9/64
dhcp4: true
routes:
- to: 169.254.42.42/32
via: 62.210.0.1
- to: ::/0
via: fe80::dc00:ff:fe62:c5ea
# netplan apply
# journalctl -b -u systemd-networkd
...
Jul 18 10:05:59 focal systemd-networkd[668]: ens2: Could not set route: Nexthop has invalid gateway. Network is unreachable
...
```
Is this something that netplan fixes and presents it in a better way to
networkd in newer versions? Or is this something that networkd improves
in newer versions?
cloud-init's upstream bug: https://github.com/canonical/cloud-
init/issues/5523
** Affects: cloud-init (Ubuntu)
Importance: Undecided
Status: Invalid
** Affects: netplan.io (Ubuntu)
Importance: Undecided
Status: New
** Affects: systemd (Ubuntu)
Importance: Undecided
Status: New
** Affects: cloud-init (Ubuntu Focal)
Importance: Undecided
Status: New
** Affects: netplan.io (Ubuntu Focal)
Importance: Undecided
Status: New
** Affects: systemd (Ubuntu Focal)
Importance: Undecided
Status: New
** Also affects: cloud-init (Ubuntu Focal)
Importance: Undecided
Status: New
** Also affects: netplan.io (Ubuntu)
Importance: Undecided
Status: New
** Also affects: systemd (Ubuntu)
Importance: Undecided
Status: New
** Changed in: cloud-init (Ubuntu)
Status: New => Invalid
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
Matching subscriptions: foundations-bugs
https://bugs.launchpad.net/bugs/2073869
Title:
systemd-networkd refuses to apply route with gateway out of the NIC's
subnet
Status in cloud-init package in Ubuntu:
Invalid
Status in netplan.io package in Ubuntu:
New
Status in systemd package in Ubuntu:
New
Status in cloud-init source package in Focal:
New
Status in netplan.io source package in Focal:
New
Status in systemd source package in Focal:
New
Bug description:
The version of systemd-networkd on Ubuntu Focal refuses to configure a
route due to the fact that the address of the gateway is outside of
the subnet of the NIC. The onlink option is required. This does not
happen on Jammy and Noble.
Steps to reproduce:
```
# ip a
2: ens2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether de:00:00:62:c5:e9 brd ff:ff:ff:ff:ff:ff
inet 212.47.xxx.xxx/32 scope global dynamic ens2
valid_lft 800sec preferred_lft 800sec
inet6 2001:xxx:xxx:xxxx:xxxx:xx:xxxx:c5e9/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::dc00:ff:fe62:c5e9/64 scope link
valid_lft forever preferred_lft forever
# cat /etc/netplan/50-cloud-init.yaml
version: 2
ethernets:
ens2:
addresses:
- 2001:xxx:xxx:xxxx:xxxx:xx:xxxx:c5e9/64
dhcp4: true
routes:
- to: 169.254.42.42/32
via: 62.210.0.1
- to: ::/0
via: fe80::dc00:ff:fe62:c5ea
# netplan apply
# journalctl -b -u systemd-networkd
...
Jul 18 10:05:59 focal systemd-networkd[668]: ens2: Could not set route: Nexthop has invalid gateway. Network is unreachable
...
```
Is this something that netplan fixes and presents it in a better way
to networkd in newer versions? Or is this something that networkd
improves in newer versions?
cloud-init's upstream bug: https://github.com/canonical/cloud-
init/issues/5523
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2073869/+subscriptions
More information about the foundations-bugs
mailing list