Skip to content

Instantly share code, notes, and snippets.

@fragtion
Last active February 15, 2024 20:52
Show Gist options
  • Select an option

  • Save fragtion/74497d279d05bb47dba9f7be83c90c43 to your computer and use it in GitHub Desktop.

Select an option

Save fragtion/74497d279d05bb47dba9f7be83c90c43 to your computer and use it in GitHub Desktop.

Revisions

  1. fragtion revised this gist Feb 15, 2024. 1 changed file with 22 additions and 0 deletions.
    22 changes: 22 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,27 @@
    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
  2. fragtion created this gist Feb 15, 2024.
    7 changes: 7 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    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


    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