I just installed OpenWRT onto a Ubiquiti ER-6P. The physical interfaces by default are named lan0-5. I would like to edit the names so that they match the labels on the router to avoid any confusion in the future: eth0-5. How might one go about doing this?
BTW, it's likely a switch and not individual Ethernet PHYs. While that may not confuse you - keep in mind to let us know if you make future posts for assistance. Best of luck!
The edgerouter4 and 6 don’t have switches and the ports are directly connected to the SoC with individual PHY handles.
There is a stalled drafted PR for this change https://github.com/openwrt/openwrt/pull/13100 but the problem is that dts files are usually not changed once done and these devices are already implemented in stable releases and what happens if all the ports suddenly change name and users save the config files when upgrading?
It’s a good point and I’d personally avoid making the change, but when it does happen that is what the compat version flag is for, or a uci-defaults migration script.
Tells sysupgrade that a version is incompatible and requires special treatment. A message is included instructing the user on what to do or where to get more information.
No, it can be relevant to preserving or discarding settings.
Sometimes the instructions are simple “do not keep config”, sometimes they require you to flash the factory image again, and any other interesting things that may need to happen.
In the example we are talking about in this thread (renaming from lanX to ethX), a user would attempt to sysupgrade (preserve or not doesn’t matter).
The system would stop and provide the compat message saying “The Ethernet port names have changed and you cannot preserve settings when upgrading. Force upgrade to continue”.
The user would then try to upgrade again, this time selecting “force”, and hopefully not preserving (as per the warning).