VMware Cloud Community
sansaran
Contributor
Contributor
Jump to solution

virtual nic to physical nic mapping and default loadbalancing

how virtual nic of Virtual Machine is get mapped onto physical nic.

For example.

  lets assume Vswitch1 on esx host1 dedicated for Virtual machine network (port group)  and it has 6 nics bound to it ( vmnic0,vmnic1,vmnic2,vmnic3)

Load balancing policy(default) -    based on originating virtual port    ( it balances only outgoing traffic across all nic assigned to vswitch1  right?)

Esxi host1 <------- Vswitch1 (VM network) <-------- (vmnic 0 -vmnic 3)

Lets assume esxi hosting 6 virtual machines and each virtual machine has two virtual network adapters configured.  Based on going through some documents, found that when virtual machine is powered on it gets connected to availabe ports on virtual swicth. les say, i power on virtual machine in the order VM1,VM2...VM6.

   Vmname       virtual adaptor           port on virtual switch1       Physical nic mapping

     VM1             eth0,eth1                             1,2                        which physical nic mappeed to eth0,eth1 ?

      VM2            eth0,eth1                              3,4                                      ?      

      VM3            eth0,eth1                              5,6                                      ?

      VM4            eth0,eth1                              7,8                                      ?

      VM5            eth0,eth1                              9,10                                    ?

      VM6            eth0,eth1                              11,12                                  ?

since we use load balancing based on vitual port, can two virtual adapter of same VM get mapped to two physical NIC's. i mean eth0 of VM1 get mapped to VMNIC0(physical nic), eth1 of VM1 get connected VMNIC1 (physical nic).

That would be great if you could explain how Virtual nics are get mapped to physical NIC.  Is there a command or script to list Virtual NIC(of all vms hosted on esxi ) to Physical NIC mappings in detail.

      .

Tags (3)
Reply
0 Kudos
1 Solution

Accepted Solutions
rickardnobel
Champion
Champion
Jump to solution

sansaran wrote:

Is there a way to find out which virtual nic get connected to which physical NIC.

With virtual NIC, do you mean the virtual adapter inside the VMs? If so, and when using multiple VMNICs as you, there is no visibility in vCenter (for ordinary vSwitches, it can be seen with Distributed vSwitches).

However, you could use the command line tool ESXTOP in the "n" view, for the connection between virtual machines and the outgoing VMNICs.

My VMware blog: www.rickardnobel.se

View solution in original post

Reply
0 Kudos
6 Replies
weinstein5
Immortal
Immortal
Jump to solution

Welcome to the Community -  You are correct the the two virtual NICs should be assigned to two different physical NICs - the physical NICs are assigned in order as the vNICs come online so as the VM is powered on eth0 will be assigned to one physical NIC and eth1 will be assigned to different NIC -

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
sansaran
Contributor
Contributor
Jump to solution

Is there a way to find out which virtual nic get connected to which physical NIC.

Reply
0 Kudos
Virtualinfra
Commander
Commander
Jump to solution

Yes you can find out that,

Connect to vcenter or esxi host via vsphere client.

Click on configuration Tab.

go to Networking

and in the right side you will see the vSwitch and vSwitch connected to the physical Nics.

Under vSwitch you will see the port group where all the virtual Machines are connected to it.

Refer the below screen shot

Thanks & Regards Dharshan S VCP 4.0,VTSP 5.0, VCP 5.0
Reply
0 Kudos
rickardnobel
Champion
Champion
Jump to solution

sansaran wrote:

Is there a way to find out which virtual nic get connected to which physical NIC.

With virtual NIC, do you mean the virtual adapter inside the VMs? If so, and when using multiple VMNICs as you, there is no visibility in vCenter (for ordinary vSwitches, it can be seen with Distributed vSwitches).

However, you could use the command line tool ESXTOP in the "n" view, for the connection between virtual machines and the outgoing VMNICs.

My VMware blog: www.rickardnobel.se
Reply
0 Kudos
sansaran
Contributor
Contributor
Jump to solution

I meant virtual adapter inside VM. and esxtop works . Thanks

Reply
0 Kudos
ChristopheACMI
Contributor
Contributor
Jump to solution

I was looking after such a powerCLI command and I found something close. This command gives the link between physical and virtual link.

First, connect to your ESXi server (this command doesn't work trought vCenter) then type :

Get-EsxTop -CounterName NetPort | Select PortID, ClientName, TeamUplink

I am still searching for a command that show also the vswitch and the virtual adapter number relation.

Reply
0 Kudos