2

Very unusual request here, I know you aren't normally meant to change your MAC address since it's burned into the interface you are using, but I am networking 2 raspberry Pi zeros together, each with a USB to ethernet attachment where the manufacturer used the EXACT SAME mac address for both modules. So now I need to manually change one.

I've read a lot of instruction saying to do that through /etc/network/interfaces but I've also read that using that file is now totally outdated so there ought to be a more correct way of making this change. Would that be through /etc/dhcpcd.conf - and if so what is the command to be written?

3

based in information found here

sudo tee /etc/systemd/network/00-default.link <<EOF
[Match]
MACAddress=00:00:00:00:00:00

[Link]
MACAddress=00:00:00:00:00:01
EOF

replace 00:00:00:00:00:00 with your USB/Ethernet MAC address and 00:00:00:00:00:01 with whatever you want your MAC to be

As for what to set the address to, something in the "locally administered" ranges are probably the safest, these are

x2-xx-xx-xx-xx-xx
x6-xx-xx-xx-xx-xx
xA-xx-xx-xx-xx-xx
xE-xx-xx-xx-xx-xx

I have tested the above on a Raspberry pi 3, so can not guarantee it will work with a USB ethernet dongle - however, since the article I linked to refers to cute little USB-to-Ethernet adapters for your Raspberry Pi Zeros I'm fairly confident this should work for you

  • You're the most helpful guy around @Jaromanda x – Matt Sep 9 '18 at 23:30
  • 1
    Just good timing, @Matt. I was looking at using USB-Ethernet adapters for a couple of my Zero's - your question made me wonder if ALL such adapters had similar issues. So, in a way, your question helped me before I even (possibly) had the same issue (oh, and I see I've answered you before :p ) – Jaromanda X Sep 9 '18 at 23:41

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.