jerryc Posted January 31, 2017 Share Posted January 31, 2017 Hi Wondering if anyone knew the algorithm that assigns mac addresses to orange zero. Is it based on something static/cpu id /...? or it is purely random. Will this mac change over time or after it is generated, it will stay the same? I have one zero that mac is pretty static and another changed mac after I did a upgrade. If I want better control of the mac address, what's the best way to make it static? this is on the mainline -jerry Link to comment Share on other sites More sharing options...
cvxx Posted February 19, 2017 Share Posted February 19, 2017 I'm also looking for a way to make the MAC persistant Link to comment Share on other sites More sharing options...
jernej Posted February 19, 2017 Share Posted February 19, 2017 It is based on SID and it changed once in the past, when SID issue was fixed in U-Boot. It was discussed on forum before and search for that post for any technical explanation. Link to comment Share on other sites More sharing options...
kosinske Posted March 10, 2017 Share Posted March 10, 2017 Using latest nightly (5.27.170309) with 4.10.1 kernel on OPi PC. I'm trying to override the mac address since it changed after switching over from legacy kernel. I followed martinayotte's post at https://forum.armbian.com/index.php?/topic/1738-opi-lite-mac-address/&do=findComment&comment=15574 and added a mac-address option to the corresponding device tree section. Unfortunately it doesn't have any effect and the value at /sys/firmware/devicetree/base/soc/ethernet@1c30000/mac-address does not seem to change. Is this the expected behavior? If so, what would be the right way to do it? Link to comment Share on other sites More sharing options...
martinayotte Posted March 10, 2017 Share Posted March 10, 2017 Although I didn't verify by trying myself, in 4.10.x, it seems that the keyword is now "local-mac-address". Link to comment Share on other sites More sharing options...
kosinske Posted March 10, 2017 Share Posted March 10, 2017 Yes thanks, I had already noticed the local-mac-address option in the dts and tried both that one and mac-address. Neither is working for me though. Both always get overwritten at some point with 02814cea2d8d. Link to comment Share on other sites More sharing options...
martinayotte Posted March 11, 2017 Share Posted March 11, 2017 I've looked into driver/of/of_net.c, and all those 3 keywords are supported : address/mac-address/local-mac-address. I've tried it myself, and effectively it doesn't work. This means that some bug has been introduced in last few months. I will have to dig further by adding traces into a custom kernel build. Link to comment Share on other sites More sharing options...
Recommended Posts