In systems like Proxmox, where network stability is key, assigning fixed names to interfaces prevents errors caused by changes in order, adding new cards, or system reboots.
We use 2 network cards integrated on the motherboard (enp7s0 and enp8s0) and 1 10 Gbps SFP+ card (enp4s0).
Run the following command to see all network interfaces and their MAC addresses:
ip link show
Example output:
2: enp7s0: ... link/ether 04:42:1a:0b:39:d6 ...
3: enp8s0: ... link/ether 04:42:1a:0b:39:d7 ...
4: enp4s0: ... link/ether 80:61:5f:15:4b:2f ...
Edit the persistent network rules file:
sudo nano /etc/udev/rules.d/70-persistent-net.rules
And add the following lines (adjust MAC addresses if different):
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="04:42:1a:0b:39:d6", NAME="enp7s0"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="04:42:1a:0b:39:d7", NAME="enp8s0"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="80:61:5f:15:4b:2f", NAME="enp4s0"
Review your /etc/network/interfaces file to make sure the interface names match:
auto lo
iface lo inet loopback
auto enp7s0
iface enp7s0 inet static
address 172.26.60.101/24
gateway 172.26.60.1
iface enp8s0 inet manual
iface enp4s0 inet manual
auto vmbr0
iface vmbr0 inet manual
bridge-ports enp4s0
To apply the new rules, reload udev and restart networking services:
sudo udevadm control --reload
sudo udevadm trigger
sudo systemctl restart networking
Or simply reboot the system:
sudo reboot
Assigning fixed names to network interfaces is an essential practice in virtualized environments like Proxmox. It prevents future issues and ensures your network always works as expected.
A good configuration today can save you hours of troubleshooting tomorrow.
Technical article by Matas IT. Need help with your infrastructure? Contact us.