debcrafters-packages team mailing list archive
-
debcrafters-packages team
-
Mailing list archive
-
Message #05237
[Bug 2119120] Re: Netplan adds routes for DHCP-Server for multiple interfaces
I see you're already using "dhcp4-overrides.use-routes: false" for
ens192, which SHOULD avoid systemd-networkd from adding any routes
provided by DHCP. This also seems to be correctly reflected in the
.network file:
"""
[Match]
Name=ens192
[Network]
DHCP=ipv4
LinkLocalAddressing=ipv6
[DHCP]
RouteMetric=100
UseMTU=true
UseRoutes=false
"""
It's in a legacy "[DHCP]" section, though. Can you please try creating an override config in to translate it to a modern "[DHCPv4]" section to see if that makes any difference?
/etc/systemd/network/10-netplan-ens192.network.d/override.conf:
"""
[DHCPv4]
RouteMetric=100
UseMTU=true
UseRoutes=false
"""
I'm also adding a "systemd" bug task for further investigation.
** Also affects: systemd (Ubuntu)
Importance: Undecided
Status: New
** Summary changed:
- Netplan adds routes for DHCP-Server for multiple interfaces
+ Netplan/systemd-networkd adds routes for DHCP-Server for multiple interfaces
--
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2119120
Title:
Netplan/systemd-networkd adds routes for DHCP-Server for multiple
interfaces
Status in netplan.io package in Ubuntu:
Incomplete
Status in systemd package in Ubuntu:
New
Bug description:
Not sure how to word this one but I'll try:
I've got a server with 2 Network-Interfaces, `ens160` and `ens192`.
There's 3 files in `/etc/netplan/:
/etc/netplan/00-installer-config.yaml.BeforeVMwareCustomization
```yaml
# This is the network config written by 'subiquity'
network:
ethernets:
ens160:
dhcp4: true
version: 2
```
/etc/netplan/99-netcfg-vmware.yaml
```yaml
# Generated by VMWare customization engine.
network:
version: 2
renderer: networkd
ethernets:
ens160:
dhcp4: yes
dhcp4-overrides:
use-dns: false
dhcp6: yes
dhcp6-overrides:
use-dns: false
nameservers:
search:
- mydomain
addresses:
- 10.251.0.18
- 10.251.0.19
- 10.251.0.20
```
/etc/netplan/config.yaml
```yaml
network:
version: 2
ethernets:
ens192:
dhcp4: true
dhcp4-overrides:
use-dns: false
use-routes: false
```
After booting, I have the following routes:
```bash
> ip route show
default via 10.4.0.1 dev ens160 proto dhcp src 10.4.1.47 metric 100
10.4.0.0/16 dev ens160 proto kernel scope link src 10.4.1.47 metric 100
10.4.0.1 dev ens160 proto dhcp scope link src 10.4.1.47 metric 100
10.251.0.18 dev ens192 proto dhcp scope link src 10.255.0.31 metric 100
10.251.0.18 via 10.4.0.1 dev ens160 proto dhcp src 10.4.1.47 metric 100
10.255.0.0/16 dev ens192 proto kernel scope link src 10.255.0.31 metric 100
```
This route-Configuration makes 10.251.0.18 unavailable.
Once I delete the false route, connections to 10.251.0.18 work again:
```bash
> ip route del 10.251.0.18 dev ens192
> ping 10.251.0.18
PING 10.251.0.18 (10.251.0.18) 56(84) bytes of data.
64 bytes from 10.251.0.18: icmp_seq=1 ttl=63 time=0.320 m
```
This wrong route configuration causes my DHCP-Lease to expire before it can be extended, creating a new lease every time and the network connection to be dropped for a few seconds each time it does expire.
How can I prevent the false route?
Tidbit: When I delete both routes to 10.251.0.18 and then do `netplan
apply`, both routes are added again. But ordered the other way around.
Meaning that the DHCP-Server is still reachable then.
Versions:
Ubuntu 22.04.5 LTS
netplan 0.106.1-7ubuntu0.22.04.4
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2119120/+subscriptions