Link to home
Start Free TrialLog in
Avatar of piedthepiper
piedthepiper

asked on

VMware vmnic question

Could someone explain to me why vmnics have 2 mac address, they have their phsyical one but also a virtual one?

If you run esxcfg-info -n | grep -B4 'MAC Address' | grep -A5 vmnic You can see
 |----Name..................................................vmnic3 |----PCI Bus...............................................2 |----PCI Slot..............................................0 |----PCI function..........................................1 |----MAC Address...........................................aa:bb:cc:dd:ee:ff |----Virtual MAC Address...................................00:50:56:gg:hh:ii
for example.
The VMware range is 00:50:56 I get that, but why does the physical vmnic need a virtual MAC?

If any of you guys could explain this, that'd be brilliant!
Cheers
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

This is completely normal, when you have created a VMKernel Portgroup on a vSwitch, the VMKernel Portgroup will have a VMware MAC Address associated with it.

Upload a screenshot of your networking, and you will see which vmnics and vSwitches have been associated with the nics.
Avatar of piedthepiper
piedthepiper

ASKER

There is only vSwitch0 and it has only one vmkernel, as attached.

But that doesn't match any of the Virtual MAC addresses associated with the physical vmnics?
dse001.PNG
there is a VMware MAC Address associated in that screenshot.

00:50:56:7a:fa:56

but is that vmnic3 actually used anywhere ?

what vmnics are in use ? at present in your configuration connected to that vSwitch
That mac address doesnt correspond to any of the vmnics?

esxcfg-info -n | grep -B4 'MAC Address' | grep -A5 vmnic
         |----Name..................................................vmnic0
         |----PCI Bus...............................................1
         |----PCI Slot..............................................0
         |----PCI function..........................................0
         |----MAC Address...........................................00:26:b9:74:1e:c9
         |----Virtual MAC Address...................................00:50:56:54:1e:c9
--
         |----Name..................................................vmnic1
         |----PCI Bus...............................................1
         |----PCI Slot..............................................0
         |----PCI function..........................................1
         |----MAC Address...........................................00:26:b9:74:1e:cb
         |----Virtual MAC Address...................................00:50:56:54:1e:cb
--
         |----Name..................................................vmnic2
         |----PCI Bus...............................................2
         |----PCI Slot..............................................0
         |----PCI function..........................................0
         |----MAC Address...........................................00:26:b9:74:1e:cd
         |----Virtual MAC Address...................................00:50:56:54:1e:cd
--
         |----Name..................................................vmnic3
         |----PCI Bus...............................................2
         |----PCI Slot..............................................0
         |----PCI function..........................................1
         |----MAC Address...........................................00:26:b9:74:1e:cf
         |----Virtual MAC Address...................................00:50:56:54:1e:cf
--
         |----Name..................................................vmnic0
         |----PCI Bus...............................................1
         |----PCI Slot..............................................0
         |----PCI function..........................................0
         |----MAC Address...........................................00:26:b9:74:1e:c9
         |----Virtual MAC Address...................................00:50:56:54:1e:c9
--
         |----Name..................................................vmnic1
         |----PCI Bus...............................................1
         |----PCI Slot..............................................0
         |----PCI function..........................................1
         |----MAC Address...........................................00:26:b9:74:1e:cb
         |----Virtual MAC Address...................................00:50:56:54:1e:cb
--
         |----Name..................................................vmnic2
         |----PCI Bus...............................................2
         |----PCI Slot..............................................0
         |----PCI function..........................................0
         |----MAC Address...........................................00:26:b9:74:1e:cd
         |----Virtual MAC Address...................................00:50:56:54:1e:cd
--
         |----Name..................................................vmnic3
         |----PCI Bus...............................................2
         |----PCI Slot..............................................0
         |----PCI function..........................................1
         |----MAC Address...........................................00:26:b9:74:1e:cf
         |----Virtual MAC Address...................................00:50:56:54:1e:cf

Only vmnics0/1 are is use
dse001-1.PNG
Virtual Mac Address is just a channel of communication between Host & virtual machine.

Physical NIC in the host is acting as a "bridge" or "passthrough" between the virtual switch and the physical network
there is an algorithm which allocates a virtual mac address to all physical network uplinks.
OK so basically each vmnic gets a virtual mac address, so the vms/vswitch/esxi base their communication off that virtual mac and not the actual physical mac?

If thats correct is this to do with failover, since all the vmnic does is act as a bridge, a virtual mac can remain the same regardless of the underlying psychical nic card?

Or am I getting the wrong idea? I am trying to understand WHY all the physical uplinks get a virtual mac address
nothing to do with failover, it's how ESXi has been designed.

Physical MAC connects to the outside world for communication, and then traffic entering the physical nic (MAC) address, is handled internally via virtual mac address, and vSwitches, to vNics in VMs.

Each virtual mac address is defined and calculated based on it's physical mac counterpart.

so it's almost like

physical nic (mac address) (vmnic) ---> virtual mac address ---> vSwitch ----> Virtual Machine Portgroup ----> vNic in VM (which has a different Mac Address)
Right ok

SO basically the virtual mac adddress assigned to the vmnic :

  |----Name..................................................vmnic3
         |----PCI Bus...............................................2
         |----PCI Slot..............................................0
         |----PCI function..........................................1
         |----MAC Address...........................................00:26:b9:74:1e:cf
         |----Virtual MAC Address...................................00:50:56:54:1e:cf

Such as the one above, for all internal traffic the Virtual MAC is used, and when traffic needs to leave the host, traffic is sent to the virtual MAC of  the vminc
  ----Virtual MAC Address...................................00:50:56:54:1e:cf and then translated to physical  ----MAC Address...........................................00:26:b9:74:1e:cf.

If the traffic ends up at another host, the reverse process happens so it can get to a VM.

If the traffic doesn't need to leave the host then the virtual mac address of the phsyical nic would never be referenced.

Does that sound about right?
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
sorted
answered