Hello! I have OpenWRT running on x86_64 with this 4-port network device:
Intel Corporation Ethernet Controller I225-V (rev 03)
When there are no VLANs configured, devices connected to this OpenWRT router can communicate with each other and with the OpenWRT machine. As soon as I enable my VLAN configuration, they cannot communicate with each other but they can still communicate with the OpenWRT machine.
# from machine A to B
user@machine-a:~$ ping 192.168.142.170
PING 192.168.142.170 (192.168.142.170): 56 data bytes
92 bytes from openwrt.lan (192.168.142.1): Destination Port Unreachable
Vr HL TOS Len ID Flg off TTL Pro cks Src Dst
4 5 00 5400 6d53 0 0000 40 01 6eaa 192.168.142.176 192.168.142.170
# from OpenWRT to A or B
root@OpenWrt:~# ping 192.168.142.176
PING 192.168.142.176 (192.168.142.176): 56 data bytes
64 bytes from 192.168.142.176: seq=0 ttl=64 time=3.228 ms
root@OpenWrt:~# ping 192.168.142.170
PING 192.168.142.170 (192.168.142.170): 56 data bytes
64 bytes from 192.168.142.170: seq=0 ttl=64 time=0.792 ms
I can also say that machine A knows the MAC address of machine B:
user@machine-a:~$ arp -a -n | grep 170
? (192.168.142.170) at b8:27:eb:c1:dd:6d on en0 ifscope [ethernet]
Why am I using VLANs? I have a 4G LTE modem/router running far away from the OpenWRT machine on the LAN's physical infrastructure, but segregated on its own VLAN as it's considered WAN by OpenWRT. This architecture works great, in fact, I'm using it right now with a temporary fix: I've connected all devices to a dumb switch connected to one of the OpenWRT ports - this way they can communicate with each other.
Here are the relevant parts of my configuration:
# /etc/config/network
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth1'
list ports 'eth2'
list ports 'eth3'
list ports 'zt<zero tier VPN port>'
config bridge-vlan
option device 'br-lan'
option vlan '1'
list ports 'eth1'
list ports 'eth2'
list ports 'eth3'
list ports 'zt<zero tier VPN port>'
config device
option type '8021q'
option ifname 'br-lan'
option vid '1'
option name 'br-lan.1'
config interface 'lan'
option device 'br-lan.1'
option proto 'static'
option ipaddr '192.168.142.1'
option netmask '255.255.255.0'
option ip6assign '60'
option delegate '0'
config bridge-vlan
option device 'br-lan'
option vlan '44'
list ports 'eth1:t'
list ports 'eth2:t'
list ports 'eth3:t'
config device
option name 'br-lan.44'
option type '8021q'
option ifname 'br-lan'
option vid '44'
config interface 'wan_lte'
option device 'br-lan.44'
option proto 'static'
option ipaddr '192.168.44.2'
option netmask '255.255.255.0'
option gateway '192.168.44.1'
option metric '20'
# /etc/config/firewall
config defaults
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
option synflood_protect '1'
config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'lan'
config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
list network 'wan_lte'
config forwarding
option src 'lan'
option dest 'wan'
Can you see where I'm going wrong or what I should try next?