-
-
Notifications
You must be signed in to change notification settings - Fork 501
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
Orange Pi 5 Plus | Network interface names can swap on reboot #6592
Comments
... and after this happened three times in a row I just started yet another install and this time it worked... so I guess I should edit the title and description to include a 'sometimes' or something... 🤷🏼♂️ |
can you check following as soon as the issue happen
|
interestingly the journal for both So this may be a kernel issue where the initialization of the wired ethernet ports isn't reliable? Maybe? |
Generally verify that there is Interesting that I'll try to replicate with on OPi 5 Plus. |
So this happens on about one out of three reboots for me... Otherwise I love my OPi5+ |
So I guess the network adapters are detected in inconsistent order and hence can have assigned different interface names each time. I'll try to replicate it and test some possible fixes. That is the downside of non-predictable/classic interface names: They are simple and self-explaining, but named just in the order of detection, instead of by some unique identifier which is assured to remain the same. Not the same, but similar: #6663 |
Experiencing the same issue, documented here. Inconsistent assignment of eth0 and eth1 to network adapters, observed by comparing MAC addresses with If anyone knows of a workaround I would love to hear it, even if it includes disabling the second network adapter as I do not need it. |
Having the same issue. Is there any news ? Thanks 🤗 |
a possible workaround could be #6663 (comment) |
Tried the workaround you mentioned @Joulinar, but did not help. I'm out of ideas... |
Hi slynetG, I am suffering exactly the same problem on my orange pi 5 plus (OS installed on the nvme disk). The only workaround I found is to maintain connected both ethernet ports. After that I can reboot in calm the Orange when I am not at home (one of them get´s the fixed IP address), otherwise I run the risk to loose the connection. My experience is that the port is not switching randomly but sequentially, I got a different port enabled after each reboot (before connecting both ports). |
Thanks Yandritos. In DHCP i managed too using a reservation, but i do need fix IP (and DNS)... And i did not managed. On 2 boots out of 5, i get wrong assignement of interface and therefore no connection :( |
As a walkaround you can install and add Bond interface
|
Awwww, you're a lifesaver with bonding the interfaces. Seems to have done the trick beautifully. Thank you! This has been plaguing me for a year now with this little board (which is otherwise amazing!) It is curious how the Orange Pi 5 Plus treats the two interfaces. Like, they're two separate interfaces, but they kind of act as one at times, even without the bonding. Not sure I quie understand what's going on with the hardware and the driver interface there. Does this kind of bonding automatically perform link aggregation? Like, if I were to connect both ports two ports on the same switch, would I get double the bandwidth and then a failover if one nic completely loses connection? Or would that be a different sort of config? |
It will do in case the switch supports it. |
i ran into this and had issues with the bonding solution (it would randomly drop for some odd reason). the solution i ended up with was to create udev rules attached to the mac addresses so that the names would be the same every time.
this creates a net0 and net1 interface that will be the same every time. you need to avoid ethx and wlanx because a race condition can happen between udev and the kernel
i've been rock solid ever since |
Jep, such udev rules solution is what we gonna do as well. But we'll use |
I found a solution via udev rules, which does work. It was not so easy, since udev cannot swap device names via The following however works well here: cat << '_EOF_' > /etc/udev/rules.d/99-dietpi-orangepi5plus.rules
SUBSYSTEM=="net", KERNEL=="to_eth0", RUN:="/bin/true"
SUBSYSTEM=="net", KERNEL=="eth0", KERNELS=="0004:41:00.0", RUN:="/bin/true"
SUBSYSTEM=="net", KERNEL=="eth1", KERNELS=="0003:31:00.0", NAME="to_eth0", RUN="/bin/ip l s dev eth0 name eth1", RUN+="/bin/ip l s dev to_eth0 name eth0", RUN+="/bin/udevadm trigger -c add /sys/class/net/eth0 /sys/class/net/eth1"
_EOF_ What we do is assuring that the Ethernet adapter at PCI bus 3 (the one next to the USB-C power port) is named
These rules with the Also it should not break any existing workaround you may have done via Would be still great if you could test it. I'll implement them on DietPi update today, but show a dialogue which informs about this, so one can react, when needed. It is quite a hacky solution, and the fact that udev does not natively support swapping interface names, indicates that there may be related issues when the one interface matches the original kernel-applied device name of another interface. However, I do not see another solution, until we reworked our network setup script to support "predictable interface naming", i.e. these |
A little update: cat << '_EOF_' > /etc/udev/rules.d/99-dietpi-orangepi5plus.rules
SUBSYSTEM=="net", KERNEL=="eth0", KERNELS=="0004:41:00.0", RUN:="/bin/true"
SUBSYSTEM=="net", KERNEL=="eth1", KERNELS=="0003:31:00.0", NAME="to_eth0", RUN:="/bin/true"
SUBSYSTEM=="net", KERNEL=="to_eth0", RUN="/bin/ip l s dev eth0 name eth1", RUN+="/bin/ip l s dev to_eth0 name eth0", RUN+="/bin/udevadm trigger -c add /sys/class/net/eth0 /sys/class/net/eth1"
_EOF_ While it worked well with The root@OrangePiZero3:~# find / -name '*extcon7*'
/sys/class/extcon/extcon7
/sys/devices/platform/fdee0000.hdmirx-controller/extcon/extcon7
root@OrangePiZero3:~# journalctl | tail -10
May 12 21:16:55 OrangePi5Plus (udev-worker)[1553]: extcon7: Device processed (SEQNUM=11457, ACTION=change)
May 12 21:16:55 OrangePi5Plus (udev-worker)[1553]: extcon7: sd-device-monitor(worker): Passed 268 byte to netlink monitor.
May 12 21:16:55 OrangePi5Plus systemd-udevd[417]: No events are queued, removing /run/udev/queue.
May 12 21:16:55 OrangePi5Plus systemd-udevd[417]: extcon7: Device is queued (SEQNUM=11458, ACTION=change)
May 12 21:16:55 OrangePi5Plus systemd-udevd[417]: extcon7: Device ready for processing (SEQNUM=11458, ACTION=change)
May 12 21:16:55 OrangePi5Plus systemd-udevd[417]: extcon7: sd-device-monitor(manager): Passed 268 byte to netlink monitor.
May 12 21:16:55 OrangePi5Plus (udev-worker)[1553]: extcon7: Processing device (SEQNUM=11458, ACTION=change)
May 12 21:16:55 OrangePi5Plus (udev-worker)[1553]: extcon7: Device processed (SEQNUM=11458, ACTION=change)
May 12 21:16:55 OrangePi5Plus (udev-worker)[1553]: extcon7: sd-device-monitor(worker): Passed 268 byte to netlink monitor.
May 12 21:16:55 OrangePi5Plus systemd-udevd[417]: No events are queued, removing /run/udev/queue. This causes udev to reload all rules every ~3 seconds, and a constantly active (or regenerated several times a second) udev worker process is consuming 5% CPU usage. The |
- Orange Pi 5 Plus | Resolved an issue where the Ethernet interface names eth0/eth1 could swap on (re)boot. We add a udev rule which assures they are named persistently based on the PCI bus identifier. In case you created own udev rules to mitigate the issue, please check whether they conflict and decide whether to use ours or your solution. The DietPi update will also inform you about this change with a prompt. Many thanks to @dirkhh and many others for reporting this issue: #6592
looks like the new udev rules happened after my net0/1 rules so the interfaces were recreated back to eth0/1. Not the end of the world, just something to note. i'll be testing more tomorrow |
If they happen after yours, they would not apply anymore, as But probably I am missing something. Uncommenting journalctl -u systemd-udevd --grep 'eth|net' Or just remove our rules. Just keep in mind that |
Since it as generally solved, I'll close this issue. For particular issues or question regarding the udev rules, feel free to keep posting here or open a new issue. |
Creating a bug report/issue
Required Information
cat /boot/dietpi/.version
this branch is bdde5bd plus one commit from me
bookworm
Linux DietPi 5.10.160-rk35xx #1 SMP Thu Jul 6 13:36:29 UTC 2023 aarch64 GNU/Linux
Orange Pi 5 Plus (aarch64)
Additional Information (if applicable)
Steps to reproduce
Expected behaviour
Actual behaviour
Extra details
dhclient eth0
is sufficient to get an IP addressThe text was updated successfully, but these errors were encountered: