I need a set of MAC/Ethernet addresses that I do not have to worry about collisions with, analogous to 192.168.x.x
: addresses that will NEVER be assigned to real hardware.
-
Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance.– HopelessN00bFeb 17, 2016 at 0:18
-
I have to disagree strenuously with your rather pointless comment. This is a very useful question, one which had not been asked before. If anything, I would claim that your comment adds nothing to the discussion.– Mark GerolimatosFeb 19, 2016 at 6:22
-
My comment is auto-generated by my voting to close your question. It is the reason I voted to close your question. Your question, or at least the way you asked it, indicates to me that you lack a fundamental understanding of what a MAC address is. Additionally, since I have software that I can use to specify an arbitrary MAC address of my choosing, there is literally no MAC address or MAC address block you can use to guarantee there will never be a duplicate MAC address. But sure, feel free to object as strenuously as you want. I promise I won't let it bother me.– HopelessN00bFeb 19, 2016 at 7:19
1 Answer
You want to set the universal/local bit in the MAC address to 1. This is the second-least significant bit of the first byte of the address.
All MAC addresses physically assigned to real hardware will have this bit set to 0. Locally assigned addresses are supposed to have this bit set to 1 (though this requirement is often ignored).
Thus, any address beginning with x2, x6, xA, or xE will work.
-
This answer is entirely correct, but I would have mentioned a few additional details. I would have mentioned why the least significant bit has to be zero to avoid any confusion as to why there are only four possibilities for that nibble rather than eight. Additionally it might also be relevant that virtual network interfaces (and in certain corner cases also some physical interfaces) may come up with an auto-generated MAC address with the UL bit set to 1.– kasperdFeb 17, 2016 at 16:37