Configure MAC prefix via webUI does not allow xx:xx:xx:Y format

thijz

New Member
Sep 7, 2023
7
1
3
HI,
I'm trying to set the MAC prefix for our first Prox cluster.
According to the documentation this can be done via the GUI (Datacenter > Options > MAC prefix) and indeed that works just fine, however ...

The GUI only allows me to enter a value in xx:xx:xx: format
According to this document (https://pve.proxmox.com/pve-docs/datacenter.cfg.5.html) you can go further and use xx:xx:xx:x

This comes in handy if you want to make sure that there is no overlap between different clusters :
xx:xx:xx:0 = cluster 1
xx:xx:xx:1 = cluster 2
etc

In fact, this way of working is even encouraged in this document : https://pve.proxmox.com/wiki/Manual:_datacenter.cfg

If i modify the /etc/pve/datacenter.cfg file directly and add 'mac_prefix: BC:24:11:0' then this info is immediately available on all nodes, BUT ... the GUI does not show this value : it changes to 'none' and if i add a new network interface to a VM if uses random MAC's, not the BC:24:11:0 prefix ... :-(

This looks like a bug to me (?) or the documentation is incorrect

version info :
proxmox-ve: 7.4-1 (running kernel: 5.15.131-2-pve)
pve-manager: 7.4-17 (running version: 7.4-17/513c62be)
pve-kernel-5.15: 7.4-9
 
Hi LnxBil,
That doesnt work either : is soon as i go past the 6 first characters (xx:xx:xx) the border around the input field turns 'red', indicating that this is not a valid value
1710164003345.png
I have tried many different formats but it looks like you simply cant specify a prefix that is more than 6 characters
 
Trying to think of something ....... (though you've probably tried a bunch!)
What happens if you modify the /etc/pve/datacenter.cfg file directly and add 'mac_prefix: BC:24:11:00' or 'mac_prefix: BC:24:11:00:' or maybe 'mac_prefix: BC:24:11:0:'
 
Last edited:
i tried all the suggestions, but none of these worked ..
i ended up just using BC:24:11: for cluster 1 and BC:24:12: for the second, and so on
 
  • Like
Reactions: gfngfn256
I read documentation and view ( https://pve.proxmox.com/wiki/Manual:_datacenter.cfg#_options )
-----
mac_prefix: <string> (default =BC:24:11)
Prefix for the auto-generated MAC addresses of virtual guests. The default BC:24:11 is the Organizationally Unique Identifier (OUI) assigned by the IEEE to Proxmox Server Solutions GmbH for a MAC Address Block Large (MA-L). You’re allowed to use this in local networks, i.e., those not directly reachable by the public (e.g., in a LAN or NAT/Masquerading).
Note that when you run multiple cluster that (partially) share the networks of their virtual guests, it’s highly recommended that you extend the default MAC prefix, or generate a custom (valid) one, to reduce the chance of MAC collisions.

For example, add a separate extra hexadecimal to the Proxmox OUI for each cluster, like BC:24:11:0 for the first, BC:24:11:1 for the second, and so on. Alternatively, you can also separate the networks of the guests logically, e.g., by using VLANs.
+ For publicly accessible guests it’s recommended that you get your own OUI from the IEEE registered or coordinate with your, or your hosting providers, network admins.

BUT: GUI Proxmox Virtual Environment 8.3.2 still not allow this configuration.

I view suggestion for fix https://lore.proxmox.com/pve-devel/D5GRPOA4FFI0.2T27OHVSUO2WX@proxmox.com/T/

and changes on src / PVE / DataCenterConfig.pm

Can anybody check and fix ?


VMware use similar own OUI+vCenter prefix

MAC Address Format
According to the VMware OUI allocation scheme, a MAC address has the format 00:50:56:XX:YY:ZZ where 00:50:56 represents the VMware OUI, XX is calculated as (128 + vCenter Server ID (128 deca or 80hex), and YY and ZZ are random two-digit hexadecimal numbers.
The addresses created through the VMware OUI allocation are in the range 00:50:56:80:YY:ZZ - 00:50:56:BF:YY:ZZ.

https://techdocs.broadcom.com/us/en...address-generation/vmware-oui-allocation.html
 
Last edited:
  • Like
Reactions: gfngfn256
Hi there Petr !

To my point of view, it is OK. MAC address is randomly generated. Thus collision probability is : 1 / ((2^24) - number ov VMs) I think. The risk is acceptable for me.

Maybe you have an installation with plenty of VMs and this is not acceptable. Thus I see at last 2 possibilities :
- Set de MAC address yourself (for example based on the VMID and VLAN ID or the IP) - if you have plenty of VMs, you certainly use automation script and this will not be a problem.
- Patch the code : Proxmox Virtual Environment is a free software, it is up to you to customize it if the function is not officially implemented.

BR
Gautier.