VMware Cloud Community
THP
Contributor
Contributor

How to discover which pNIC a VM is using?

Wondering is there is a way to find out which NIC a VM is using.

The scenario is that I have a particular blade host where some VMs seem unable to talk but others are fine.

There is no physical fault being reported and because of the chassis config I cannot use CDP to discover ports.

Found what appeared to the the answer on a blog but ESXTOP only tells me that a vm is using 'All (4)'.

I have 4 nics teamed for an old school vSwitch and all the VMs are currenlty using a single port group on that vswitch.

The load balancing is currently set to IP Hash although our network team have created some strange combination of aggregated & non-aggregated trunking at the physical switch.

Any suggestions welcomed Smiley Happy

0 Kudos
7 Replies
rickardnobel
Champion
Champion

Wondering is there is a way to find out which NIC a VM is using.

When you are using the IP Hash load balancing there is no such thing as a certain VMNIC for at certain VM, as the outgoing traffic for all VMs are able to use all available physical NICs. It will use a hash based on the source and destination IP addresses for each frame to chose a NIC for this, so one of your VMs could be using several physical VMNICs at the same time if communicating with different IP hosts.

The load balancing is currently set to IP Hash although our network team have created some strange combination of aggregated & non-aggregated trunking at the physical switch.

I would say that the problem is most likely this. If you have set the load balancing policy to IP Hash then the physical switch MUST really be configured or it will not work. If they have done as you describe a "strange combination" then it could mean that depending on what VMNIC your traffic leaves the vSwitch and hits the physical switch it could work or not.

So begin with looking at this closely and ask the network team exactly how they have configured all four ports on the switch.

My VMware blog: www.rickardnobel.se
THP
Contributor
Contributor

I've set it back to the standard Virtual Port ID method for now and while the bahaviour is still falky I can see what is connected to what nic and can isolate a couple of NICs which may well be misconfigured - I'll follow that up with the network boys.

Thanks

0 Kudos
ab_lal
Enthusiast
Enthusiast

Also can you login to vcenter , go to networking - properties of VM port group and verify the speed of all network adapters used.

0 Kudos
rickardnobel
Champion
Champion

I've set it back to the standard Virtual Port ID method for now and while the bahaviour is still falky I can see what is connected to what nic and can isolate a couple of NICs which may well be misconfigured - I'll follow that up with the network boys.

When you have the Port ID method you should make sure that there is no Link Aggregation configured on the switch side, a.k.a. Etherchannel on Cisco. There should just be the correct VLAN config, a.k.a. trunk settings on Cisco. (Other names on HP Procurve for example.)

My VMware blog: www.rickardnobel.se
0 Kudos
AntonVZhbankov
Immortal
Immortal

>Wondering is there is a way to find out which NIC a VM is using.

>The load balancing is currently set to IP Hash

All. Depending on where exactly packet goes it will transmitted on different pNICs.


---

MCITP: SA+VA, VCP 3/4, VMware vExpert

http://blog.vadmin.ru

EMCCAe, HPE ASE, MCITP: SA+VA, VCP 3/4/5, VMware vExpert XO (14 stars)
VMUG Russia Leader
http://t.me/beerpanda
0 Kudos
Borja_Mari
Virtuoso
Virtuoso

Hi,

you can try this:

First, get the vm's mac address (check the vcard network from the vm's properties) and then check the physical switch where your blade is connected to get what physical switch ports "see" the mac address Smiley Wink



Regards/Saludos,
Pablo

Please consider awarding

any helpful or corrrect answer. Thanks!! -

Por favor considera premiar

cualquier respuesta útil o correcta. ¡¡Muchas gracias!!

Virtually noob blog

------------------------------------------------------------------------------------------------- PLEASE CONSIDER AWARDING any HELPFUL or CORRECT reply. Thanks!! Por favor CONSIDERA PREMIAR cualquier respuesta ÚTIL o CORRECTA . ¡¡Muchas gracias!! VCP3, VCP4, VCP5-DCV (VCP550), vExpert 2010, 2014 BLOG: http://communities.vmware.com/blogs/VirtuallyAnITNoob
0 Kudos
rickardnobel
Champion
Champion

By the way, if you are not using IP Hash then there is an easy way to see which pNIC a VM is using from inside the host, and that is through the command line "esxtop".

Start it, press "n" to go the network tab and you should be able to see quite nicely which VM is attached to which pNIC (VMNIC).

My VMware blog: www.rickardnobel.se
0 Kudos