Wireless subnet: Switching works, routing not

I just can't get my Wifi to connect to the internet. LAN is working perfectly. Layer 2 frames on the wifi interface get switched, but not routed to other subnets. Although I can't see anything other than stupid mDNS, ICMP and ARP packets, DHCP seems to be working (Using Wireshark remote).

My APU router with a Compex WLE900VX is configured like so:
Network

config interface 'wan'
        option ifname 'eth0'
        option proto 'dhcp'
        option hostname 'fritz.box'

config interface 'lan'
        option proto 'static'
        option ifname 'eth1 eth2 eth3'
        option type 'bridge'
        option netmask '255.255.255.0'
        option ipaddr '192.168.1.0'
        option broadcast '192.168.1.255'
        option gateway '192.168.1.1'

config interface 'wifi'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.2.0'
        option gateway '192.168.2.1'

Wireless (complete)

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '36'
        option hwmode '11a'
        option path 'pci0000:00/0000:00:02.5/0000:05:00.0'
        option htmode 'VHT80'
        option country 'DE'

config wifi-iface 'wifinet0'
        option ssid 'OpenWrt'
        option encryption 'psk2'
        option device 'radio0'
        option mode 'ap'
        option network 'wifi'
        option key 'some key'

DHCP

config dhcp 'wifi'
        option start '100'
        option leasetime '12h'
        option limit '150'
        option interface 'wifi'

Firewall (complete)

config defaults
        option input 'ACCEPT'
        option forward 'ACCEPT'
        option output 'ACCEPT'

config zone
        option name 'wan'
        option input 'ACCEPT'
        option forward 'ACCEPT'
        option masq '1'
        option output 'ACCEPT'
        option network 'wan'

EDIT: Forgot to mention that there's another router behind my APU. But as I said, LAN is working with that.
Thanks in advance

not valid IPs

Also remove the gateways from wifi and lan.
I don't see firewall zones for lan and wifi.

1 Like

It actually works now. The minimum that was necessary, was:
uci delete network.lan.gateway
uci delete network.wifi.gateway
uci set network.lan.ipaddr=192.168.1.1
uci set network.wifi.ipaddr=192.168.2.1
service network restart

I even remember reading this multiple times the last few days. I can't believe I missed that. It was probably the main reason.

But isn't the gateway used by client's so that they can fill in their standard gateway and the standard route?

Nonetheless. Thank you very much!

It works without firewall zones because you have in the defaults forwarding accept.

No, this is not where you specify it. It is announced automatically with the IP of OpenWrt for the that interface.
What you were specifying was gateway for the router itself.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.