--- type: "note" created: "2024-04-01T21:06:55.003Z" updated: "2024-04-01T21:30:11.439Z" --- # MAC Address - [choosing-your-own-mac-address](https://blog.yaakov.online/choosing-your-own-mac-address/) #### Locally Administered Addresses are defined by one particular bit out of the 6 bytes - specifically, the second-least-significant bit of the first octet. This means that you can choose any MAC addresses that you want, as long as it matches one of: - X2‑XX-XX-XX-XX-XX - X6‑XX-XX-XX-XX-XX - XA‑XX-XX-XX-XX-XX - XE‑XX-XX-XX-XX-XX ### Regex Simple - [0-9A-Fa-f]2:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2} - [0-9A-Fa-f]6:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2} - [0-9A-Fa-f]A:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2} - [0-9A-Fa-f]E:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2} ### Regex Complex - ([0-9A-Fa-f]{1}2[:-])([0-9A-Fa-f]{2}[:-]){4}([0-9A-Fa-f]{2}) - ([0-9A-Fa-f]{1}6[:-])([0-9A-Fa-f]{2}[:-]){4}([0-9A-Fa-f]{2}) - ([0-9A-Fa-f]{1}A[:-])([0-9A-Fa-f]{2}[:-]){4}([0-9A-Fa-f]{2}) - ([0-9A-Fa-f]{1}E[:-])([0-9A-Fa-f]{2}[:-]){4}([0-9A-Fa-f]{2}) #### If you want to know why you can use 2, 6, A, and E, but not 3, 7, B, or F, that's because the latter ones are reserved for Multicast whereas the former are Unicast.