I’m encountering a network issue on my Debian 12 Server where activating any virtual network device — such as when starting Docker or initiating a VM with qemu-kvm — results in the new virtual device taking over the default network route. This change disrupts my external network connection, causing a loss of internet access. Usually, the connection persists after starting the services for around 30 to 40 seconds, upon which the output from ip route show changes from:
default via 192.168.178.1 dev enp4s0
172.30.0.0/16 dev br-036d78a9f36a proto kernel scope link src 172.30.0.1 linkdown
172.31.0.0/24 dev docker0 proto kernel scope link src 172.31.0.1 linkdown
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown
192.168.178.0/24 dev enp4s0 proto kernel scope link src 192.168.178.10
192.168.178.1 dev enp4s0 scope link
to either this when starting a docker container with default network rules:
0.0.0.0 dev veth0136027 scope link
default dev veth0136027 scope link
default via 192.168.178.1 dev enp4s0
169.254.0.0/16 dev veth0136027 proto kernel scope link src 169.254.214.10
172.30.0.0/16 dev br-036d78a9f36a proto kernel scope link src 172.30.0.1 linkdown
172.31.0.0/24 dev docker0 proto kernel scope link src 172.31.0.1 linkdown
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown
192.168.178.0/24 dev enp4s0 proto kernel scope link src 192.168.178.10
192.168.178.0/24 dev veth0136027 proto kernel scope link src 192.168.178.20
192.168.178.1 dev enp4s0 scope link
or this when starting a vm via qemu-kvm:
0.0.0.0 dev vnet2 scope link
default dev vnet2 scope link
default via 192.168.178.1 dev enp4s0
169.254.0.0/16 dev vnet2 proto kernel scope link src 169.254.251.24
172.30.0.0/16 dev br-036d78a9f36a proto kernel scope link src 172.30.0.1 linkdown
172.31.0.0/24 dev docker0 proto kernel scope link src 172.31.0.1 linkdown
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown
192.168.178.0/24 dev enp4s0 proto kernel scope link src 192.168.178.10
192.168.178.0/24 dev vnet2 proto kernel scope link src 192.168.178.20
192.168.178.1 dev enp4s0 scope link
upon which both ping google.com and ping 8.8.8.8 return
From 192.168.178.20 (192.168.178.20) icmp_seq=35 Destination Host Unreachable and
From 192.168.178.20 icmp_seq=36 Destination Host Unreachable
respectively.
The logs from sudo journalctl -xeu systemd-networkd are the following:
Aug 03 14:27:41 callisto systemd-networkd[873]: veth0d1746b: Failed to start LLDP client: No such device
Aug 03 14:27:41 callisto systemd-networkd[873]: veth0d1746b: Could not process link message: No such device
Aug 03 14:27:41 callisto systemd-networkd[873]: veth0d1746b: Failed
Aug 03 14:27:41 callisto systemd-networkd[873]: veth5f934f0: Link DOWN
Aug 03 14:27:41 callisto systemd-networkd[873]: veth5f934f0: Lost carrier
Aug 03 14:27:41 callisto systemd-networkd[873]: veth0d1746b: Link DOWN
Aug 03 14:27:41 callisto systemd-networkd[873]: veth0d1746b: Lost carrier
Aug 03 14:38:37 callisto systemd-networkd[873]: vethff4269b: Link UP
Aug 03 14:38:37 callisto systemd-networkd[873]: veth67c6d92: Link UP
Aug 03 14:38:37 callisto systemd-networkd[873]: veth67c6d92: Gained carrier
Aug 03 14:38:37 callisto systemd-networkd[873]: vethff4269b: Gained carrier
Aug 03 14:38:37 callisto systemd-networkd[873]: docker0: Gained carrier
Aug 03 14:38:37 callisto systemd-networkd[873]: veth67c6d92: Link UP
Aug 03 14:38:37 callisto systemd-networkd[873]: veth67c6d92: Gained carrier
Aug 03 14:38:37 callisto systemd-networkd[873]: veth67c6d92: Link DOWN
Aug 03 14:38:37 callisto systemd-networkd[873]: veth67c6d92: Lost carrier
Aug 03 14:38:37 callisto systemd-networkd[873]: vethff4269b: Lost carrier
Aug 03 14:38:37 callisto systemd-networkd[873]: vethff4269b: DHCPv6 lease lost
Aug 03 14:38:37 callisto systemd-networkd[873]: vethff4269b: Link DOWN
Aug 03 14:38:37 callisto systemd-networkd[873]: veth67c6d92: Link UP
Aug 03 14:38:37 callisto systemd-networkd[873]: veth67c6d92: Gained carrier
Aug 03 14:38:38 callisto systemd-networkd[873]: docker0: Lost carrier
Aug 03 14:38:39 callisto systemd-networkd[873]: veth67c6d92: Gained IPv6LL
Aug 03 14:42:32 callisto systemd-networkd[873]: veth67c6d92: Lost carrier
Aug 03 14:42:32 callisto systemd-networkd[873]: veth67c6d92: DHCPv6 lease lost
Aug 03 14:42:32 callisto systemd-networkd[873]: veth67c6d92: Link DOWN
Things I have already tried include:
- Setting my
/etc/network/interfacesconfiguration to the following:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto enp4s0
iface enp4s0 inet static
address 192.168.178.10
netmask 255.255.255.0
gateway 192.168.178.1
dns-nameservers 100.100.100.100
# This is an autoconfigured IPv6 interface
iface enp4s0 inet6 auto
- Switching from the default NetworkManager to systemd-networkd with the following configuration:
# /etc/systemd/network/10-enp4s0.network
[Match]
Name=enp4s0
[Network]
Address=192.168.178.10/24
Gateway=192.168.178.1
DNS=100.100.100.100
Priority=100
- Deleting the new routes manually, which worked but is not a practical solution
- Disabling my
ufwfirewall, to see if it makes any kind of difference (it didn't)
Please excuse any stupid mistakes or gaps in knowledge on my part, I am tinkering with Linux and servers in general just as a hobby and don't actually have an education in this field.