Jump to content

Rock64 - same mac on two boards


znoxx

Recommended Posts

Armbianmonitor:

Hi!

I've 2 rock64 boards -- 4gb and 2gb bought with 1 year difference

 

The problem -- both boards have same MAC address.

Changing it with macchanger has no effect, same for cloned mac in nmtui.

 

Also I tried this in armbianEnv.txt:

 

root@rock64:~# cat /boot/armbianEnv.txt
verbosity=1
overlay_prefix=rockchip
rootdev=UUID=48ad169b-7620-4c84-89fa-6c9a0fcde766
rootfstype=ext4
ethaddr=a7:71:b0:90:17:1f
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

 

 

But mac stays the same. I've plugged usb ethernet just to avoid conflict on same network, but how can I change the MAC of eth0 ?

Link to comment
Share on other sites

9 hours ago, znoxx said:

I've 2 rock64 boards (...) both boards have same MAC address.

 

Is the result of the following command anything different than mine?

root@rock64:~# xxd /sys/bus/nvmem/devices/rockchip-efuse0/nvmem
00000000: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000010: 0000 0000 0000 0000 0000 0000 0000 0000  ................

Both of my rock64 CPUs have their efuse empty and thus both also have the same mac address which is generated by u-boot and based on CPUID. CPUID should be present in bytes 0x07 - 0x16.

I always wondered if it is a common issue...

I also have ROCK Pi E and NanoPi R2S - both based on RK3328 - but they have their efuses set.

 

Did you deactivate and activate the connection after editing cloned mac address?

 

My "/etc/NetworkManager/system-connections/Wired\ connection\ 1.nmconnection" looks like this and it overrides the default mac address

 

Spoiler

[connection]
id=Wired connection 1
uuid=5b1f0192-3329-3e58-8e91-19b2d8b50ac5
type=ethernet
autoconnect-priority=-999
permissions=
timestamp=1593603486

[ethernet]
cloned-mac-address=12:E5:FB:BC:5E:13
mac-address-blacklist=

[ipv4]
dns-search=
method=auto

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto

 

 

Link to comment
Share on other sites

Hi!

Thanks for your reply.

This is one from 4GB model, which acts now as server:

 

$xxd /sys/bus/nvmem/devices/rockchip-efuse0/nvmem
00000000: 524b 3382 00fe 2155 524b 5030 3930 3036  RK3...!URKP09006
00000010: 0000 0000 1710 150a 0208 0800 0000 0000  ................

And this one comes from my "old" 2G board, which i want to re-purpose:
 

$ xxd /sys/bus/nvmem/devices/rockchip-efuse0/nvmem
00000000: 524b 3382 00fe 2155 524b 5030 3930 3231  RK3...!URKP09021
00000010: 0000 0000 0f11 2908 0207 0800 0000 0000  ......).........

By the way, "cloned mac address" worked.  I changed config manually (not in NMTUI) and mac is correct one.

 

The story behind all this:

 

I've got 4Gb model and replaced my 2gb model, literally unplugged microSD and boot usb hdd drive and plugged to new board. Mac not changed (I did not payed attention to this at all, and was happy with new server on same IP). However now I want to repurpose 2gb board, flashed new image to microsd and still getting old mac like in server. 

I wonder is there way to reset something/regenerate it ? 

 

And yet another issue I'm having. Usually I use some "online generator" to generate mac address.. However, in this case not all "macs" work. E.g. "your one" is working. I changed last digit -- also working. Some generated -- NOPE. 

 

What is the correct way to generate one ?

 

Thanks in advance for your reply.

Link to comment
Share on other sites

6 hours ago, znoxx said:

This is one from 4GB model (...) this one comes from my "old" 2G board

This is actually good news that they are present and are different :)

Do you see the production week markings on top of the package? What is it? - both of mine are 1810.

 

6 hours ago, znoxx said:

I've got 4Gb model and replaced my 2gb model, literally unplugged microSD and boot usb hdd drive and plugged to new board. Mac not changed

I must admit that this scenario crossed my mind when I read that you have two boards. The explanation is a bit long but pretty simple...

 

Many boards that Armbian support does not have a stable MAC address and have it randomly generated on each startup.

On the first run Armbian checks the current MAC and creates the NM connection configuration with this random MAC as cloned address.

Thanks to this the next time you boot the board it uses this MAC instead of another generated one achieving some degree of stability - until next reimage.

 

With Rockchip (rk3328 and rk3399 at least) it is a bit different as the MACs for first two ethernet interfaces are generated based on CPUID stored in CPU's NVRAM.

Armbian does not recognise it (not all versions of u-boot can do this generation) and also saves this MAC as a cloned MAC in NM connection settings.

 

When you switched the SD card between boards you started assigning a stable MAC address from the first board to the second one (as a cloned MAC) and the first one was still using the same stable MAC that's assigned to it ;-)

The best you could do IMHO in this situation would be to simply delete the cloned-mac-address stance from connection files on both of your boards and enjoy two stable and different MACs for your boards :)

Link to comment
Share on other sites

@piter75, many thanks for your explanation.

Indeed my "permanent duplicated" mac successfully found in "system connections" folder of original system in "Wired connection 1" file.

But my 2 GB "retired" board stayed in drawer for a while and I made a new image with freshly downloaded Armbian - let's say "new sd card". Why in this case MAC was the same ?

 

Unfortunately, I cannot tell you the signs on board -- they covered with heatsink, which I'd prefer not to re-glue back.

 

2GB board was bought in June-july 2019

4GB board was bought in Feb 2020, but arrived in May only due to covid situation in logistics =(.

 

Link to comment
Share on other sites

Hi,

 

I have 3 Rock64 4GB boards (v2.0, rockchip production week says 1812 for all boards), running Armbian Buster 5.8.y (11/25/2020), and they all have the same MAC address.
I tried reflashing the OS a couple of times on eMMC modules, didn't help.

I did have the cloned-mac-address stance in my connection file, and removing it like suggested in the previous answers didn't fix the issue.

 

I'm getting this for all 3 boards :

$ xxd /sys/bus/nvmem/devices/rockchip-efuse0/nvmem
00000000: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000010: 0000 0000 0000 0000 0000 0000 0000 0000  ................

 

Any idea of what is going on ?

Thanks!

Edited by Antoine
typo
Link to comment
Share on other sites

On 12/20/2020 at 8:54 PM, pando85 said:

I got this working changing it in /etc/network/interfaces:

 

Great thanks, this worked for me!

 

I had the same problem as Antoine: I already owned one ROCK64 board and I just added other 2 (v3.0 2018-1105) and I was having issues with the network. All of them had the same MAC and efuse is empty also.

 

$ xxd /sys/bus/nvmem/devices/rockchip-efuse0/nvmem

00000000: 0000 0000 0000 0000 0000 0000 0000 0000 ................

00000010: 0000 0000 0000 0000 0000 0000 0000 0000 ................

 

I flashed the image (Armbian_20.11.3_Rock64_focal_current_5.9.14_desktop in my case) on the eMMC and then I modified /etc/network/interfaces before starting for the first time, and all worked like a charm.

 

I usually modify also the hostnames, so the avahi announce on the network is different for each board.

 

Link to comment
Share on other sites

Thanks for the previous posts! I'm having the same issue. I cloned an SD card to set up a second Rock64 board and have duplicate MAC addresses. But I'm now confused as the proper solution.

First,  removing cloned-mac-address from the network connections file in /etc/NetworkManager/system-connections/'Wired connection 1.nmconnection'  does not work for me, either. When I reboot, that line is missing, still, but my MAC address is unchanged.
 

Second, I then see some folks fix this in /etc/network/interfaces with:

 

auto eth0
iface eth0 inet dhcp
  hwaddress ether b6:09:a4:06:01:2c

 

That works for me, also. But... what's the proper way to automate this. That is, I 'm setting up a master SD card that I'll then want to replicate to put into new boards and I need them all to come up with different MAC addresses just like they would if I booted from a fresh Armbian image on each (Or would they? I've not seen this issue, before, but I've not had multiple boards running in parallel, either). What's the proper way to do that? I don't see where the initial MAC address is being set up, or how/where the MAC address is determined in that case.
 

Thanks!

Edited by bsnguy
Clarification
Link to comment
Share on other sites

After much searching, reading, testing and failures; this worked for me on Armbian.

  1. Create /etc/fw_env.config with:
    /dev/mmcblk0            0x3F8000        0x8000
  2. Ensure good settings by running fw_printenv, ensure no CRC error.
    # fw_printenv
    arch=arm
    baudrate=1500000
    board=evb_rk3328
    board_name=evb_rk3328
    ...
  3. Set new MAC address using fw_setenv
    # fw_setenv ethaddr {new MAC}
  4. Reboot, confirm MAC address with 'ip link'

I tried using the Windows tools to much failure. Once I put in good fw_env.config settings standard tools under Linux "just worked".

Happily removed udev rule, no need for extra setup in /etc/network/.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines