This recently just started happening. I run a hosting company, and adding /32s to our interface is something common so users can have dedicated IPs for their game servers. We've always done this with NetPlan with no issues.
We're running Ubuntu 22.04.1 LTS.
As of a few days ago, I can no longer add them to NetPlan, as adding them and then doing a Netplan try results in losing full connection to the box until the 30 seconds is up. I've even tried doing netplan try --timeout 5
, but it still goes down for the full 30 seconds.
I did debug it and noticed some errors about gateway 4 being deprecated, so I switched to the new routes model, but still no luck.
Here is our NetPlan config which we are trying to use:
network:
version: 2
renderer: networkd
ethernets:
enp1s0:
dhcp4: false
dhcp6: false
match:
macaddress: 00:1B:21:BC:53:DD
addresses:
- 104.129.133.237/31
- 104.129.132.17/32
- 193.57.8.29/32
- 193.57.8.31/32
routes:
- to: default
via: 104.129.133.236
nameservers:
addresses: [104.238.229.4,1.1.1.1]
And here is one of the errors we received, which I have never seen before:
** (process:2309511): WARNING **: 22:36:20.316: Problem encountered while validating default route consistency.Please set up multiple routing tables and use `routing-policy` instead.
Error: Conflicting default route declarations for IPv4 (table: main, metric: default), first declared in id0 but also in id0
And just to be clear, here is a working config on another node of ours:
network:
version: 2
renderer: networkd
ethernets:
id0:
match:
macaddress: A8:A1:59:5F:B6:00
addresses:
- 168.100.160.97/31
- 168.100.160.98/32
gateway4: 168.100.160.96
nameservers:
addresses: [104.238.229.4,1.1.1.1]
The only difference would be the gateway4 which it told me was deprecated and didn't work anyway, and the Mac address matching which I took out to test.