tabrisnet Posted Tuesday at 07:06 PM Posted Tuesday at 07:06 PM BPI-R4, but that is probably the least of my problems. setting up netplan, like the docs say I have to. using networkd, or trying... renaming the eth1 interface to ethLAN, keeping lan1 as-is. networkctl always says that eth1 or ethLAN is unmanaged. Note that I'm using the ttyS0 serial console. root@ratatosk:~# networkctl list IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 2 eth0 ether degraded unmanaged 3 eth1 ether off unmanaged 4 eth2 ether off unmanaged 5 wan dsa off unmanaged 6 lan1 dsa routable configured 7 lan2 dsa off unmanaged 8 lan3 dsa off unmanaged root@ratatosk:~# netplan apply [ 141.017704] mtk_soc_eth 15100000.ethernet ethLAN: renamed from eth1 [ 141.068835] mtk_soc_eth 15100000.ethernet ethEXT1: renamed from eth2 root@ratatosk:~# networkctl list IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 2 eth0 ether degraded unmanaged 3 ethLAN ether off unmanaged 4 ethEXT1 ether off unmanaged 5 wan dsa off unmanaged 6 lan1 dsa routable configured 7 lan2 dsa off unmanaged 8 lan3 dsa off unmanaged Here's my config. Note that it does in fact rename the interfaces... albeit not at boot 😑 root@ratatosk:~# cat /etc/netplan/20-ethLAN.yaml network: version: 2 renderer: networkd ethernets: ethLAN: match: macaddress: '6a:c9:72:53:13:d5' #set-name: ethLAN #tried with and without this addresses: [ "192.168.88.253/23" ] emit-lldp: true dhcp4: false dhcp6: false #ignore-carrier: true nameservers: addresses: - 192.168.82.55 search: - tabris.net routes: #- to: 192.168.88.0/23 # metric: 10 # from: 192.168.88.253 # scope: link # type: local - to: "default" via: "192.168.88.254" root@ratatosk:~# cat /etc/netplan/11-lan1.yaml network: version: 2 renderer: networkd ethernets: lan1: match: name: "lan1" addresses: - "192.168.88.250/23" nameservers: addresses: - 192.168.82.55 search: - tabris.net # routes: # - to: "default" # via: "192.168.88.254" note that lan1 works! ethLAN, whether named eth1 or ethLAN... does not. I tried using renderer: NetworkManager It then tries to restart networkd & stop NetworkManager. but it can eventually work... but I have to sacrifice a rubber chicken [stupid manual steps like manually setting the interfaces up with ip link] each time, and they're starting to pile up. it will *not* work at boot no matter what I do. 0 Quote
Igor Posted Tuesday at 07:23 PM Posted Tuesday at 07:23 PM 14 minutes ago, tabrisnet said: renaming the eth1 interface to ethLAN, keeping lan1 as-is. Did you try renaming by using udev rule? Example: sudo nano /etc/udev/rules.d/76-rename-wifi-by-mac.rules SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="b8:2d:28:5a:55:92", NAME="wlxb82d285a5592" and then proceed with whatever. Both systemd-networkd and network manager should work. 0 Quote
tabrisnet Posted Tuesday at 07:50 PM Author Posted Tuesday at 07:50 PM rules in /etc/udev/rules.d did *nothing*. tried with 00 prefix and 99 prefix. udevadm test-builtin net_setup_link didn't mention the filepath either. But I could make it do stuff with /etc/systemd/network/foo.link, which is what's current[ly not deleted yet from previous attempts]. Which makes it even weirder that it still won't rename at boot. Note that the problem is a lot less the renaming and more that networkd refuses to manage the interfaces, even if I give up on renaming, 0 Quote
Igor Posted Tuesday at 08:01 PM Posted Tuesday at 08:01 PM Weird. Check logs and verify matching - mac - if not changing random - is usually safest way. I haven't played under network manger lately ... perhaps there lies the problem or network devices gets up with a delay. I will try to recreate during week. 0 Quote
tabrisnet Posted Tuesday at 08:06 PM Author Posted Tuesday at 08:06 PM The eth0/lan1 MAC does change... the eth1/eth2 MACs do not change. I've checked over multiple reboot cycles. 3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 6a:c9:72:53:13:d5 brd ff:ff:ff:ff:ff:ff 4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 32:b0:1b:6f:4e:e9 brd ff:ff:ff:ff:ff:ff root@ratatosk:~# uptime 20:05:19 up 5 min, 1 user, load average: 0.13, 0.39, 0.21 just rebooted, the MACs are stable 🐴 I could try reconfiguring the netplan config to use the name [like with lan1] instead of MAC... but that will of course mean I can't rename. 0 Quote
tabrisnet Posted Tuesday at 08:08 PM Author Posted Tuesday at 08:08 PM Ok, so using the match name *does* work, still makes no sense. root@ratatosk:~# head /etc/netplan/20-ethLAN.yaml network: version: 2 renderer: networkd ethernets: eth1: match: #macaddress: '6a:c9:72:53:13:d5' name: eth1 #set-name: ethLAN addresses: [ "192.168.88.253/23" ] root@ratatosk:~# networkctl list IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 2 eth0 ether degraded unmanaged 3 eth1 ether routable configured 4 eth2 ether off unmanaged 5 wan dsa off unmanaged 6 lan1 dsa routable configured 7 lan2 dsa off unmanaged 8 lan3 dsa off unmanaged 8 links listed. 0 Quote
tabrisnet Posted Tuesday at 08:12 PM Author Posted Tuesday at 08:12 PM making a copy of the file from /run/, changing the YAML to use MAC, then diff root@ratatosk:~# netplan generate root@ratatosk:~# diff -purN /run/systemd/network/10-netplan-eth1.network /root/netplan-eth1-namematch.network --- /run/systemd/network/10-netplan-eth1.network 2025-08-19 20:10:54.900000038 +0000 +++ /root/netplan-eth1-namematch.network 2025-08-19 20:10:36.980000037 +0000 @@ -1,5 +1,5 @@ [Match] -PermanentMACAddress=6a:c9:72:53:13:d5 +Name=eth1 [Network] EmitLLDP=true feels like a systemD bug ☹️ 0 Quote
tabrisnet Posted Tuesday at 08:20 PM Author Posted Tuesday at 08:20 PM (edited) maybe not a strictly a systemd bug... but a netplan stupidity. root@ratatosk:~# ethtool --show-permaddr eth1 Permanent address: not set https://github.com/systemd/systemd/pull/14448/files <-- PR that created this systemd match feature Edited Tuesday at 08:27 PM by tabrisnet 0 Quote
tabrisnet Posted Tuesday at 08:53 PM Author Posted Tuesday at 08:53 PM https://github.com/canonical/netplan/pull/278 <-- related netplan PR 0 Quote
tabrisnet Posted Tuesday at 09:15 PM Author Posted Tuesday at 09:15 PM new Ubuntu/netplan bug: https://bugs.launchpad.net/netplan/+bug/2120999 0 Quote
tabrisnet Posted Tuesday at 11:11 PM Author Posted Tuesday at 11:11 PM https://forum.banana-pi.org/t/bpi-r4-eeprom/17836/13 suggests we should figure out how to give the info to uboot? or it already does generate it for us in one case? I can say I find eth0's local-mac-address in the running device tree, but the other two mac@ entries lack it. root@ratatosk:/boot# dtc /proc/device-tree 2>/dev/null |grep -PA 10 'mac@[0-9] ' mac@2 { phy-mode = "usxgmii"; compatible = "mediatek,eth-mac"; status = "okay"; pcs-handle = <0x3a 0x3b>; managed = "in-band-status"; phys = <0x3c>; reg = <0x02>; openwrt,netdev-name = "sfp-wan"; sfp = <0x3d>; }; -- mac@0 { phy-mode = "internal"; local-mac-address = [22 16 68 60 40 c2]; mac-address = [22 16 68 60 40 c2]; compatible = "mediatek,eth-mac"; status = "okay"; reg = <0x00>; phandle = <0x2c>; fixed-link { full-duplex; -- mac@1 { phy-mode = "usxgmii"; compatible = "mediatek,eth-mac"; status = "okay"; pcs-handle = <0x36 0x37>; managed = "in-band-status"; phys = <0x38>; reg = <0x01>; openwrt,netdev-name = "sfp-lan"; sfp = <0x39>; }; 0 Quote
tabrisnet Posted 6 hours ago Author Posted 6 hours ago @Igor how often does netplan run? how possible might it be to sneak in a sed -i -e 's/PermanentMACAddress/MACAddress/' /run/systemd/network/* networkctl reload in my bootup sequence? will DHCP [on ethEXT1] or carrier up/down events break this? 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.