New MAC on eth0 on each reboot

I noticed the MAC and as result IP changes on each reboot.

Why is this and how to fix this?
Is the built in NIC missing an own MAC?

root@firefly:~# ifconfig
eth0 Link encap:Ethernet HWaddr f2:79:9d:4d:a7:4c
inet addr:192.168.178.59 Bcast:192.168.178.255 Mask:255.255.255.0
inet6 addr: fe80::b640:dc58:86e8:e1b6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2444 errors:0 dropped:0 overruns:0 frame:0
TX packets:1385 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3627283 (3.6 MB) TX bytes:109095 (109.0 KB)
Interrupt:24

root@firefly:~# ifconfig
eth0 Link encap:Ethernet HWaddr e2:7c:20:f5:fd:1a
inet addr:192.168.178.60 Bcast:192.168.178.255 Mask:255.255.255.0
inet6 addr: fe80::2663:b79d:9d26:cb9d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:20 errors:0 dropped:0 overruns:0 frame:0
TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7096 (7.0 KB) TX bytes:6171 (6.1 KB)
Interrupt:24

Hi
check this : firefly-rk3399-android-sdk/RKDocs/RKTools manuals/WNpctool简要使用说明_V1.1.0_0920.pdf

isle Posted at 3/24/2017 09:36
Hi
check this : firefly-rk3399-android-sdk/RKDocs/RKTools manuals/WNpctool简要使用说明_V1.1.0_09 …

Where can I find this Document?

Looked at https://gitlab.com/TeeFirefly/FireNow-Marshmallow and google, but no result

Oh,my bad, this document haven’t been uploaded ,
check this : http://wiki.t-firefly.com/index.php/Firefly-RK3399/Starter_guide/en#Q9:_How_to_flash_MAC_address.3F
In Q9 of FAQs :

Ok, I tried this already, but without success. MAC is written and can be read, but the linux kernel still comes up with a 00:00:00:00:00:00 on eth0. I will recheck then.

Currently using the Ubuntu 16.04 image from http://en.t-firefly.com/en/firenow/Firefly_RK3399/download/.
Maybe there is an issue with your kernel, so it can’t find the MAC and fallbacks to generate random MACs each boot?

Cannot make it work.
Here a Screenshot with the configured MAC and the ifconfig of eth0 with random MAC: http://imgur.com/a/8iPMi

root@firefly:~# uname -a
Linux firefly 4.4.16 #20 SMP PREEMPT Sat Mar 18 15:19:16 CST 2017 aarch64 aarch64 aarch64 GNU/Linux

I added:

  • “pr_warn(”%s: generating random MAC on stmicro", priv->dev->name);"
    to drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

and can see this in the kernel-log:
root@firefly:~# dmesg | grep eth0
[ 2.527372] eth0: PHY ID 001cc915 at 0 IRQ POLL (stmmac-0:00) active
[ 2.527576] eth0: PHY ID 001cc915 at 1 IRQ POLL (stmmac-0:01)
[ 7.125743] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 7.125925] eth0: generating random MAC on stmicro
[ 7.125925] eth0: device MAC address f6:aa:ef:f3:9f:ab
[ 13.243538] rk_gmac-dwmac fe300000.eth eth0: Link is Up - 1Gbps/Full - flow control rx/tx

So there is no MAC on this Hardware and the kernel generates random as suspected.

Hi ,
yes ,we found this issue, we will fix it later,
Thanks for reminder us.

I’d appreciate a solution for this too, if possible.

Hi, we have fixed it,and will upload the source code and the new tool later.

How can we fix this problem?

Why don’t you share your solution with the rest of us?

Hi @mbmb , with the latest Ubuntu 18.04 firmware, this issue has been fixed.

The mac address is handled in drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c in kernel.

Your article has left me speechless, thank you for sharing it! Valid OGEA-103 exam bootcamp offers amazing content, and it’s available to you without charge.

I’m so grateful for your article, it truly stayed with me. Sharpen your IT knowledge with free Valid 300-620 test camp materials. Best of luck to you!

Your article had such a strong effect on me, I’m really thankful. Good luck! Here are the Reliable UiAAAv1 real test answer materials shared for free.