no permanent MAC address? need it to give Pine64 a reserved IP.
#1
Question 
hi,

i need my Pine64 A64+ 2 GB RAM board to have a permanent MAC address, yet it seems to get a new, random one every time i restart.

allow me to explain —

i need the permanent MAC address so my home router (Xfinity/Comcast Cable Modem) can give it a permanent IP in the DHCP list. the reason i need that, is so i can do port forwarding and be able to ssh into the board, if i leave it on (currently with Arch Linux, i also have other MicoSD cards that have other OS's, like Ubuntu). if the MAC address changes each time, the router can't find it and just gives it a random IP number, instead of my desired permanent IP that i am looking for, and, of course, i can never log-in to the board.

however, every time i restart the board, it has a new MAC address (???). at least for the ethernet, as that is the only real MAC address for it i see. i've confirmed this both with the router software looking at the board's MAC address each time i've re-started it, as well as with ifconfig -a and dmesg. in fact, dmesg has this line in it —

Code:
...
eth0: Use random mac address
...

meaning, it is set up to give a new MAC address on each boot.

is there any way to make it so the board has the same, consistent MAC hardware address each time it is re-booted? any help here would be appreciated.

best,

—  faddah
     portland, oregon, u.s.a.
#2
(04-23-2016, 06:46 PM)faddah Wrote: hi,

i need my Pine64 A64+ 2 GB RAM board to have a permanent MAC address, yet it seems to get a new, random one every time i restart.

allow me to explain —

i need the permanent MAC address so my home router (Xfinity/Comcast Cable Modem) can give it a permanent IP in the DHCP list. the reason i need that, is so i can do port forwarding and be able to ssh into the board, if i leave it on (currently with Arch Linux, i also have other MicoSD cards that have other OS's, like Ubuntu). if the MAC address changes each time, the router can't find it and just gives it a random IP number, instead of my desired permanent IP that i am looking for, and, of course, i can never log-in to the board.

however, every time i restart the board, it has a new MAC address (???). at least for the ethernet, as that is the only real MAC address for it i see. i've confirmed this both with the router software looking at the board's MAC address each time i've re-started it, as well as with ifconfig -a and dmesg. in fact, dmesg has this line in it —

Code:
...
eth0: Use random mac address
...

meaning, it is set up to give a new MAC address on each boot.

is there any way to make it so the board has the same, consistent MAC hardware address each time it is re-booted? any help here would be appreciated.

best,

—  faddah
     portland, oregon, u.s.a.

See this post: http://forum.pine64.org/showthread.php?t...86#pid5186
#3
(04-23-2016, 07:16 PM)patrickhwood Wrote: See this post: http://forum.pine64.org/showthread.php?t...86#pid5186

hi @patrickhwood,

thank you for the quick response & help.

i read over that forum post. where, exactly, on the card, is the MAC address? is it the set of numbers below the serial number & 2nd bar code? —

[Image: E9Odvvz.jpg]
[^^^^ the back of my Pine64 A64+ 2 GB board]

if it is that 2nd number, the one below the serial number ("410640113374"), then that would be the 0006dc8b7526 number, or 00:06:dc:8b:75:26.

so i tried putting that at the end of my /boot/uEnv.txt on the Arch Linux MicroSD card —

Code:
ethaddr=00:06:dc:8b:75:26

... and tried rebooting, several times, after that. each time, it still came up with a random MAC address, still.

i then used pacman to download and install macchanger, like the post your referenced suggests —

Code:
$ pacman -Sy macchanger

and did this —

Code:
$ macchanger --mac=00:06:dc:8b:75:26 eth0

that did change the MAC address, for sure, when i did ifconfig -a that confirmed that it was changed, and at times, my Xfinity/Comcast cable modem/router with my port forwarding rule saw that and assigned it accordingly to the Pine64 board (10.0.0.14), but on each next reboot, it would then be a random MAC address number again. and i was back to having to use macchanger to re-assign the MAC address number on each re-boot.

so is there another method, or way of using macchanger, or maybe iproute2, to permanently set the MAC address on the Pine64 board running the Arch MicroSD? this does not happen when running an Ubuntu image - that stays the same assigned static IP from my Xfinity/Comcast cable modem/router, every time.

please let me know.

best,

—  faddah
     portland, oregon, u.s.a.
#4
Serves me right for reposting a message without trying it out first. On the AW kernels, it looks like mac_addr is the kernel argument, not ethaddr:

mac_addr=00:06:dc:8b:41:a5

works for me. Note that both are mentioned here: http://linux-sunxi.org/UEnv.txt so I'm not surprised there's so much confusion, but a quick search through sunxi-gmac.c clearly shows mac_addr as the correct kernel argument.

Now, as for the MAC address printed on the bottom of your card? Looks like it's a correct and proper address. It's taken from the address range assigned to Syabas Tech for the Popcorn Hour, which I believe is TL Lim's previous company.
#5
(04-24-2016, 10:17 PM)patrickhwood Wrote: Serves me right for reposting a message without trying it out first.  On the AW kernels, it looks like mac_addr is the kernel argument, not ethaddr:

 mac_addr=00:06:dc:8b:41:a5

works for me.  Note that both are mentioned here: http://linux-sunxi.org/UEnv.txt so I'm not surprised there's so much confusion, but a quick search through sunxi-gmac.c clearly shows mac_addr as the correct kernel argument.

Now, as for the MAC address printed on the bottom of your card?  Looks like it's a correct and proper address.  It's taken from the address range assigned to Syabas Tech for the Popcorn Hour, which I believe is TL Lim's previous company.

Popcorn Hour player still doing well, still CURRENT company, not "PREVIOUS" company :-)
#6
Tongue 
(04-25-2016, 01:01 AM)tllim Wrote:
(04-24-2016, 10:17 PM)patrickhwood Wrote: Serves me right for reposting a message without trying it out first.  On the AW kernels, it looks like mac_addr is the kernel argument, not ethaddr:

 mac_addr=00:06:dc:8b:41:a5

works for me.  Note that both are mentioned here: http://linux-sunxi.org/UEnv.txt so I'm not surprised there's so much confusion, but a quick search through sunxi-gmac.c clearly shows mac_addr as the correct kernel argument.

Now, as for the MAC address printed on the bottom of your card?  Looks like it's a correct and proper address.  It's taken from the address range assigned to Syabas Tech for the Popcorn Hour, which I believe is TL Lim's previous company.

Popcorn Hour player still doing well, still CURRENT company, not "PREVIOUS" company :-)

hello @patrickhwood & @tllim,

thank you for responding.

unfortunately, none of this helped.

i changed my line in the /boot/uEnv.txt file to be —

Code:
mac_addr=00:06:dc:8b:75:26

...and re-booted, several times, to test. it still gives me a random, different MAC address, every time, checking wiht ifconfig -a.

i tried several of the methods detailed here at this linux secrets article, but it was of no help either. i used the methods they had for using iproute2 or macchanger to "permanently" (or so they claim) change the MAC address. none of it worked. rebooted several times after trying each, each time, still a random MAC address on the card, no matter what.

this is very frustrating. anyone else know of something i'm missing here? one person said i asked on an IRC channel suggested i might have to rebuild the kernel with the option i want. i hope this is not the case.

if anyone has any other ideas on making this work so i have a static MAC address, please, the one my Pine64 board came with (00:06:dc:8b:75:26), i would appreciate it. perhaps @longsleep could chime in here and say why the Arch Linux image is doing this, and how to change it, please?

best,

—  faddah
     portland, oregon, u.s.a.
#7
(04-25-2016, 05:27 PM)faddah Wrote:
(04-25-2016, 01:01 AM)tllim Wrote:
(04-24-2016, 10:17 PM)patrickhwood Wrote: Serves me right for reposting a message without trying it out first.  On the AW kernels, it looks like mac_addr is the kernel argument, not ethaddr:

 mac_addr=00:06:dc:8b:41:a5

works for me.  Note that both are mentioned here: http://linux-sunxi.org/UEnv.txt so I'm not surprised there's so much confusion, but a quick search through sunxi-gmac.c clearly shows mac_addr as the correct kernel argument.

Now, as for the MAC address printed on the bottom of your card?  Looks like it's a correct and proper address.  It's taken from the address range assigned to Syabas Tech for the Popcorn Hour, which I believe is TL Lim's previous company.

Popcorn Hour player still doing well, still CURRENT company, not "PREVIOUS" company :-)

hello @patrickhwood & @tllim,

thank you for responding.

unfortunately, none of this helped.

i changed my line in the /boot/uEnv.txt file to be —

Code:
mac_addr=00:06:dc:8b:75:26

...and re-booted, several times, to test. it still gives me a random, different MAC address, every time, checking wiht ifconfig -a.

i tried several of the methods detailed here at this linux secrets article, but it was of no help either. i used the methods they had for using iproute2 or macchanger to "permanently" (or so they claim) change the MAC address. none of it worked. rebooted several times after trying each, each time, still a random MAC address on the card, no matter what.

this is very frustrating. anyone else know of something i'm missing here? one person said i asked on an IRC channel suggested i might have to rebuild the kernel with the option i want. i hope this is not the case.

if anyone has any other ideas on making this work so i have a static MAC address, please, the one my Pine64 board came with (00:06:dc:8b:75:26), i would appreciate it. perhaps @longsleep could chime in here and say why the Arch Linux image is doing this, and how to change it, please?

best,

—  faddah
     portland, oregon, u.s.a.

Just to be clear, you're appending the mac_addr=... to the end of the "console=" line, not as a new line, e.g.,


Code:
console=tty0 console=ttyS0,115200n8 no_console_suspend mac_addr=00:06:dc:8B:41:a5

Just putting this definition in on a separate line sets an environment variable in the bootloader called mac_addr, but doesn't actually get that passed to the kernel as an argument.
#8
Thumbs Up 
(04-27-2016, 09:26 PM)patrickhwood Wrote:

Just to be clear, you're appending the mac_addr=... to the end of the "console=" line, not as a new line, e.g.,

Code:
console=tty0 console=ttyS0,115200n8 no_console_suspend mac_addr=00:06:dc:8B:41:a5

Just putting this definition in on a separate line sets an environment variable in the bootloader called mac_addr, but doesn't actually get that passed to the kernel as an argument.

that did it! thank you very much — you were correct, i was putting that mac_addr=... assignment on a speaarate line. i put it on the same line as the console=... args, and it works! i've now rebooted several times and have the same MAC address, like i need. thank you, again.

should i perhaps write this up as note in the forums? here or in the linux forum?

best,

—  faddah
     portland, oregon, u.s.a.
#9
(04-28-2016, 09:35 AM)faddah Wrote: that did it! thank you very much — you were correct, i was putting that mac_addr=... assignment on a speaarate line. i put it on the same line as the console=... args, and it works! i've now rebooted several times and have the same MAC address, like i need. thank you, again.

should i perhaps write this up as note in the forums? here or in the linux forum?

All my images remember the mac address automatically after first boot.
#10
Can you please post the output of 'uname -a' and/or 'cat /proc/version'?

(04-28-2016, 10:14 AM)longsleep Wrote: All my images remember the mac address automatically after first boot.

But since the Pine64 folks 'feature' only strange and outdated stuff no one is using your images Sad

Please compare both dates: https://github.com/longsleep/u-boot-pine...c53cd1ff1e vs. http://wiki.pine64.org/index.php/Pine_A6...20160304-1


Possibly Related Threads…
Thread Author Replies Views Last Post
  Rock64: MAC Address is NOT Unique! PDXpi 3 4,715 02-01-2021, 12:12 AM
Last Post: PDXpi
  The Mac Address Would Not Change on Debian, nor Gentoo MarkHaysHarris777 5 8,703 03-27-2017, 12:57 PM
Last Post: grobbs
  Howto use MAC address as printed on the label on the back longsleep 3 5,978 08-21-2016, 07:31 AM
Last Post: MarkHaysHarris777
  Pine64+ 1GB Ethernet Port spec ecotack 13 15,452 08-20-2016, 09:28 PM
Last Post: pfeerick

Forum Jump:


Users browsing this thread: 1 Guest(s)