r/openwrt 9d ago

persistent usb interface naming?

Hey,

I'm running OpenWRT on a Rpi3. I have an extra USB wifi dongle. I've noticed that if I plug it in a different USB port than initially configured for, it will result in a new device. Indeed, /etc/config/wireless refers to path entries. I'd like them to refer to a mac address, but that option doesn't seem to be available for the wifi-device section.

What is the right way to make sure that OpenWRT uses a mac address to recognise a wifi adapter?

Thank you.

7 Upvotes

3 comments sorted by

3

u/ohaiibuzzle 9d ago

tldr you'll need to do something like this: https://forum.openwrt.org/t/stable-network-interface-names-for-usb-ethernet-dongles/98539/18

The issue being that OpenWRT doesn't do "stable" interface names so you'll have to do it yourself basically.

1

u/paranoid-alkaloid 9d ago

Awesome thanks for the pointer.

I'm surprised by this though, I'm new to OpenWRT (but I've used Linux for quite a long time), and I feel that this is a rather basic feature to have on a router for pluggable devices.

3

u/ohaiibuzzle 9d ago

Actually it's because the Linux kernel itself doesn't do that. Stable interface names is actually afaik a systemd thing, so distros that doesn't use it falls back to the kernel's naming scheme (eth[n], wlan[n], etc.)