Files
notes-infineon/_-Review/mac-address.md
2024-06-03 07:04:29 -07:00

33 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
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:
- X2XX-XX-XX-XX-XX
- X6XX-XX-XX-XX-XX
- XAXX-XX-XX-XX-XX
- XEXX-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.