openwrt / openwrt

This repository is a mirror of https://git.openwrt.org/openwrt/openwrt.git It is for reference only and is not active for check-ins. We will continue to accept Pull Requests here. They will be merged via staging trees then into openwrt.git.
Other
19.63k stars 10.25k forks source link

MT7622 (Belkin RT3200) Wifi connection fails after roaming #11277

Open schuettecarsten opened 1 year ago

schuettecarsten commented 1 year ago

The issue described in #11029 still exists on todays SNAPSHOT version (r21306-49bbfd9968). It is not reproducable with 22.03-SNAPSHOT. I create this new issue because 11029 is closed and there are several other issues about connection/packet loss with MediaTek chipsets.

I can see that the client connects to the router using 2,4 GHz Wifi (MT7622 chipset) and is shown correctly in the list of connected clients in the AP "Wireless" Luci page. But then, Wifi connection is shown with "exclamation mark" (Android) and seconds later, it is completely lost. No helpful output in system log, no crashes.

schuettecarsten commented 1 year ago

Here are some configs:

wireless (wifi keys removed):

config wifi-device 'radio0'
    option type 'mac80211'
    option path '1a143000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
    option band '5g'
    option cell_density '2'
    option country 'DE'
    option channel '100'
    option txpower '26'
    option htmode 'VHT160'

config wifi-device 'radio1'
    option type 'mac80211'
    option path 'platform/18000000.wmac'
    option channel '1'
    option band '2g'
    option country 'DE'
    option htmode 'HT40'
    option txpower '14'
    option cell_density '2'

config wifi-iface 'wifinet0'
    option device 'radio0'
    option mode 'ap'
    option encryption 'psk2+ccmp'
    option key '***'
    option ieee80211w '1'
    option network 'lan'
    option time_advertisement '2'
    option time_zone 'GMT0'
    option ieee80211k '1'
    option bss_transition '1'
    option wnm_sleep_mode '1'
    option rrm_neighbor_report '1'
    option rrm_beacon_report '1'
    option ssid 'Dummi'
    option ifname 'wlan1'

config wifi-iface 'wifinet1'
    option device 'radio1'
    option mode 'ap'
    option encryption 'psk2+ccmp'
    option key '***'
    option ieee80211w '1'
    option network 'lan'
    option time_advertisement '2'
    option time_zone 'GMT0'
    option ieee80211k '1'
    option bss_transition '1'
    option wnm_sleep_mode '1'
    option rrm_neighbor_report '1'
    option rrm_beacon_report '1'
    option ssid 'Dummi'
    option ifname 'wlan0'

config wifi-iface 'wifinet2'
    option device 'radio0'
    option mode 'ap'
    option encryption 'psk2+ccmp'
    option key '***'
    option ieee80211w '1'
    option network 'guest'
    option ssid 'Dummi Gastzugang'
    option time_advertisement '2'
    option time_zone 'GMT0'
    option ieee80211k '1'
    option bss_transition '1'
    option wnm_sleep_mode '1'
    option rrm_neighbor_report '1'
    option rrm_beacon_report '1'
    option isolate '1'
    option disabled '1'
    option ifname 'wlan1-guest'

config wifi-iface 'wifinet3'
    option device 'radio1'
    option mode 'ap'
    option encryption 'psk2+ccmp'
    option key '***'
    option ieee80211w '1'
    option network 'guest'
    option ssid 'Dummi Gastzugang'
    option time_advertisement '2'
    option time_zone 'GMT0'
    option ieee80211k '1'
    option bss_transition '1'
    option wnm_sleep_mode '1'
    option rrm_neighbor_report '1'
    option rrm_beacon_report '1'
    option isolate '1'
    option ifname 'wlan0-guest'

network (only lan, guest and wifi; vpn/wan removed):

config device
    option name 'br-lan'
    option type 'bridge'
    list ports 'br-eth.1'
    option igmp_snooping '1'
    option igmpversion '3'
    option mldversion '2'
    option mtu '1496'

config interface 'lan'
    option device 'br-lan'
    option proto 'static'
    option metric '0'
    option ip6assign '64'
    option ip6ifaceid '::1'
    option ip6weight '2'
    option ipaddr '192.168.178.1'
    option netmask '255.255.254.0'

config device
    option type 'bridge'
    option name 'br-guest'
    option bridge_empty '1'
    list ports 'br-eth.2'
    option igmp_snooping '1'
    option mtu '1496'

config interface 'guest'
    option proto 'static'
    option device 'br-guest'
    option ipaddr '192.168.3.1'
    option netmask '255.255.255.0'
    option metric '1'
    option ip6assign '64'
    option ip6ifaceid '::1'
    option ip6weight '1'

config device
    option type 'bridge'
    option name 'br-eth'
    list ports 'lan1'
    list ports 'lan2'
    list ports 'lan3'
    list ports 'lan4'
    option igmp_snooping '1'
    option igmpversion '3'
    option mldversion '2'

config bridge-vlan
    option device 'br-eth'
    option vlan '1'
    list ports 'lan1:u*'
    list ports 'lan2:u*'
    list ports 'lan3:u*'

config bridge-vlan
    option device 'br-eth'
    option vlan '2'
    list ports 'lan1:t'
    list ports 'lan4:u*'
schuettecarsten commented 1 year ago

Possible root cause by @cmonroe from 11029:

I had a very similar issue and can't recall what the fix is on kernel 5.10 / OpenWrt 22.03. [...] From what I recall, the MAC entry gets stuck on the MT7531 switch LAN port feeding your extender.. when you roam back to the root AP it will receive your packets from WiFi but forward responses out the LAN port where the MAC entry is stuck.

schuettecarsten commented 1 year ago

Fixed by the patch attached to https://github.com/openwrt/openwrt/issues/9706#issuecomment-1326281353

victordou commented 1 year ago

I have similar hardware xiaomi ax6s as a dumb ap, and had the same problem when I use vlan on 22.03.2. So I switched to OpenWrt SNAPSHOT r21376. I think the problem is solved. Maybe fix by this commit https://github.com/openwrt/openwrt/commit/3dff6b53db1c568b957e7bde15eb5e049ea978ce