Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network | Option to set Ethernet MAC address #3618

Open
MichaIng opened this issue Jun 24, 2020 · 2 comments
Open

Network | Option to set Ethernet MAC address #3618

MichaIng opened this issue Jun 24, 2020 · 2 comments

Comments

@MichaIng
Copy link
Owner

MichaIng commented Jun 24, 2020

Creating a feature request

Is your feature request related to a problem? Please describe:

  • On most Armbian-based images, the onboard Ethernet MAC address is assigned randomly on every boot.
  • On Odroid XU4 we set it fixed via boot.ini for all systems.
  • Both ist not optimal.

Describe the solution you'd like:

  • Best default is to assign a new random MAC persistently on first boot via u-boot/cmdline config file.
  • Bonus would be to add a dietpi-config option to allow changing the MAC (per-interface) or unset it to intentionally have a new random MAC on every boot.

Describe alternatives you've considered:

  • There is not really one! Having an identical fixed MAC per image leads to collisions when using multiple devices in the same network. Having a rotation MAC breaks persistent DHCP assignments via router.

Additional context

@dzubybb
Copy link

dzubybb commented Jun 29, 2020

@MichaIng
I got error on fw_printenv :

Bad CRC, using default environment
bootcmd=run distro_bootcmd
bootdelay=2
baudrate=115200
stdin=serial,cros-ec-keyb,usbkbd
stdout=serial,vidconsole
stderr=serial,vidconsole
ethaddr=00:00:11:22:33:44
eth1addr=00:00:11:22:33:45
eth3addr=00:00:11:22:33:46
eth5addr=00:00:11:22:33:47
ipaddr=1.2.3.4
....

I've added ethaddr 6a:32:0b:30:91:7c to /etc/armbianEnv.txt but it's not working.
I'm going back to hwaddress ether 6a:32:0b:30:91:7c in /etc/network/interfaces.

@MichaIng
Copy link
Owner Author

MichaIng commented Jun 29, 2020

Thanks, that is sad but good to know you found another solution. Best would be to apply MAC on early boot (before systemd even starts), but /etc/network/interfaces as least should work in a generic way.

But just to be sure, the device name is eth0, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants