Dear all,
I have installed OpenWRT weeks ago and still I can't solve the fact that sometimes devices do not get connected to my guest network. 90% of the time a router reboot solves the issue but after less than a day it still happens.
I have enabled guest wifi with firewall rules, and I also have AdGuardHome installed on router as my DNS resolver.
Which config file should I post in order to help troubleshoot the issue?
Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
This post provides a template for setting up a WiFi gateway router with guest and IOT networks. The post preceding that linked and its linked posts provides some more examples for more complicated arrangements. One of these examples may help you get your set up working.
Thank you, here are the configs. I have to mention I installed AdGuardHome using opkg and it successfully moved dnsmasq to port 54 in order to use port 53. My main network has an IP of 192.168.93.x and my guest network is 192.168.92.x because I am behind an ISP modem/router which provides internet to the neighbourhood. This is the reason of not using the default 192.168.1.1.
My main network works perfectly with AdGuard and there are no connection issues whatsoever. The Guest network also works with AdGuard (when it works, other times it struggles to make clients connect).
/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 globals 'globals'
option ula_prefix 'fd6b:44c5:b7ac::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.93.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'wan'
option device 'wan'
option proto 'dhcp'
option peerdns '0'
config interface 'wan6'
option device 'wan'
option proto 'dhcpv6'
option dns '2620:fe::fe 2620:fe::9'
option peerdns '0'
config interface 'guest'
option proto 'static'
option ipaddr '192.168.92.1'
option netmask '255.255.255.0'
I gave myself I few days to test various guest devices and indeed that was the issue! Thank you!
For a newbie like me it wasn´t clear what bridge is and that I have to create a new "device". I followed a few guides for guest network but haven´t found this concept. Can you confirm that bridge is needed only because of two radios? I enabled two radios and gave the same name so Wi-Fi 6 can be used.
And regarding other things I might want to re-evaluate, can you give some examples? One thing I have not fully understood are these DHCP settings, are they correct? I know DHCP is resposible of IPs assignment
config for lan interface
list dhcp_option '6,192.168.93.1'
list dhcp_option '3,192.168.93.1'
config for guest interface, there's only this
list dhcp_option '6,192.168.93.1'
Are there the things I should re-evaluate? Also I noticed that guest network do not have IPv6 enabled, is that important?
Yes. If you were only using a single physical interface (one radio or Ethernet), a bridge would not be required. When you use two or more physical interfaces, a bridge is necessary.
I’d recommend removing these. They are not necessary (the router’s address will be automatically provided when you omit these options). And for the guest, it will issue the dns server that is the guest interface address (192.168.92.1)
I put them following some answers here on the forum regarding guest clients not able to obtain IP addresses. Also I need that DNS to be provided by AdGuardHome which I suppose operates on 192.168.93.1 that's why it's there for the guest network.
Option 3 is the gatway/router address that is advertised via DHCP to the clients. This will always be the local address of your router on that network unless you override it... here you're overriding it with the same local router address, so it shouldn't be required. Option 6 does the same thing for DNS, and again, it shouldn't be required for the lan since it would (by default) send the same address anyway.
On the guest network... you could configure AGH to also listen on 192.168.92.1 and then it wouldn't be necessary to set the option 6 for the guest network. But either way is fine.