The problem¶
The Realtek RTL8125 2.5GbE controller ships with a community-maintained out-of-tree DKMS driver (r8125-dkms) on some Ubuntu installs, which has been a recurring source of link flaps and instability on 24.04 as the in-kernel r8169 driver has caught up on RTL8125 support.
The fix¶
Purge the DKMS driver and let the kernel's built-in driver take over:
sudo apt purge r8125-dkms
sudo update-initramfs -u
sudo reboot
After reboot, confirm which driver is bound to the interface:
sudo ethtool -i <interface>
# driver: r8169 <- in-kernel driver, expected after the fix