EDIT: Fixed error, mikrotik<>openwrt cable should have untagged 192.168.1.0/24 and tagged vlan id 20 192.168.20.0/24
Something very wrong with vlans on xiaomi ac2100 or PEBCAK.
+---------------+ +-------------------+ +----------------------------------------+
| | | | | |
| | untagged 192.168.1.0/24 | mikrotik | untagged 192.168.10.0/24 | openwrt |
| router +---------------------------->| +--------------------------->| |
| | vlan 10 192.168.10.0/24 | vlan switch | vlan 20 192.168.20.0/24 | vlan switch |
| | vlan 20 192.168.20.0/24 | | | + dumb ap |
+---------------+ +-+-----------------+ +-+-----------------------+--------------+
| | |
| | |
| | |
|untagged 192.168.1.0/24 |untagged |untagged
| vlan 10 192.168.10.0/24 |192.168.10.0/24 |192.168.20.0/24
| vlan 20 192.168.20.0/24 | |
| | |
| | |
v v v
+-------------------+ +------------------+ +-----------------+
| | | | | |
| desktop | | nas | | notebook |
| | | | | |
| vlans | | | | |
| | | | | |
+-------------------+ +------------------+ +-----------------+
Everything works fine except openwrt vlan setup.
I have several network (dhcp, routing and firewalling on router), main two are:
192.168.10.0 - trusted hosts
192.168.20.0 - less trusted hosts
There are interfaces on openwrt:
lan1@eth0 - cable from mikrotik, there are untagged (192.168.10.0) and vlan10 (192.168.20.0) traffic
lan2@eth0 - cable to nas, only untagged (192.168.10.0)
lan3@eth0 - cable to notebook, only untagged (192.168.20.0)
wan - only untagged (192.168.20.0)
wifi ap which will be linked to "openwrt interface" of bridge br-lan10 (see below)
Don't know what lanX interfaces have in common with eth0 and what eth0 actually is. Maybe some sort of switch?
I've created new interface with vlan 20 on lan1.
Then created two bridges:
- br-lan10 with ports lan1, lan2
- br-lan20 with ports lan1.20, lan3, wan
Then i created "openwrt interfaces" for those bridges with static ipv4 addresses. Because otherwise openwrt would not create bridges, thank you very much.
At this moment my network 192.168.10.0 works fine - all ports and wifi work as they should.
I can't say the same about 192.168.20.0:
- i can ping from (router, desktop) to openwrt
- i can NOT ping from (router, desktop) to notebook
After maaany hours i found half-working solution - enable vlan filtering on br-lan20. Add random vlan id (why? i've tried several different, doesn't matter) with U|* for every port in this bridge (lan1.20, lan3, wan)
Now:
- i can NOT ping from (router, desktop) to openwrt
- i can ping from (router, desktop) to notebook
Another workaround - change "openwrt interface" device from br-lan20 to br-lan20.20, now openwrt is also pingable.
But there is no way to create wifi ap on this bridge. When trying to link wifi ap to "openwrt interface" owrt_br_lan20 - no traffic goes through wifi. When trying to link wifi ap to something like owrt_br_lan20.20 luci says "Expecting: valid UCI identifier".
Also cpu on openwrt ~50% used when testing desktop<>notebook connection with iperf3 (one direction, 500Mbit/s)
So:
- openwrt
- shitty xiaomi hardware
- pebcak
?