Renaming network interfaces Proxmox 7

jbrack1

New Member
Jun 17, 2022
5
1
3
Just installed a second network card and it's being detected first and motherboard nic is second.

I would like my motherboard nic to be enp1s0 and my 2nd nic to be enp2s0

Tried creating a ".link" file in /etc/systemd/network, which changes the names, but the correct interface still won't assign correctly.
 
Yes, I followed that page. This makes neither interface want to work.

10-rename-enp1s0.link
Code:
[Match]
Path=pci-0000:02:00.0
[Link]
Name=enp1s0

10-rename-enp2s0.link
Code:
[Match]
Path=pci-0000:01:00.0
[Link]
Name=enp2s0

/etc/network/interfaces
Code:
auto lo
iface lo inet loopback

iface enp1s0 inet manual
#RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (Motherboard)

#2nd NIC
auto enp2s0
iface enp2s0 inet manual


auto vmbr0
iface vmbr0 inet static
        address 10.47.2.104/24
        bridge-ports enp2s0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4094
 
I'm not sure hat that will work. I would think those interfaces already exist with their enp[12]s0 names. Maybe try to name them something like eth[12].

You can also check the log journalctl -b if you see some error about renaming the interfaces.
 
Hi, we have the same problem here:
before reboot:
6: eno1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 04:42:1a:1a:ae:18 brd ff:ff:ff:ff:ff:ff
altname enp130s0f0

After reboot
6: eth4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 04:42:1a:1a:ae:18 brd ff:ff:ff:ff:ff:ff
altname enp130s0f0

The interface enp130s0f0 seems to be defined after each reboot as an other eth(x)
I will try solution with /etc/systemd/network/10-persistent-net.link but why does this change within the last updates?

Best regards,
Volker
 

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!