Mac changing on reboot

Post Reply
apeg
Posts: 65
Joined: Sat May 09, 2015 10:41 pm
languages_spoken: english
ODROIDs: C1
Contact:

Mac changing on reboot

Unread post by apeg » Thu Jan 10, 2019 6:35 am

Hi, im running LibreELEC-Odroid_C2.aarch64-8.2.5.tar on my C2... been working great.

But im trying to organize my network a bit better and notice C2 reports a different mac every boot?

my boot.ini looks good:

Code: Select all

setenv odroidp2 "mac=${ethaddr} consoleblank=0 max_freq=${max_freq} maxcpus=${maxcpus}"
Any ideas how i can get it to stick with one mac address?

joy
Posts: 680
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Contact:

Re: Mac changing on reboot

Unread post by joy » Thu Jan 10, 2019 12:15 pm

Hi, apeg.

Each ODROID-C2 has an unique MAC address from the manufacture line.
And there is no interface to change it permanently or temporarily like using boot.ini option.

As an alternate way, I've tried macchanger and it can change mac address.
Could you try it?

Code: Select all

$ sudo apt-get install macchanger

Code: Select all

# ifconfig eth0 down

# macchanger --random eth0
Current MAC:   00:1e:06:12:34:56 (WIBRAIN)
Permanent MAC: 00:00:00:00:00:00 (XEROX CORPORATION)
New MAC:       be:28:0f:86:ab:a2 (unknown)

root@odroid:~# ifconfig eth0 up  

root@odroid:~# ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether be:28:0f:86:ab:a2  txqueuelen 1000  (Ethernet)
        RX packets 32  bytes 3363 (3.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 56  bytes 6591 (6.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 40  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 133  bytes 10357 (10.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 133  bytes 10357 (10.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
But, please note that after C2 reboot, the original MAC address will comes up again,
so I think related init logic should be added in boot init script.

User avatar
odroid
Site Admin
Posts: 30044
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: Mac changing on reboot

Unread post by odroid » Thu Jan 10, 2019 2:10 pm

I think LibreELEC doesn't support "apt" command. :(

umiddelb
Posts: 450
Joined: Thu Jan 29, 2015 6:42 am
languages_spoken: English, German
ODROIDs: ODROID-C1, ODROID-XU4, ODROID-C2
Contact:

Re: Mac changing on reboot

Unread post by umiddelb » Thu Jan 10, 2019 2:27 pm

You can pin the MAC address in the config file, e.g.

/etc/network/interfaces.d/eth1:

Code: Select all

auto eth1
iface eth1 inet dhcp
  hwaddress ether 00:01:c0:13:fb:ef

joy
Posts: 680
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Contact:

Re: Mac changing on reboot

Unread post by joy » Thu Jan 10, 2019 4:51 pm

odroid wrote:
Thu Jan 10, 2019 2:10 pm
I think LibreELEC doesn't support "apt" command. :(
Oops!!!!
I couldn't consider it.
Sorry for the wrong information. :(

brad
Posts: 819
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1
Location: Australia
Contact:

Re: Mac changing on reboot

Unread post by brad » Thu Jan 10, 2019 5:28 pm

I don't use LibreELEC right at the moment but I do remember reading some information about it support for mainline uboot to enable dual boot OS's (example ubuntu on emmc and when sd plugged in LibreELEC).

I also know well to much the changing mac on boot with mainline uboot. For a while it was missing a driver for efuse (which is what queries the SOC for the mac address on boot) but efuse is now included although maybe it is not enabled correctly in the image you have downloaded.

Does anyone know what versions of uboot and kernel this image is using?

apeg
Posts: 65
Joined: Sat May 09, 2015 10:41 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: Mac changing on reboot

Unread post by apeg » Fri Jan 11, 2019 7:10 am

I appreciate the response guys, but my mistake. it was the TAP interface that's using a unique mac on connection.

I was lazy looking server side and just assumed.

LibreELEC working great! as usual.

Thanks,

Post Reply

Return to “LibreELEC - Kodi Project for C1/C2”

Who is online

Users browsing this forum: No registered users and 2 guests