Multiple unwanted default routes being added automatically

May 15, 2024
3
0
1
How do I prevent default routes from being added automatically?

The default route that actually ends up being used breaks internet connectivity.

I would expect to only have:

Code:
default via 10.55.47.1 dev vmbr0 proto kernel onlink
10.55.47.0/24 dev vmbr0 proto kernel scope link src 10.55.47.5

But I am getting this:

Code:
root@spock:~# ip route
0.0.0.0 dev enp129s0f0 scope link
default dev enp129s0f0 scope link
default via 10.55.47.1 dev vmbr0 proto kernel onlink
10.55.47.0/24 dev vmbr0 proto kernel scope link src 10.55.47.5
169.254.0.0/16 dev enx9af1a47b7437 proto kernel scope link src 169.254.29.60
169.254.0.0/16 dev enp129s0f0 proto kernel scope link src 169.254.147.7

root@spock:~# systemctl restart networking

root@spock:~# ip r
default via 10.55.47.1 dev vmbr0 proto kernel onlink
10.55.47.0/24 dev vmbr0 proto kernel scope link src 10.55.47.5
169.254.0.0/16 dev enx9af1a47b7437 proto kernel scope link src 169.254.29.60

root@spock:~# sleep 20

root@spock:~# ip r
0.0.0.0 dev enp129s0f0 scope link
default dev enp129s0f0 scope link
default via 10.55.47.1 dev vmbr0 proto kernel onlink
10.55.47.0/24 dev vmbr0 proto kernel scope link src 10.55.47.5
169.254.0.0/16 dev enx9af1a47b7437 proto kernel scope link src 169.254.29.60
169.254.0.0/16 dev enp129s0f0 proto kernel scope link src 169.254.21.87

Code:
root@spock:~# pveversion 
pve-manager/8.2.4/faa83925c9641325 (running kernel: 6.8.12-1-pve)

Code:
root@spock:~# cat /etc/network/interfaces

[... snip ...]

auto lo
iface lo inet loopback

iface eno1 inet manual

iface enx9af1a47b7437 inet manual

iface eno2 inet manual

iface enp129s0f0 inet manual

iface enp129s0f1 inet manual

auto vmbr0
iface vmbr0 inet static
        address 10.55.47.5/24
        gateway 10.55.47.1
        bridge-ports enp129s0f0
        bridge-stp off
        bridge-fd 0

source /etc/network/interfaces.d/*
 
Last edited:
I agree there is something unusual going on. Of the seven PVE hosts I'm currently running, this is only one that is different from the two expected lines mentioned above.

I'm not seeing anything related to DHCP turned on. The /etc/network/interfaces file is shown above and none of the interfaces are marked for dhcp. There is nothing in /etc/network/interfaces.d/. As far as I know that's the only way interfaces would be pulling DHCP.
 
169.254.0.0/16 is used for IPv4 address autoconfiguration so you probably have something running on your host that does that.
 
Yes, but that's basically what I'm asking... what could possibly be doing that? This is a very vanilla install: installed PVE 8.2, joined to cluster, created VMs. Definitely not trying to do anything more than that. As a last resort I'll just reinstall, but I'd really like to understand why this is happening before doing that.
 
Did you install any additional packages? Usually avahi does auto-configuration on Linux. It certainly isn't enabled by default, so maybe you installed a package that pulled that in. Checking /var/log/apt/history.log would be a good start.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!