[Solved] Issue unbridging LAN and WLAN

Trying to disentangle LAN and WLAN on my HW-C108 with OpenWRT 19.07.2. Background is that the sole LAN port is to eventually become a WAN port. Right now I keep it with LAN settings so that I have a redundant login path until the WLAN works propely, to prevent the device from locking me out.

The install image comes with WLAN unconfigured, so I use the LAN port for initial setup. Only interface is br-lan, which I edit (using LuCI) by unchecking the "bridge" checkmark, keeping eth0.1 as the PHY for this interface. Works.

Now I set up a second interface, and set it to use the WiFi PHY. Then I go to Network/Wireless to set up the PHY configuration, which is straightforward except for a bug (probably in LuCI, see below). After I got the wireless PHY working (able to log in via WiFi), I go back to Network/Interfaces and find miraculously the new interface has bridging set now! It is now bridged with the eth0.1 interface which is still also the PHY of the original interface.

I do not understand how that happens, and in any case, it is detrimental to my usage case. But when I uncheck the "bridge" checkmark, choosing to keep the WLAN in the interface, WLAN access stops working (The SSID is still visible, WiFi clients can connect, but cannot reach LuCI). Visually that is indicated by the error label "Network device not present" attached to the new (WiFi) interface. But the PHY is there and working!

What's going on? Is there any automatic mechanism at work that sets up bridging automatically under certain circumstances? How can I prevent this from happening?

Regarding the (presumed) LuCI bug, it may have to do with me using mixed case letters in the name of the new interface. When I set up the wireless PHY configuration, IIRC unter the General tab there is a combo box to choose the interface this configuration belongs to. When I choose the new interface, and save the config, then go back to edit, I find just as before no interface is selected! So the setting is not kept. But the combo also has a custom field where I can explicitly type in the interface name, and in that case the selection sticks and is saved.

Here are some configuration files:

/etc/config/network

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fde6:025f:4014::/48'

config interface 'lan'
	option ifname 'eth0.1'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config device 'lan_eth0_1_dev'
	option name 'eth0.1'
	option macaddr 'a2:e4:b9:xx:xx:xx'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '4 6t'

config interface 'WiFi'
	option proto 'static'
	option netmask '255.255.255.128'
	option ifname 'radio0.network1 eth0'
	option gateway '192.168.4.127'
	option type 'bridge'
	option ipaddr '192.168.4.129'

/etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '11'
	option hwmode '11g'
	option path 'platform/10180000.wmac'
	option htmode 'HT20'
	option txpower '20'
	option country 'DE'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option mode 'ap'
	option ssid 'myssid'
	option wpa_disable_eapol_key_retries '1'
	option key 'passphrase'
	option encryption 'psk2'
	option network 'WiFi'

Remove these from the WiFi interface:

	option ifname 'radio0.network1 eth0'
	option gateway '192.168.4.127'
	option type 'bridge'

And assign WiFi to lan firewall zone.

I had the same thought, independently: Perform the change manually. The interface I had included in the 'lan' firewall zone before.

So using an editor I took out the 'gateway' and 'type' lines, but kept the 'ifname' of course, however removed the ' eth0' part. Restartet the network system and: Lo and behold, everything is fine!

So obviously I have stumbled over another LuCI-bug ... :frowning:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.