I recently installed OpenWRT on a Xiaomi AC2100. My device now works as a wireless AP and as a switch for wired devices connected to the LAN ports. I did the setup using this guide. The WAN port doesn't work so Im not using it. The only thing that doesn't work now is updating the package list in software.
Why? Cause apparently the DNS configuration is off and I have no idea how to fix it. I have set the DNS server as the ip of the cable modem but to no avail. Im typing this on a connected device by giving that device the 1.1.1.1 DNS ip. Then everything works fine. That trick doesnt work for OpenWRT however and if I remove 1.1.1.1 as the specified DNS server any connected device will not load any pages as it apparently cannot find the DNS server.
cat /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 packet_steering '1'
option ula_prefix 'fd9d:b352:67a8::/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 gateway '192.168.178.1'
list dns '192.168.178.1'
list ipaddr '192.168.178.4/24'
config interface 'wan'
option device 'wan'
option proto 'none'
config interface 'wan6'
option device 'wan'
option proto 'none'
config interface 'wwan'
option proto 'dhcp'
That is a good question. So are you saying the DNS is configured properly but something fishy is going on traffic wise? Its weird to me that a computer connected by cable to OpenWRT with a DNS set works fine until I remove the DNS, then everything stops working and the computer acts like OpenWRT does with no traffic coming in.
The situation is as follows:
192.168.178.1 -> ISP modem: Handles DHCP, Firewall etc, only WIFI is disabled (its bad).
192.168.178.2 -> Airport Extreme on bottom floor set to bridge mode.
192.168.178.3 -> Airport Extreme on second floor set to bridge mode.
192.168.178.4 -> the Xiaomi with OpenWRT for the top floor (still trying to set it to bridge mode).
The reason why Im using dumb access points is due to my parents. When the internet stops working they have the habit of contacting the ISP which resets the modem to default. If I setup the modem as a dumb modem and that happens I have to reconfigure their whole house again. Hence this solution. If its now reset I only need to disable the standard WIFI network next time Im over.
To make sure you're not serving dhcp yourself, in here, set dhcpv4 to disabled, or you can remove all the lines except ignore 1. Ignore is a deprecated setting and you have it in conflict with the new setting dhcpv4 'server'.
I usually set dumb APs to be DHCP client. Then they automatically follow the configuration of the main router (which you have noted, is subject to change beyond your control). This does require being able to log into the main router and examine its DHCP lease table to find the dumb AP's LAN IP, the main router supporting local DNS, or having another way to log into the dumb AP such as an administration network.
Is it the dumb AP that is experiencing DNS issues, or the clients that are connected to this AP?
In general, if the AP doesn't have working DNS, it's not critical unless you are doing things like installing additional packages or running certain types of services. Obviously the clients need to have DNS, though.
If your AP has a DHCP server active, it can serve improper DHCP to the whole network including of course clients connected to the AP. The dump AP will advertise itself as DNS and default route though those are supposed to be handled by the main router. This will cause loss of Internet access.