I have followed the openwrt user guide to configure one of my Turris Omnia's as an access point.
In a nutshell, I bridged the WAN (eth2) and LAN ports (lanX). The resulting lan interface is configured to receive an IPv4 and IPv6 address from the main router with DHCP. I use DHCP instead of a static address because that allows me to manage all static IP address inside my network on the main router.
This works fine, except for one thing: When I'm connected to the main router, I can't access the luci web interface of the access point. It only works when I'm connected to the access point itself. What am I doing wrong?
In the next step, I would like to add a guest wifi to the access point. My main router already has a guest network, so the plan is to configure two VLAN's on the WAN port of the access point (LAN=1 and GUEST=2), and change the configuration of the access point to:
config interface 'lan'
option type 'bridge'
option proto 'dhcp'
option hostname 'accesspoint'
option ifname 'eth2.1 lan0 lan1 lan2 lan3 lan4'
config interface 'guest'
option type 'bridge'
option proto 'static'
...
option ifname 'eth2.2'
Which protocol should I use for the guest interface? The access point itself should not be accessible from the guest network.
Why would you bridge the WAN and the LAN? Wouldn't it be more straightforward to make the WAN port a part of the LAN VLAN? This should solve the first problem I think.
The Turris Omnia is using the DSA driver to manage the switch, and not swconfig. Thus there is no swconfig based switch configuration. With the DSA driver, each switch port shows up as a normal network interface: eth2 for WAN port, and lan0..4 for the five LAN ports.
Make sure the DHCP server set up by default on lan is turned off. Check the IP addresses you're getting to see if they make sense. Your PC should get the same IP whether it is connected to a LAN port on the Omnia or to some other port "on the main router" since it is all the same network.
brctl show should show that the eth2 port is in br-lan.
Trying to ping the access point fails too, so ICMP is also affected. Basically every kind of connection (ping, ssh, http, etc). Strange thing is that sometimes it works just fine, and sometimes it doesn't.
I have been experimenting a bit this weekend, and it looks like the problem is related to switching between the two wireless networks. When connected to the access point everything works fine. But when switching to the wireless network of the main router, ping starts fails.
The log file below shows the ping output (with a timestamp prefixed), while switching between the two wireless networks:
$ ping -I wlp2s0 192.168.0.6 | awk '{ print strftime("[%s]"), $0; fflush(); }'
Connected to main router
[1579514238] 64 bytes from 192.168.0.6 (192.168.0.6): icmp_seq=1 ttl=64 time=5.01 ms
[1579514239] 64 bytes from 192.168.0.6 (192.168.0.6): icmp_seq=2 ttl=64 time=6.64 ms
[1579514240] 64 bytes from 192.168.0.6 (192.168.0.6): icmp_seq=3 ttl=64 time=5.55 ms
[1579514241] 64 bytes from 192.168.0.6 (192.168.0.6): icmp_seq=4 ttl=64 time=6.38 ms
...
[1579514249] 64 bytes from 192.168.0.6 (192.168.0.6): icmp_seq=12 ttl=64 time=6.37 ms
[1579514250] 64 bytes from 192.168.0.6 (192.168.0.6): icmp_seq=13 ttl=64 time=4.98 ms
[1579514251] 64 bytes from 192.168.0.6 (192.168.0.6): icmp_seq=14 ttl=64 time=2.52 ms
[1579514252] 64 bytes from 192.168.0.6 (192.168.0.6): icmp_seq=15 ttl=64 time=3.12 ms
Switching to access point
[1579514263] 64 bytes from 192.168.0.6 (192.168.0.6): icmp_seq=26 ttl=64 time=4.31 ms
[1579514264] 64 bytes from 192.168.0.6 (192.168.0.6): icmp_seq=27 ttl=64 time=1.78 ms
[1579514265] 64 bytes from 192.168.0.6 (192.168.0.6): icmp_seq=28 ttl=64 time=1.74 ms
[1579514266] 64 bytes from 192.168.0.6 (192.168.0.6): icmp_seq=29 ttl=64 time=3.38 ms
...
[1579514278] 64 bytes from 192.168.0.6 (192.168.0.6): icmp_seq=41 ttl=64 time=2.30 ms
[1579514279] 64 bytes from 192.168.0.6 (192.168.0.6): icmp_seq=42 ttl=64 time=3.64 ms
[1579514280] 64 bytes from 192.168.0.6 (192.168.0.6): icmp_seq=43 ttl=64 time=4.95 ms
[1579514281] 64 bytes from 192.168.0.6 (192.168.0.6): icmp_seq=44 ttl=64 time=4.64 ms
Switching back to main router
[1579514539] 64 bytes from 192.168.0.6 (192.168.0.6): icmp_seq=296 ttl=64 time=7.01 ms
[1579514540] 64 bytes from 192.168.0.6 (192.168.0.6): icmp_seq=297 ttl=64 time=5.11 ms
[1579514541] 64 bytes from 192.168.0.6 (192.168.0.6): icmp_seq=298 ttl=64 time=4.96 ms
[1579514542] 64 bytes from 192.168.0.6 (192.168.0.6): icmp_seq=299 ttl=64 time=3.89 ms
When switching to the access point there is no response for about 11 seconds. That's expected because the network went down, and re-associating with another wireless network takes a few seconds. But when switching back to the main router, there is no response for about 258 seconds (4.3 minutes)! So it looks like it works in the end, but it just takes a very long time. I don't understand why this happens.
If connect directly to the wireless of the main router, without being connected to the access point before (e.g. after having the wifi disconnected for a while), it works immediately too. With a wired connection to the main router, there is also no problem.
Did you post the same question on the downstream forum [1] or this just being an odd coincidence, considering that it sounds somewhat familiar? If not it might be an indication of some sort of generic problem if observed by different users.
Apparently some sort of timing issue with the AP, either:
in the bridge device, or
in the communication between bridge device and WLan device, or
in the WLan device
Since the issue does not exhibit on the Lan port the bridge device could likely be ruled out.
The time frame seems pretty distinctive considering that it matches the case reported on the other user forum. But neither seems to mention the frequency band that happens with, e.g. 2.4GHz or 5 GHz or both?
If it is only on the 5 GHz band then it might be caused by Dynamic Frequency Selection (DFS) scan. Not sure if client association is permitted during the scan but it certainly blocks traffic during such scan.
I have both 2.4 and 5 GHz networks with the same SSID. I didn't pay attention to which one I was connecting. I just tried with 5 GHz disabled, and it shows the same problem. So it's probably not the DFS scan. Note that during the time where pinging the access point fails, I can access the internet just fine (and also ping the main router). So it's not like I have no connectivity at all.
Note: the lan port was connected permanently. I didn't try to disconnect and reconnect there. That's not really a use-case in practice. With a wired network you're not going to roam between the two accesspoints like you do with wifi.