-1

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 '19 at 17:17
  • 4
    MAC addresses don't pass network boundaries anyway. – Tetsujin Feb 16 '19 at 17:17
  • @DanielB - What do you base that on? As far as I know, MAC address I definitely unique, and furthermore unique on a hardware level? And used to recognize devices on local networks. I've read that most new iPhones and Android devices use random MAC address's when searching for available networks, but not when connecting? – LeeSwaggers Feb 16 '19 at 17:27
  • @Tetsujin - I'm not sure what you mean by that? – LeeSwaggers Feb 16 '19 at 17:29
  • 3
    Literally, your MAC address is stripped by any router it passes through - it never propagates to the outside world. – Tetsujin Feb 16 '19 at 17:32
  • I join @Tetsujin: The MAC address is never visible outside your local network. There is no need for spoofing it. Your question is really without subject. – harrymc Feb 16 '19 at 18:15
  • 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 '19 at 18:17
  • @harrymc - I get your point, but say, I join a open network in a Coffee shop? Or as in my example, a large network in a University. In this case the "local network" would be theirs, and not mine to administer. And the MAC address would be stored in their network. – LeeSwaggers Feb 16 '19 at 18:18
  • 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 '19 at 18:23
  • The point, as stated in my post, is a step closer to online privacy. You might disagree whether or not that is relevant to the general user, but as you have previously commented "Your question is really without subject.", I believe that is for me to say. – LeeSwaggers Feb 16 '19 at 18:27
  • Check this: [How is uniqueness of MAC addresses enforced?](https://superuser.com/q/968340/219095) – Daniel B Feb 17 '19 at 00:06
  • @harrymc You can identify individuals by their MAC addresses, roughly track their movements in buildings with multiple access points, log when they enter and leave wireless network's range, associate multiple devices owned by one person with each other. VPN obviously won't protect you from that. Windows 10 has MAC randomization feature built in to counteract this. – gronostaj Feb 17 '19 at 09:06

2 Answers2

3

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.)

u1686_grawity
  • 426,297
  • 64
  • 894
  • 966
  • 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 '19 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. – u1686_grawity Feb 18 '19 at 07:03
  • LA does not mean "locally assigned" (decided by the host itself) it means "locally administered" (decided by the owner / administrator of the local network). – Ben Voigt May 07 '21 at 19:56
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.

gronostaj
  • 55,965
  • 20
  • 120
  • 179
  • 2
    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. – u1686_grawity Feb 16 '19 at 17:40