VMware Communities
admin
Immortal
Immortal

How does VMware Player decide on MAC addresses?

Hey All,

I am working on a project that involves VMware Player.  I need to understand if there is a predicatable method Player uses to decide on the MAC

address for the VM?

I created and deleted a VM a few times, and it seems like it keeps choosing the same MAC (I removed the .VMX files from the disk too).

I have looked at the documentation and haven't found anything yet.  I am guessing that Player uses the same method as Workstation or Server.

I found this article for ESX, but I need to find out if Player uses the same method:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=219

How VMware ESX Server Generates MAC Addresses

Each virtual network adapter in a virtual machine gets its own unique  MAC address. ESX Server attempts to ensure that the network adapters  for each virtual machine that are on the same subnet have unique MAC  addresses. The algorithm used by ESX Server puts a limit on how many  virtual machines can be running and suspended at once on a given  machine. It also does not handle all cases when virtual machines on  distinct physical machines share a subnet.

A MAC address is a six-byte number. Each network adapter manufacturer  gets a unique three-byte prefix called an OUI - organizationally unique  identifier - that it can use to generate unique MAC addresses. VMware  has two OUIs - one for automatically generated MAC addresses and one for  manually set addresses.

The VMware OUI for automatically generated MAC addresses is 00:05:69.  Thus the first three bytes of the MAC address that is automatically  generated for each virtual network adapter have this value. ESX Server  then uses a MAC address generation algorithm to produce the other three  bytes. The algorithm guarantees unique MAC addresses within a machine  and attempts to provide unique MAC addresses between ESX Server  machines.

The algorithm that ESX Server uses is the following:

When the algorithm generates the last 24 bits of the MAC address, the  first 16 bits are set to the same values as the last 16 bits of the  console operating system's primary IP address.

The final eight bits of the MAC address are set to a hash value based on the name of the virtual machine's configuration file.

Thanks,
Drew

0 Kudos
2 Replies
FranckRookie
Leadership
Leadership

Hi Andrew,

On my Player, I observe the following:

  • the first three bytes of the MAC addresses are VMware OUI used for Player : 00:0c:29
  • the last three bytes for the first network card are the same as the last three bytes of the VM's UUID
  • the last three bytes for the next virtual cards have on offset of 10 (decimal) from the previous card : last byte card N = last byte card 1 + (N-1)x10dec

I don't have much information about how UUIDs are generated, but you could have a look at the following thread:

If the generator uses hardware information from the host and complete name of the vmx file of the VM, this could explain why when you recreate your VM on the same machine with same name and stored in the same folder, you obtain the same MAC address. But this doesn't sound dangerous as you can't have two VMs with exactly the same VMX files running on the same hardware.

Good luck.

Regards

Franck

0 Kudos
warriorfullight
Enthusiast
Enthusiast

Do MAC addresses generate the same on other software? I know it is automatically generated, but I am just curious. It might be a sort of combined codes of the software, product, keycodes, etc... http://imagicon.info/cat/5-59/1.gif

0 Kudos