Change NIC

gschiltz

Active Member
Aug 31, 2014
13
1
43
The NIC on my HP server has two ports, and one has failed. I'm sure it's a hardware problem, so I will get a new 4-port NIC for it, and probably disable the existing ports in the BIOS setup. The /etc/network/interfaces has a warning (from the Proxmox install) to not modify the file manually (unless I "know what I'm doing"), but to use the web interface. Should I expect Proxmox to modify the interfaces file after I install the new card, or should I ignore the warnings in the file and modify it as I would on a normal debian install? I installed Proxmox on a virtual machine (with VMware on my laptop) to quickly try this, and Proxmox didn't modify the interfaces file. Of course, if necessary, I could re-install Proxmox after modifying the hardware, but I'd prefer not to.
 
I did all network configuration by manually editing /etc/network/interfaces even after Proxmox install. It parsed file correctly.
 
If you change the nic, nothing in the config file will change, but beware that the name the nic will get will be different from the previous ones, since they have a different mac address and so will be seen as "new ones" (i.e eth4 and not eth0).
If you can disable the old ones, and you delete the file
/etc/udev/rules.d/70-persistent-net.rules
at reboot the eth0 name will be assigned to the first (from the hardware point of view) interface and so on.
If you log from local console, with 'ifconfig -a' you will be able to see the interfaces and their name
 
  • Like
Reactions: Ivan Cacija
/etc/udev/rules.d/70-persistent-net.rules no longer exists
The current version of proxmox is debian stretch based - changing a NIC unfortunately is way more difficult that it should be
You must have access to local terminal before proceeding
It took me 4 hours of looking around to finally find and fix the issue

Once you have changed your NIC, the new name it will get assigned can be fairly arbitrary. Before proceeding with change, please make note of current NIC names and the mac address (esp if you have multiple cards)
ls /sys/class/net will return something like enp1s0 enp2s0 enp3s0 etc
change the card and reboot, get new names from ls /sys/class/net
Now go into /etc/network/interfaces and edit to map the new names against each instance

For what it is worth, my original LAN port which was enp0s0 had changed to enp3s0 - all I had done was add a new NIC for an extra WAN connection

I have no idea why the networking stack on debian stretch is so badly broken - wish I knew this earlier before I settled on proxmox
 
  • Like
Reactions: kevinyu211
/
For what it is worth, my original LAN port which was enp0s0 had changed to enp3s0 - all I had done was add a new NIC for an extra WAN connection

I have no idea why the networking stack on debian stretch is so badly broken - wish I knew this earlier before I settled on proxmox
Hi,
this is not only debian related - other distributions use the same naming...

And it's quite easy - you can see with lspci who your nis is named:
Code:
lspci
...
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection I219-V (rev 21)
...
04:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a)


ifconfig
enp0s31f6 Link encap:Ethernet  Hardware Adresse c8:5b:...

# because hex 1f is 31:
echo "ibase=16; 1F" | bc
31
if you have more than one port, you see something like enp5s0f0

If you change a nic (like dual-port with an new dual-port) on the same pci, the name will be the same.

Udo
 
  • Like
Reactions: brucexx
/etc/udev/rules.d/70-persistent-net.rules no longer exists
The current version of proxmox is debian stretch based - changing a NIC unfortunately is way more difficult that it should be
You must have access to local terminal before proceeding
It took me 4 hours of looking around to finally find and fix the issue

Once you have changed your NIC, the new name it will get assigned can be fairly arbitrary. Before proceeding with change, please make note of current NIC names and the mac address (esp if you have multiple cards)
ls /sys/class/net will return something like enp1s0 enp2s0 enp3s0 etc
change the card and reboot, get new names from ls /sys/class/net
Now go into /etc/network/interfaces and edit to map the new names against each instance

For what it is worth, my original LAN port which was enp0s0 had changed to enp3s0 - all I had done was add a new NIC for an extra WAN connection

I have no idea why the networking stack on debian stretch is so badly broken - wish I knew this earlier before I settled on proxmox

Thanks for your advice. This is exactly what I am looking for. I resolved my issue by following your guide, and it indeed works!!!
 
Hi,
this is not only debian related - other distributions use the same naming...

And it's quite easy - you can see with lspci who your nis is named:
Code:
lspci
...
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection I219-V (rev 21)
...
04:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a)


ifconfig
enp0s31f6 Link encap:Ethernet  Hardware Adresse c8:5b:...

# because hex 1f is 31:
echo "ibase=16; 1F" | bc
31
if you have more than one port, you see something like enp5s0f0

If you change a nic (like dual-port with an new dual-port) on the same pci, the name will be the same.

Udo
Hello,

I'm starting out now and noticed that you said if you know earlier you would have not settled at promox. May I ask if you could choose which hypervisor you would start over again?

I hope to hear from you

Thank you.
 

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!