ldct
Posts: 5
Joined: Wed Oct 23, 2019 9:26 pm

MAC Address of Compute Module

Wed Feb 05, 2020 11:37 am

Hi all,

I'm designing a board featuring the CM3+ module. I'm going to use a USB-ETH controller similar to LAN9514.
My doubt is about the uniqueness of MAC address. The way MAC addresses are generated is listed below:

https://www.raspberrypi.org/forums/view ... ss#p612502

"Currently the MAC address generated on the Pi simply concatenates the OUI with the last 24 bits of the randomly-generated serial number embedded in the SoC OTP. This is passed through the command line to Linux which has a driver-specific hack to set the MAC address on the attached LAN9512 (there are problems with this approach, but it suffices for now)."

i.e. OUI (for example b8:27:eb) + another triplet burned in the SoC (programmed in the fab). The assigned MAC ranges is shown here:

https://udger.com/resources/mac-address ... foundation

I still don't understand the following: if I gather all the devices produced by Raspberry Foundation and connect them in a single subnet, there will be MAC address collisions?

Thanks!

User avatar
rpdom
Posts: 19543
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: MAC Address of Compute Module

Wed Feb 05, 2020 3:03 pm

ldct wrote:
Wed Feb 05, 2020 11:37 am
if I gather all the devices produced by Raspberry Foundation and connect them in a single subnet, there will be MAC address collisions?
Yes, if you put every single Raspberry Pi product on the same subnet it is likely that you will get duplicated MAC addresses. However that would be a very big subnet with potentially 16 million Pis. The serial numbers are randomish and the likelihood of getting two the same is low, but it has happened. The same goes for almost any network device. Some of the cheap USB network adaptors all have the same MAC address, so you can't even use two of them on the same subnet.
Unreadable squiggle

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4348
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: MAC Address of Compute Module

Wed Feb 05, 2020 3:09 pm

You have the option of putting unique MAC addresses in OTP - see https://www.raspberrypi.org/forums/view ... p?t=231700 for details.

Return to “Compute Module”