Configuring the MAC address prefix

By default, all virtual network ports in the compute cluster that require MAC addresses, such as virtual machines, routers, and DHCP servers, use the fa:16:3e MAC address prefix. This prefix defines the starting three octets of the MAC addresses assigned to these interfaces, while the last three octets are unique for each interface.

Using the default prefix may cause duplicate MAC addresses if another cluster in the same datacenter or L2 network also uses it. To avoid conflicts, you can configure a unique MAC address prefix for the compute cluster.

Limitations

  • Changing the base MAC prefix applies only to newly generated MAC addresses. Existing VMs and ports will retain their current MACs.

To change the default MAC address prefix

Admin panel

  1. Go to the Compute > Settings > MAC address prefix screen.
  2. Click Generate to automatically generate a unique prefix or specify two or three octets manually. For example, fa:16 or fa:16:33.
  3. Click Save to save and apply the changes.

Command-line interface

Use the following command:

vinfra service compute set --mac-prefix <mac_prefix>

For example, to change the MAC address prefix to fa:16:33, specify it in the format xx:xx:xx:xx:xx:xx as follows:

# vinfra service compute set --mac-prefix fa:16:33:00:00:00