Firefly Open Source Community

   Login   |   Register   |
New_Topic
12
New Topic
Print Previous Topic Next Topic

New MAC on eth0 on each reboot

55

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
55

New MAC on eth0 on each reboot

Posted at 3/24/2017 03:42:45      View:15722 | Replies:11        Print      Only Author   [Copy Link] 1#
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 Scopeink
          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

<REBOOT>

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 Scopeink
          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
Reply

Use props Report

1821

Credits

10

Prestige

17

Contribution

super moderator

Rank: 8Rank: 8

Credits
1821
Posted at 3/24/2017 09:36:03        Only Author  2#
Hi
check this  :  firefly-rk3399-android-sdk/RKDocs/RKTools manuals/WNpctool简要使用说明_V1.1.0_0920.pdf
Reply

Use props Report

55

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
55
Posted at 3/24/2017 15:54:56        Only Author  3#
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
Reply

Use props Report

1821

Credits

10

Prestige

17

Contribution

super moderator

Rank: 8Rank: 8

Credits
1821
Posted at 3/24/2017 16:46:19        Only Author  4#
Oh,my bad, this document haven't been uploaded  ,
check this  : http://wiki.t-firefly.com/index. ... lash_MAC_address.3F
In Q9 of FAQs :
Reply

Use props Report

55

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
55
Posted at 3/24/2017 17:17:14        Only Author  5#
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?
Reply

Use props Report

55

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
55
Posted at 3/24/2017 20:57:26        Only Author  6#
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
Reply

Use props Report

55

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
55
Posted at 3/24/2017 21:23:03        Only Author  7#
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.
Reply

Use props Report

1821

Credits

10

Prestige

17

Contribution

super moderator

Rank: 8Rank: 8

Credits
1821
Posted at 3/27/2017 09:39:51        Only Author  8#
Hi ,
yes ,we found  this issue,  we will fix it later,
Thanks for reminder us.
Reply

Use props Report

176

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
176
Posted at 3/29/2017 01:56:36        Only Author  9#
I'd appreciate a solution for this too, if possible.  
Reply

Use props Report

1821

Credits

10

Prestige

17

Contribution

super moderator

Rank: 8Rank: 8

Credits
1821
Posted at 4/6/2017 10:24:04        Only Author  10#
Hi, we have fixed it,and will upload  the source code and the new tool later.
Reply

Use props Report

Return to List
12
You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list