I use OPNsense as my router, and now I start using OpenWRT as dump AP. I have followed the wiki instruction, everything goes well until I found that any device cannot get the WiFi connection. In Android devices, it stucks at the process Obtaining IP address until timeout. firewall, dnsmasq, odhcpd are all disable, and the firewall rule in OPNsense have not configure yet (able to access internet and its own local area network).
There's three interface connect to my AP: lan, user, guest, suppose just shown in lan, user and guest are giving WIFI access for different devices. I've just create one WiFi connection and found that it doesn't work even I switch different networks(lan/user/guest). The platform is x86 and chipset of the AP is MT7921.
Here's my /etc/config/network and /etc/config/wireless
* */etc/config/network* *
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'lan'
option proto 'static'
option device 'eth0'
option ipaddr '192.168.1.2'
option netmask '255.255.255.0'
option gateway '192.168.1.1'
list dns '192.168.1.1'
option type 'bridge'
config interface 'user'
option proto 'static'
option device 'eth1'
option type 'bridge'
option ipaddr '192.168.10.2'
option netmask '255.255.255.0'
option gateway '192.168.10.1'
list dns '192.168.10.1'
config interface 'guest'
option proto 'static'
option device 'eth2'
option ipaddr '192.168.11.2'
option netmask '255.255.255.0'
option gateway '192.168.11.1'
list dns '192.168.11.1'
option type 'bridge'
if you have three connection cables between this device and your OPNsense router you can set your eth1 user interface as dhcp and verify that it obtains an IP address from the OPNsense router
It is not generally advisable to use an x86 system for an AP because you will typically get lower wifi performance than a proper purpose-built AP (or all-in-one wifi router), and you will also typically use considerably more electrical power than a dedicated AP. But assuming there are no issues with your wifi chipset being used in AP mode, it will function.
So... on to fixing things:
The AP should only have an address on a single network -- the network that is used to manage the device (typically either the most trusted lan or a dedicated management network). What network is used for this purpose?
Are there 3 unique upstream routers (i.e. 192.168.1.1, 10.1, and 11.1) or is this all coming from a single router? If a single device, what is it (ubus call system board -- assuming it is running OpenWrt)
So... As I mentioned there are three networks on my AP.
lan (192.168.1.1): The most trusted area network. I want this network be the only network that able to manage the OpenWRT AP with LuCI or ssh but nothing else.
user (192.168.10.1): This network is supposed to give specific members' devices network access by WiFi, and able to access some services inside my lan.
guest (192.168.11.1): This network is supposed to give guests/other members' devices network access by WiFi only. But I haven't try that yet.
They are all coming from a single router, my OPNsense.
The ubus call system board is on above. And that is the only information I can get after command ubus call system board . Is it suppose to have more information?
Then this network will be the only one that has an address on the OpenWrt side.
These other two will be unmanaged (no address, just a wired-wireless bridge).
Why are you using 3 physical connections? Have you considered using VLANs instead?
This is only relevant for the OpenWrt side of things -- I asked in case we were talking about another OpenWrt device as your main router; irrelevant given that you are using OPNsense.
So...
First things first, you must define bridges outside the network stanzas like this:
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0'
config device
option name 'br-user'
option type 'bridge'
list ports 'eth1'
config device
option name 'br-guest'
option type 'bridge'
list ports 'eth2'
Next, we'll edit the lan to use br-lan and we'll get rid of the bridge:
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.1.2'
option netmask '255.255.255.0'
option gateway '192.168.1.1'
list dns '192.168.1.1'
And finally, we'll make the other two networks unmanaged and they will use their respective bridges:
config interface 'user'
option proto 'none'
option device 'br-user'
config interface 'guest'
option proto 'none'
option device 'br-guest'
Reboot and test. I expect that it will work.
I would recommend using VLANs instead of 3 individual ports, and I also would encourage you to consider a proper wifi AP rather than an x86 device. But, the above stuff should work in general.