Random Mac Address

12 12198
Hi,Seems that my Banana PI changes its MAC address each time it's rebooted. This is problematic since I would like my DHCP server (provided by my ISP box) to assign a constant IP address (based on the MAC Address)...

Anyone has experienced the same problem ? Any idea of the cause ?

Thank you.
Reply 1# loscar

The MAC address is dynamic, because  BP has not apply a static mac address. But you can set a MAC address in the scrpit.bin file. Please refer to

I'm running Raspbian for BPI, and I don't have a script.bin file. There's a bootcode.bin on the boot partition, but doesn't seems to be the right file.

Thank you.

The script.bin file is in the first partition. When you insert the SD card into the PC, the first partition is not auto mounted by default. You should mount it by yourself. And the in the first partition, there is a directory called a20, in it you can find script.bin

Thank you Tony, but it still doesn't work, maybe I'm doing something wrong.

Actually, I'm now able to change the script.bin file, but whatever the MAC address I specify, BPI chooses a new one, on each reboot.

On the manual it says "You also need to find out the MAC Address of Ethernet adapter". Does it means that only a specific MAC address will work ? If so, where/how can I find id ?


Hi,Loscar, I am tring to modify the gmac dirver to make the mac address static. Maybe the next distribution the problem can be repaired.  I have not try the method I gave you, but it works because someone told me., maybe this page told you other two methods.

Hi Tony, I've found a workaround... forcing the MAC address on /etc/init.d/rc.local file
  1. ifdown eth0
  2. /sbin/ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
  3. ifup eth0
Copy the Code
Maybe not very elegant, but works

Good to know that you're working on it for the next raspbian release.

You can also add a line like :
  1. hwaddress ether 00:11:22:33:44:55
Copy the Code
in your /etc/network/interfaces .

Hi I've tried both loscar's suggestion  of editing  /etc/init.d/rc.local
and Phi's in /etc/network/interfaces. neither have worked.

I using Lubuntu don't think that would make a difference.
Is there a particular place in the files I should put it?


For me GUI worked just well... See section cloned MAC address.

You have to log in before you can reply Login | Sign Up

Points Rules