PVE (Proxmox VE) Multi-port Identification
| About: |
This is a post about network card (multiple ports) identification in the
PVEsystem. Through theethtoolcommand, you can easily find the corresponding location of each network port.
| Operation Steps: |
Take
Intel EXPI9402PTBLK 82571GB Network Adapteras an example
Install the ethtool command
| |
ethtoolcan be used to view network device driver parameters and hardware configuration.
Check the device name of the network card in the PVE server
| |

Where
enp1s0f0andenp1s0f1are the two network ports of the network card, corresponding toMACaddresses00:24:81:7e:ce:cband00:24:81:7e:ce:carespectively.
| Method A |
Use
ethtoolto identify the device name and corresponding network port location in thePVEsystem.
Enter the following command to find the physical network port (network port with indicator) of the first device name enp1s0f0
| |
Enter the following command to find the physical network port (network port with indicator) of the second device name enp1s0f1
| |
| Method B |
If the network card does not support the
ethtool --identifycommand (indicator) for identification, the following method can be used.
Enable the two network ports enp1s0f0 and enp1s0f1 separately
| |
Insert the network cable (Cat5e) into one of the network ports of the network card (Intel EXPI9402PTBLK 82571GB) and the other end of the network cable into another powered network port, such as a switch, router, computer, etc.
At this time, enter the command to view the network port status
| |

As shown in the figure, Link detected: yes indicates that the found network port is enp1s0f0.
On the contrary, it shows Link detected: no, indicating the network port enp1s0f1 without a cable.
| Device Location |
When directly passing a specified network port,
ethtoolcan easily find the location of the network port in thePVEsystem.
View all physical network cards and locations of the server
| |
View the location of the first network port enp1s0f0
| |
View the location of the second network port enp1s0f1
| |

As shown in the figure, the location of the first network port
enp1s0f0is01:00.0, and the location of the second network portenp1s0f1is01:00.1.
Finally, pass through the specified network card or network port in the virtual machine.

| Conclusion: |
Using
ethtoolto identify multiple network ports of a network card is really convenient.
Finally, a corresponding table can be made to facilitate future lookups.
| Physical Network Card | MAC Address | PVE Device Name | Device Location (for passthrough) | VM Name |
|---|---|---|---|---|
| 1st Port | 00:24:81:7E:CE:CB | enp1s0f0 | 01:00.0 | LAN |
| 2nd Port | 00:24:81:7E:CE:CA | enp1s0f1 | 01:00.1 | WAN |
| Reference: |
| Related: |
