Omnia and second AP - local IP address not accessible when moving between WLAN, internet working

Hi Guys,

this is something why I am scratching my head for quite some time. I am no expert in this territory, so it might be something trivial. But I would really appreciate your help.

Here is the short description of the behaviour.
Omnia used as the main router with WiFi enabled, TP-Link TL-WR1043ND v2 running OpenWRT used as an AP. TP-Link is configured as per OpenWRT guide. TP Link is connected to its LAN port.
The problem I am facing is, when I move the phone around the house or manually switch from Omnia WiFi to TPLink WiFi all works as expected, but when I move back to Omnia, I lose access to local IP addresses. Then after around 4minutes 15sec (it varies between 4:00 to 4:30, though most of the times it is 4:15) the local IPs are accessible.
Internet is accessible all the time even right after the wifi change when I move back and forth between WiFis. No issues there.

What could be wrongly set? It is probably like that ever since, only now I have noticed it when I can’t access my home automation stuff when moving around the house.
I have reflashed Omnia to be sure, nothing is messed up. So on top of factory settings, I have few static leases. That’s all.

I wanted to replace TP-Link with MOX, but that is even more messed up. There I can’t get IP address when connecting via MOX WiFi (LAN connection works). But I reckon, that is not related, so let’s discard Mox problem for time being.

Thanks a lot,
Libor

For the MOX problem you should try setting wifi on it in WDS ap mode not normal ap. I have similar setup and I faced the same issue.

Edit:
For the first problem you could try adding roaming functionality to your setup following this:

And this:

But roaming requires you to have the same SSID on every roamed network. I have roaming enabled between 2.4GHz and 5Ghz. Still not sure if its working.

Thanks, I will look into it, though it sounds a bit strange, that I should be going with WDS connection between two hotspots instead of using cat-5 which is in place.

And regarding the roaming. That pretty much works for me. When I move around the house, the phone changes the AP it is connected to. Not immediately, but if I go to the farthest corner from the wifiA then it jumps to wifiB and the other way around. Both WiFis have the same SSID, different channel.

What doesn’t work is, when I move from one AP to the other I loose access to local IP addresses (RPi) for a while. That RPi is of course up and running and I can see that while pinging from my laptop connected to ethernet. If I move the phone (or second laptop) between APs I can see, internet is available and accessible all the time and immediately once I jump from wifiA to wifiB or back. But I can’t access that RPi. However when I wait long enough (around those 4 minutes 15 sec) then I can access the RPi again.
It looks to me, like some routing tables are not updated or are updated after a while.
Anyway I will run those tests again, this time with the laptop running several ping sessions to RPi, internet and I will try to move it between the wifiA and wifiB to understand the behaviour.

[Edit:]

So I have run those tests again and it works like this:

as you can see, there is gap of 4:06 in which time I did nothing, was just watching the screen. Obviously the RPi is up and running, so that is not the culprit.

I didn’t mean that. You SHOULD use cat5 cable between ap’s and router if possible. But on your OpenWrt Access point try setting wifi in Wireless settings. Here

And let me know if you get IP from your AP when connected with setting this option.

So the behavior, regardless the Access Point of Access Point (WDS) settings is the same and weird.
If I fire MOX up and try to connect with my laptop to WiFi, it works, I get IP and I can access internet, intranet. Once I move to Omnia WiFi, I have access to internet, RPi is not accessible (as described earlier). And then when I try to move back to MOX, then I get no IP address and the whole thing fails, and returns to Omnia WiFi after couple of fails.
If I however “forget” the Omnia WiFi during the time it is trying to get to Mox, it keeps trying and roughly after 5 minutes it actually get’s the IP and all works well.

Now the question is, where is this around 5mins in this case and around 4:15 in case of inaccessible RPi IP coming from? :thinking:

Check this:

I had similar problem and resolved it by these 2 commands:

/sbin/brctl setageing br-lan 0
/sbin/brctl stp br-lan on

the bridge somehow remember if he has last time seen the device on LAN from second AP or on WIFI and it take some time until he loose this record. With setting the aging to 0 I am now able to move around the whole house and Omnia and 3 mox devices are roaming me direct during walking through the house.

2 Likes

so that didn’t do the trick unfortunately, not sure why, as the explanation you gave make sense and should actually work, anyway, I will try again once I have a bit more time. And if I have no luck, I will try the WAN solution, that needs a bit more work, so I need to find a bit more time.

Thanks anyway,
Libor

Did you set Spanning tree protocol on both APs and aging=0 on both APs as well?

I did, though I am not sure, how to print out the aging status. I see, STP enabled on both.
image

image

Just to be sure, is this correct bridge setup? And should STP be enabled here as well?

to verify aging, you can use

cat /sys/devices/virtual/net/br-lan/bridge/ageing_time

there is comand

bridge fdb

that can show where the bridge thinks the respective device is located. It need to change from WLAN to LAN instant when you move with your device from one wifi to other.

Network cable you have connected to LAN port and not WAN port, right? Also DHCP server must be enabled only on one router.

1 Like

So the aging is set, though it disappears after restart. Anyway, even with ageing set it has the same behavior.

And while checking the forwarding database entry, I have found out, that one particular device is listed twice when I reboot TO and the device connects to the TO WiFi:
00:xx:xx:xx:xx:xx dev lan0 master br-lan
00:xx:xx:xx:xx:xx dev lan0 vlan 1 self

Once I set ageing to 0 the first record disappear and only the second one is present:
00:xx:xx:xx:xx:xx dev lan0 vlan 1 self

And that is the case no matter if I move from TO to TPLink or I move back to TO.

Yep, ethernet cable from TO is going to LAN port of TPL and DHCP, firewall, dnsmasq is disabled.

Libor