Rpi4 < $(community_build)

persistent usb nic names

following on from

https://forum.openwrt.org/t/bind-usb-ethernet-adapter-to-specific-port/111854?u=wulfy23

https://forum.openwrt.org/t/stable-network-interface-names-for-usb-ethernet-dongles/98539

next build will incorporate the ability to make usb-nics persistent

how-it-works

this is how it works...

step1

### enable the logic as a whole
uci set network.globals.persistent_nic='1'
uci commit network

step2

### for every usb nic
uci set network.rummy.mac_original='00:00:e8:00:44:bf'
uci commit network
### update the uci logical interface underlying device eth+last6chars
uci set network.rummy.device="eth0044bf"
uci commit network

so you can leave the first wan untouched: edit: no it will need to be added also...

edit: macaddr(normal override if underlying 'mac_original') will work if it's in the interface ( not device ) section...

there is a bug with macaddr in the device section (move macaddr overrides to the interface section if it's a use adapter to be renamed and you want it overidden until the bug is fixed)

for extra wan interfaces repeat step2...

caveats:

  • no device bridges etc. for now
  • usb only

for anyone not on this build you can get the hotplug.d/net/000-kickanic here

2 Likes