I use 21.02.0-rc2, and saw some strange thing in my config.
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
more strange thing is, I got this
root@OpenWrt:/etc/config# brctl show
bridge name bridge id STP enabled interfaces
br-lan 7fff.40313c1d08f7 no lan2
wlan1
lan1
I don't see wlan1 in /etc/config/network, where does this guy come from? ( and I have 2.4g and 5g wifi, why there is no wlan2 or something)
and where does lan1 and lan2 come from?
where is my switch tab under network?
Thank you. Very helpful article. But I still don't know where do my wifi interface go? In 19.07, I remembered I have wlan1 and wlan2, but now I can't find wlan2, and I also don't know when wlan1 is bridged to br-lan. I haven't found any clue on Luci.
wireless physical interface device names can change across releases...
what is commonly the case... is that a 'network' name is listed in /etc/config/wireless for which network wireless will be connected to... (by default br-lan)...
root@OpenWrt:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1504 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 40:31:3c:1d:08:f7 brd ff:ff:ff:ff:ff:ff
3: lan2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP mode DEFAULT group default qlen 1000
link/ether 40:31:3c:1d:08:f7 brd ff:ff:ff:ff:ff:ff
4: lan1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP mode DEFAULT group default qlen 1000
link/ether 40:31:3c:1d:08:f7 brd ff:ff:ff:ff:ff:ff
5: wan@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 40:31:3c:1d:08:f8 brd ff:ff:ff:ff:ff:ff
8: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 40:31:3c:1d:08:f7 brd ff:ff:ff:ff:ff:ff
9: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
link/ether 40:31:3c:1d:08:f9 brd ff:ff:ff:ff:ff:ff
10: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP mode DEFAULT group default qlen 1000
link/ether 40:31:3c:1d:08:fa brd ff:ff:ff:ff:ff:ff
11: pppoe-wan: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 3
link/ppp
But only wlan1 is bridged to br-lan
root@OpenWrt:~# brctl show
bridge name bridge id STP enabled interfaces
br-lan 7fff.40313c1d08f7 no lan2
wlan1
lan1
If you have it enabled in /etc/config/wireless but there is no wlan0 interface up, it seems netfid or hostapd failed to bring it up. Check your systemlog (logread command).
wlan0 is DOWN due to improper configuration of specifying channel 13, which is not allowed in most countries. Always set the radio country to your country to have the maximum performance that is legal where you live. If country is not set, it will only do a restricted set of channels and powers that are legal in every country.
If you set the country code (option country in the wifi-device section, on dual band set it on both devices) to a country where channel 13 is allowed, the 2.4 should come up and join the lan bridge. If channel 13 is not allowed in your country, change the channel to one that is.
Above you can see path. That lets OpenWrt configure my 2.4 GHz wireless physical device no matter if Linux kernel assigns it a name wlan0 or wlan1 or whatever (or PHY 0 or 1 or whatever).
So you don't need to see wlan0 in /etc/config/wireless in order for OpenWrt to configure your physical wireless device.
PHY id is assigned by Linux kernel based on order of devices probing. Default interface uses wlan<PHY_ID> name (e.g. wlan0 for PHY ID 0).
OpenWrt tries to recreate interfaces and AFAIR by default it uses:
wlan<PHY_ID> syntax for the first interface
wlan<PHY_ID>-<INTERFACE_ID> syntax for extra interfaces
Really: those are just names you just probably shouldn't care about them too much.