dingding
Enthusiast
Enthusiast

how to identify Physical NIC

my ESX is IBM system x3850 with 4 physical NICs, ther are named by VMware as vmnic0 to vmnic3. but how can i identify which PCI slot vmnic# located? is there any command can make the physical nic beacon so i can easily locate the physical nic?

---- Idleness is not doing nothing. Idleness is being free to do anything.
0 Kudos
10 Replies
admin
Immortal
Immortal

esxcfg-nics -l will give you the Pci bus address of each of those nics if that helps.

0 Kudos
Monoman
Enthusiast
Enthusiast

esxcfg-nics -l will let you know the status of the NICs. Plug one in and let it connect to the switch. Run esxcfg-nics -l and see which NIC has the link "up".

I usually start out with just 1 NIC connected so know with complete certainty which NIC is in use. I then add and configure 1 NIC at a time. This may add a few minutes to the setup time but to me it is worth it.

When we recently built 5 new servers, we used that process for the first server and just hooked the remaining 4 up the same way.

jonnyrocker
Enthusiast
Enthusiast

From what i can find you have no possibility to do this natively except of knowing the pci address of the cards and do the command listed before.

I would check the server documentation looking after in which order the server counts its pci adapters.

Jr

0 Kudos
VirtualKenneth
Virtuoso
Virtuoso

Correct, ESX2 had a tool that could flash the NIC light to identify it (I thought this was based on NIC traffic created) but ESX3 hasn't got something like that.

0 Kudos
dingding
Enthusiast
Enthusiast

yes, i just use the same method as you desribed, unplug one cable each time, use esxcfg-nics -l to see what vmnic# is down, record the vnic to pnic mapping, but the best time to use this method is at the initial installation and configuration. since i have not do this before customer's system turn into production, so...;

---- Idleness is not doing nothing. Idleness is being free to do anything.
0 Kudos
dingding
Enthusiast
Enthusiast

since i'm not familiar with the hardware address of ibm system x server.

i find the pci address from esxcfg-nics output:

01:01.00

01:01.01

15:00.00

1a:00.00

how can i mapped this pci address with physical slot?

---- Idleness is not doing nothing. Idleness is being free to do anything.
0 Kudos
ORRuss
Enthusiast
Enthusiast

Your server documentation should show you which slots are on which bus. If I'm not mistaken, the addresses on those busses are allocated in BIOS at boot, so you'll have to use the methods mentioned above to find the actual one-to-one mapping.

I didn't know about that 2.x feature. That would be cool. 3.2 maybe?

0 Kudos
lettech
Enthusiast
Enthusiast

Under esx 2.x you could use the command: "Ping -f vmnicX or IP of desired NIC (then space then) any destination IP"

This would send a ping flood to the network port so you can identify it. Haven't tried on ESX 3.

0 Kudos
Texiwill
Leadership
Leadership

Hello,

There are a few ways to determine which NIC port maps to which PCI Id.

Method one. Cable Method:

Have one person monitoring the VI Client in Network Configuration mode and one at a time pull the NIC cable from the back of the machine. When that NIC shows unconfigured in VI Client then you write it down and reconnect. Do the same for all other cables. You will find that you can make a map for all that type of hardware that will apply to all of the like type so you only need to do this once per hardware type. You will notice a trend of how the devices are read: left to right bottom to top or visa versa.

Method two. Flood Method:

One person uses ping to flood a specific NIC. First you will need to make sure there is only ONE vmnic per vSwitch, then ping a machine on the vSwitch. YOu will have another person watching for the activity on the back of the box.

Continue until you have mapped all the devices.

Either method should only be performed on test machines and most likely when the machines are first installed of that type.

Create a book/internal documentation of the mappings you use.

Outside of this, I am not sure there is a good way to Map NIC Port to PCI Device. There are shortcuts you can take....

HP Hardware for example is: AMD -> right to left top to bottom

Intel -> left to right bottom to top.

Unfortunately, even so they may change this from generation to generation. This was true as of the generation 4 servers. I think it is still the same.

Perhaps we should start a thread on the NIC Mappings by device?

Best regards,

Edward

--
Edward L. Haletky
vExpert XIV: 2009-2022,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
helodriver
Contributor
Contributor

Hi

if you have physical access to the box, couldn't you just use ethtool?

the lights will flash on the specific NIC allowing you (or others) to easily & quickly identify each nic without having to plug/unplug anything.

e.g: ethtool -p vmnic0

( -p initiates adapter-specific action intended to enable an operator to easily identify the adapter by sight. typically this involves blinking one or more LEDs on the specific ethernet port.

N Length of time to perform phys-id, in seconds.)

had this problem trying to diagnose the server remotely with some assistance at other end, tried using the esxcfg-nics method getting the 'help" to plug into each port respectively, but reception was bad, & help was worse....

dug up the ethtool command (I only have mediocre unix skills) & made my life so much easier

hope this helps

0 Kudos