-2

First of, a little context as to why I ask this question: I'm currently researching how I can get more "anonymous" online, not because I'm doing anything I need to hide, but simply because I value my private life. And privacy online is becoming less of a standard, than I would like it to be.

Now, with that out of the way; I'm currently looking into writing my own "MAC Address randomizer script", to spoof my MAC address upon reboot.

Now I started wondering, what would happen if two computers would access the same local network, with the same MAC Address? I started reading round on Google, and without getting into any details, people clearly stated it would be a mess.

So, how would one avoid this? As I see it (I might be wrong), if I randomize my MAC address, there should be a chance my computer could get the same MAC address as another computer on the network? The chance might be small in general, but would get proportionally bigger on large networks, like on universities for example.

I can't really think of a way to resolve this though.

Do you guys have any experience with this?

  • MAC addresses are not unique anyway. Modern operating systems already have MAC spoofing built-in. – Daniel B Feb 16 at 17:17
  • 4
    MAC addresses don't pass network boundaries anyway. – Tetsujin Feb 16 at 17:17
  • 3
    Literally, your MAC address is stripped by any router it passes through - it never propagates to the outside world. – Tetsujin Feb 16 at 17:32
  • 1
    I'm voting to close this question as off-topic because it is only based on the misunderstanding by the poster of basic networking concepts. – harrymc Feb 16 at 18:17
  • 2
    What's the point? What could the coffee shop do with that info? All you need do is get into a VPN (extremely recommended in a coffee shop) and they won't even know what you are doing. They will only know that you visited the cafe, but they know that anyway... – harrymc Feb 16 at 18:23
2

First, note that one address bit indicates whether the address is "globally assigned" (prefixed with the manufacturer's OUI) or "locally assigned" (decided by the host itself). So if your address randomizer correctly uses only the locally-assigned range, then it cannot possibly conflict with manufacturer-assigned global addresses, because they'll always differ in that single bit.

Second, MAC addresses are only significant in the same L2 domain (i.e. the same Ethernet/Wi-Fi network), and most large networks are actually segmented into smaller subnets joined together by routers. This means that collisions only matter between devices in the same subnet – not between all devices in the whole university.

What if everyone in your L2 network uses an address randomizer and sets a "locally assigned" address? There are 246 unique "locally-administered" MAC addresses. This gives 70,368,744,177,664 possibilities. If I understand this formula correctly, you need at least 106 devices in a single L2 network before the probability of collision becomes significant. (And I would be surprised if you had more than 5,000 devices in a single shared ethernet.)


(You get a nearly-100% guarantee of uniqueness by buying own OUI prefix from IEEE; a 36-bit "MA-S" prefix costs $730 one-time and gives you exclusive ownership of 212 MAC addresses. Of course, the problem here is that the prefix will be static and easily traceable to you so it completely defeats the point of the whole exercise.)

  • Alright, so if I understand this correctly, that means if I set a completely random MAC address (avoiding the OUI), I should be fine, because most other devices will have the OUI as the first 3 hexadecimal groups? – LeeSwaggers Feb 16 at 18:43
  • @LeeSwaggers: If "completely random" means using the locally-administered range, then yes – your address will have bit 0x02 set in the first byte, while factory-assigned addresses with OUIs will always have it unset. That said, beware that some third-party "MAC randomizer" tools don't bother with this and freely step over the global address range. – grawity Feb 18 at 7:03
0

MAC addresses are 48 bits long, so there are 281,474,976,710,656 possible MAC addresses.

In a network consisting of 1,000,000 (one million) devices, the chance of random MAC address collision is 0,0000000036% (about one in 280,000,000).

That's 1000 times less probable than being struck by a lightning.

  • One bit is fixed to 0 (indicating unicast vs multicast address), so that's 47 bits at most – 46 bits if you also avoid stepping on the IEEE-assigned address range. – grawity Feb 16 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.