Hello,
I am trying to set a MAC address persistent through reboots for my BeagleBone Black rev c board. I edited the /etc/network/interface file with the following contents:
hwaddress ether XX:XX:XX:XX:XX:XX
After rebooting my board, I still get the default MAC address.
Here are my questions:
Why does the MAC address not change to the one I entered in /etc/network/interfaces?
Is there a way to have a configured MAC address persistent through reboots? If so how?
Any guidance will be much appreciated.
Andrew_Palmertree:
I am trying to set a MAC address persistent through reboots for my BeagleBone Black rev c board. I edited the /etc/network/interface file with the following contents:
hwaddress ether XX:XX:XX:XX:XX:XX
After rebooting my board, I still get the default MAC address.
What version of the BBB do you have? In most cases we pull cpsw_0_mac from the am335x onboard die to configure for Ethernet…
With Bullseye, i’m pretty sure all boards are similar now…
#!/bin/sh
if ! id | grep -q root; then
echo "must be run as root"
exit
fi
log="bb-setup-mac-address:"
#mac address:
#cpsw_0_mac = eth0 - (from eeprom)
#cpsw_1_mac = usb0 - (BeagleBone Side: usb0_host_addr)
#cpsw_2_mac = usb0 - (USB host, pc side: usb0_dev_addr)
#cpsw_3_mac = usb1 - (BeagleBone Side: usb1_host_addr)
#cpsw_4_mac = usb1 - (USB host, pc side: usb1_dev_addr)
#wl18xx - (internal wl18xx eeprom)
#wl18xx (AP) - (internal wl18xx eeprom + 1)
is_mac_valid () {
This file has been truncated. show original
The smsc95xx on the green gateway has been the most painful…
so please let me know which board you have…
Regards,
1 Like
I have the BeagleBone Black rev c.
I just got my board a few days ago, and I am still learning all that the BBB can and cannot do.
Here is the link to where I got my board if that helps:
Getting Started with BeagleBone & BeagleBone Black Beagle boards are tiny computers with all the capability of today’s desktop machines, without the bulk, expense, or noise. Read the step-by-step getting started tutorial below to begin developing...
$73.90
I have the Buster version for my BBB.
This is the image I used:
[AM3358 Debian 10.3 2020-04-06 4GB SD IoT]
That’s just a classic BeagleBone Black Rev C…
Just grab either of the latest images (Buster or Bullseye)…
https://forum.beagleboard.org/tag/latest-images
and eth0’s mac address should be constant now days…
double check on bootup with:
debian@BeagleBone:~$ journalctl | grep cpsw
Mar 20 19:55:28 BeagleBone kernel: cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
Mar 20 19:55:28 BeagleBone kernel: cpsw 4a100000.ethernet: ALE Table size 1024
Mar 20 19:55:28 BeagleBone kernel: cpsw 4a100000.ethernet: cpts: overflow check period 1250 (jiffies)
Mar 20 19:55:28 BeagleBone kernel: cpsw 4a100000.ethernet: Detected MACID = 64:33:db:76:d5:7b
Mar 20 19:55:32 BeagleBone kernel: cpsw 4a100000.ethernet: initializing cpsw version 1.12 (0)
Sep 02 05:20:49 BeagleBone kernel: cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
Sep 02 14:28:36 BeagleBone kernel: cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
Sep 02 14:28:36 BeagleBone kernel: cpsw 4a100000.ethernet: ALE Table size 1024
Sep 02 14:28:36 BeagleBone kernel: cpsw 4a100000.ethernet: cpts: overflow check period 1250 (jiffies)
Sep 02 14:28:36 BeagleBone kernel: cpsw 4a100000.ethernet: Detected MACID = 64:33:db:76:d5:7b
Sep 02 14:28:40 BeagleBone kernel: cpsw 4a100000.ethernet: initializing cpsw version 1.12 (0)
Sep 02 14:28:43 BeagleBone kernel: cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
debian@BeagleBone:~$ journalctl | grep mac
Mar 20 19:55:29 BeagleBone systemd[1]: Condition check resulted in Commit a transient machine-id on disk being skipped.
Mar 20 19:55:28 BeagleBone systemd-modules-load[538]: Inserted module 'mac802154'
Sep 02 05:20:49 BeagleBone bb-setup-mac-address[618]: bb-setup-mac-address: slave@200: 64:33:DB:76:D5:7B
Sep 02 05:20:50 BeagleBone bb-setup-mac-address[618]: bb-setup-mac-address: usb0_host_addr: 64:33:DB:76:D5:7D
Sep 02 05:20:50 BeagleBone bb-setup-mac-address[618]: bb-setup-mac-address: usb0_dev_addr: 64:33:DB:76:D5:7E
Sep 02 05:20:51 BeagleBone bb-setup-mac-address[618]: bb-setup-mac-address: usb1_host_addr: 64:33:DB:76:D5:7F
Sep 02 05:20:51 BeagleBone bb-setup-mac-address[618]: bb-setup-mac-address: usb1_dev_addr: 64:33:DB:76:D5:80
Sep 02 14:28:38 BeagleBone systemd[1]: Condition check resulted in Commit a transient machine-id on disk being skipped.
Sep 02 14:28:36 BeagleBone systemd-modules-load[538]: Inserted module 'mac802154'
Regards,
1 Like
Thank you for your time and help.
It’s much appreciated.