4 ms·
How would you get allocated a new MAC address in order to do this?
by chrisseaton 7y ago
How would you get allocated a new MAC address in order to do this?
- schoen 7y agoYou normally would just pick a random one, and you have probability near 1/2⁴⁸ of colliding with each other device on your LAN.
- joshvm 7y agoIt may be more like one in 2^24. The first 24 bits are allocated for other things, so it depends how the address is randomised (eg if you keep the manufacturer bits). Though if you report a totally random address it probably will be closer to 2^48. https://www.ionos.co.uk/digitalguide/server/know-how/mac-address/ https://www.ionos.co.uk/digitalguide/server/know-how/mac-add...
- zamadatix 7y agoYou should really be setting the "Locally Administered" bit to 1 when generating random MACs. This combined with the unicast bit should give you 2^46 possibilities without the chance to collide with a globally assigned address at all. https://www.hellion.org.uk/cgi-bin/randmac.pl https://www.hellion.org.uk/cgi-bin/randmac.pl
- AndyMcConachie 7y agoThe lowest order bit of the first byte must be 0 for a station MAC. If it is 1 then it is a multicast MAC which can never be a source MAC. A MAC can also never be all zeros. So I think it works out to something like (2^47)-1. I'm probably forgetting some other specifics so it might even be lower than that. There's a bunch of incorrect information on the link in parent. A simple example is that 01:00:5e:00:00:01 is NOT a valid source MAC address.
- xnyan 7y agoIt's never worked like that, you just provide an arbitrary address, Collisions are not really an issue because it's a manual thing done by a professional for one of any number of uncommon but legitimate reasons. Assuming its not a bug, to me this seems like yet another small but meaningful step in turning macOS from a general purpose OS to a consumer only OS with all the "most people don't want or need this" stuff taken out.
- Jonnax 7y agoA "professional" doesn't do anything except randomise the address. Because a collision is extremely unlikely. Especially in a /24 which has 254 addresses max.
- bowmessage 7y agoOr they spoof it for logging into WiFi portals
- kryogen1c 7y agoWhat are you talking about? MACs are 48 bits, and the unique ID is 24 bits if you preserve your real OUI. This doesnt have anything to do with with an IPv4 address. Furthermore, "professionals" rarely randomize their IPv4 address; theres almost no value in it. The subset of people with some kind DHCP filtering but no NAC or DHCP enforcement is miniscule.
- joosters 7y agoMAC addresses only have to be unique to your local network, they aren't used for wider inter-network routing.
- mlyle 7y agoIf a subnet has 254 machines, they are all made by the same vendor, and the last 3 bytes of the mac address are randomized for every one... There's (254*253)/2 combinations of machines. Each one has a probability of about 1/16777216 of a collision with true random numbers. The number of collisions you expect in this scenario is ~0.0038 over the network. With the wacky problems that happen on MAC collision, this is rare but still too common for routine use. But the chance of any issues, if now and then a few professionals randomize their address, is basically nil.
- coldtea 7y agoYou're confusing MAC and IP addresses