Skip to content

Instantly share code, notes, and snippets.

@fragtion
Last active February 15, 2024 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fragtion/74497d279d05bb47dba9f7be83c90c43 to your computer and use it in GitHub Desktop.
Save fragtion/74497d279d05bb47dba9f7be83c90c43 to your computer and use it in GitHub Desktop.
MAC Address troubleshooting (unicast, broadcast, multicast)
To validate that any MAC address is unicast, simply confirm that the second character of the mac address (ie, the second character of the first octet, specifically speaking) is one of 0,2,4,8,A,C,E
for example
02:00:00:00:00
04:00:00:00:00
0A:00:00:00:00
0E:00:00:00:00
E2:00:00:00:00
F2:00:00:00:00
F2:00:00:00:00
those are all unicast
while
00:00:00:00:00
01:00:00:00:00
03:00:00:00:00
05:00:00:00:00
07:00:00:00:00
E1:00:00:00:00
F0:00:00:00:00
F9:00:00:00:00
FB:00:00:00:00
these are not unicast
References:
https://www.youtube.com/watch?app=desktop&v=1HQLst2mF50
https://github.com/proxmox/pve-common/blob/master/src/PVE/JSONSchema.pm
https://www.rapidtables.com/convert/number/hex-to-binary.html?x=00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment