Anyway to determine which NIC is in use?

Dec 8, 2022
51
3
8
Looking for some guidance. I'm about to setup a new TrueNAS VM and I'd like to directly pass my second 10Gb NIC to it. My board has two total and as far as I can tell they are in different IOMMU groups so should be able to be passed separate from each other. The first one is currently in use as the main connection for the server and basically all my VMs.

I know I can see the name of the interface that's currently in use. My question is, is there a way to see which of the two, based on the IOMMU grouping, that is being used?

I believe worse case I could pass one through, and if my connection to the server breaks, I can just restart the whole server as long as the VM doesn't autostart back up. I would ideally like to avoid breaking things however if possible.

Any tips would be appreciated. Thank you.
 
lspci -vvn -s 0n:00.n | grep Serial

should display the mac address of the adapter(s) so you should then be able to cross reference from there
 
lspci -vvn -s 0n:00.n | grep Serial

should display the mac address of the adapter(s) so you should then be able to cross reference from there

Do I need to alter this command at all? I tried it as is and got:

lspci: -s: Invalid bus number

EDIT: Nevermind, I figured out what I was doing wrong and this definitely outputs exactly what you said it would. Thank you!! I will cross reference the MAC addresses from here
 
Last edited:
Turns out they both output the same serial number, so sadly a dead end on that one. But I learned how to manipulate with lspci better than before, so definitely a net positive. Thank you.
 
Okay, got the solution. Sharing here for anyone in the future.

lshw -class network -businfo

This gives me the name it goes by and the bus ID and from there I can easily reference what I need.
 
  • Like
Reactions: Byrd and Dunuin

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!