Prevent MAC address to change at every reboot

Hello,

I noticed that the MAC address of certain adapters for example

dummy0

change, except of

eth0

at every reboot.

[ ] using random self ethernet address
[ ] using random host ethernet address

How can I prevent this of being random? My software requires the same MAC after every reboot.

Thanks!

Hi itadmin,

May I know what is your usecase that you need to have fix mac addr and what is the interface you are talking about… the dummy0?

Such command should change the mac addr to what you want.
sudo ifconfig dummy hw ether 00:22:22:ff:ff:ff

Hi,
my use-case is that a software license is depedent on the unique MAC address of the computer. The interface dummy0 just exists already on the JP 4.2.2 SD Image I downloaded. I don’t know the purpose of this.
Does the command persistent change the HW MAC?

You may safely remove dummy0 if you dont need it for debugging purpose

sudo systemctl disable nv-l4t-usb-device-mode.service
sudo systemctl disable nv-l4t-usb-device-mode-runtime.service
sudo systemctl mask nv-l4t-usb-device-mode.service
sudo systemctl mask nv-l4t-usb-device-mode-runtime.service
sudo reboot

Hi itadmin,
Now I meet similar issues in NVIDIA Jetson nano. because we use wibu solution and it seems binding the first mac address, and the dummy0 is the first one, after reboot the mac address will happen changes, result to the binding info happen changes, it is uncorrect. and we need use fix mac address.
I try to safely remove dummy0 ,but it still not works and the dummy0 still exist and happen changes after reboot.
do you have any ideas for this?

As far as I known, the dummy interface only can be removed if you re-compile the kernel with CONFIG_DUMMY is unchecked.

I just had this same issue, fixed it by adding dummy.numdummies=0 to /boot/extlinux/extlinux.conf at the end of the “APPEND” line, this worked for me on both tx2 and Xavier NX.

Thanks alex
Great!
it works for my jetson nano. the dummy0 is removed successfully

Hi, this is how my file looks now, but after a reboot, the dummy interface was still there:

TIMEOUT 30
DEFAULT primary

MENU TITLE L4T boot options

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      INITRD /boot/initrd
      APPEND ${cbootargs} quiet dummy.numdummies=0

# When testing a custom kernel, it is recommended that you create a backup of
# the original kernel and add a new entry to this file so that the device can
# fallback to the original kernel. To do this:
#
# 1, Make a backup of the original kernel
#      sudo cp /boot/Image /boot/Image.backup
#
# 2, Copy your custom kernel into /boot/Image
#
# 3, Uncomment below menu setting lines for the original kernel
#
# 4, Reboot

# LABEL backup
#    MENU LABEL backup kernel
#    LINUX /boot/Image.backup
#    INITRD /boot/initrd
#    APPEND ${cbootargs}

I guess I’m doing something wrong, don’t I?