Proxmox4.2 eth numbering is changing

samontetro

Active Member
Jun 19, 2012
78
3
28
Grenoble, France
I'm using proxmox 4.2 on a computer with 10 network interfaces:
On board:
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe
02:00.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe
03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe
03:00.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe​
10Gb/s additionnal board with 2 ports:
06:00.0 Ethernet controller: Intel Corporation Ethernet 10G 2P X520 Adapter (rev 01)
06:00.1 Ethernet controller: Intel Corporation Ethernet 10G 2P X520 Adapter (rev 01)​
1/Gb/s additionnal board with 4 ports:
0d:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
0d:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
0d:00.2 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
0d:00.3 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)​

It is a test config with 2 nodes (testing drbd, clustering, HA...). I was using eth0 for administration (1Gb) and eth9 for drbd (10Gb).

I create a new bridge vmbr1 on eth8 to setup a VM, plug the cable in the available port and reboot.
After reboot my eth9 has moved to a 1Gb/s port of the pci board! And drbd fails, going to a split brain situation (no damage, it is a test config).
Moreover some ethernet interfaces seams to have problems:
root@proxmost3:~# ethtool -p eth1
Cannot identify NIC: Resource temporarily unavailable
root@proxmost3:~# ethtool -p eth2
Cannot identify NIC: Resource temporarily unavailable​

Removing vmbr1 and unpluging the ethernet conection, eth9 goes back to it's initial port.

Is there a way to fix ethernet interfaces numbering without conflicts with proxmox environment ?

Thanks
 
I've setup a static naming of ethx interfaces via an udev rule, based on the mac addresses. Seams to work fine with proxmox.
On the first host file /etc/udev/rules.d/70-persistent-net.rules contains:
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="14:18:77:47:a4:9a", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="14:18:77:47:a4:9b", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="14:18:77:47:a4:9c", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="14:18:77:47:a4:9d", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="a0:36:9f:94:51:74", ATTR{type}=="1", KERNEL=="eth*", NAME="eth4"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="a0:36:9f:94:51:75", ATTR{type}=="1", KERNEL=="eth*", NAME="eth5"

etc....