In most network deployments, generated MAC addresses are a good approach. However, you might need to set a static MAC address for a virtual machine adapter with unique value.

The following cases show when you might set a static MAC address:

  • Virtual machine adapters on different physical hosts share the same subnet and are assigned the same MAC address, causing a conflict.
  • Ensure that a virtual machine adapter always has the same MAC address.

By default, VMware uses the Organizationally Unique Identifier (OUI) 00:50:56 for manually generated addresses, but all unique manually generated addresses are supported.

Note: Make sure that no other non-VMware devices use addresses assigned to VMware components. For example, you might have physical servers in the same subnet, which use 11:11:11:11:11:11, 22:22:22:22:22:22 as static MAC addresses. The physical servers do not belong to the vCenter Server inventory, and vCenter Server is not able to check for address collision.

VMware OUI in Static MAC Addresses

By default, static MAC addresses have the VMware Organizationally Unique Identifier (OUI) as the prefix. However, the range of free address provided by the VMware OUI is restricted.

If you decide to use the VMware OUI, part of the range is reserved for use by vCenter Server, host physical NICs, virtual NICs, and for future use.

You can set a static MAC address that contains the VMware OUI prefix in compliance with the following format:

00:50:56:XX:YY:ZZ

where XX is a valid hexadecimal number between 00 and 3F, and YY and ZZ are valid hexadecimal numbers between 00 and FF. To avoid conflict with MAC addresses that are generated by vCenter Server or are assigned to VMkernel adapters for infrastructure traffic, the value for XX must not be greater than 3F.

The maximum value for a manually generated MAC address is as follows.

00:50:56:3F:FF:FF

To avoid conflicts between the generated MAC addresses and the manually assigned ones, select a unique value for XX:YY:ZZ from your hard-coded addresses.

Assign a Static MAC Address

You can assign static MAC addresses to the virtual NIC of a powered off virtual machine by using the vSphere Client.

Procedure

  1. Locate the virtual machine in the vSphere Client.
    1. Select a data center, folder, cluster, resource pool, or host and click the VMs tab.
    2. Click Virtual Machines and click the virtual machine from the list.
  2. Power off the virtual machine.
  3. From the Actions menu, select Edit Settings.
  4. Select the Virtual Hardware tab in the dialog box displaying the settings.
  5. Expand the network adapter section.
  6. Under MAC Address, select Manual from the drop-down menu.
  7. Type the static MAC address, and click OK.
  8. Power on the virtual machine.

Assign a Static MAC Address in the Virtual Machine Configuration File

To set a static MAC address for a virtual machine, you can edit the configuration file of the virtual machine by using the vSphere Client.

Procedure

  1. Locate the virtual machine in the vSphere Client.
    1. Select a data center, folder, cluster, resource pool, or host and click the VMs tab.
    2. Click Virtual Machines and click the virtual machine from the list.
  2. Power off the virtual machine.
  3. From the Actions drop-down menu, select Edit Settings.
  4. Select the VM Options tab and expand Advanced.
  5. Click Edit Configuration.
  6. To assign a static MAC address, add or edit parameters as required.
    Parameter Value
    ethernetX.addressType static
    ethernetX.address MAC_address_of_the_virtual_NIC

    X next to ethernet stands for the sequence number of the virtual NIC in the virtual machine.

    For example, 0 in ethernet0 represents the settings of the first virtual NIC device added to the virtual machine.
  7. Click OK.
  8. Power on the virtual machine.