Updated to 21.02.0 (ath79), DNS not working in LAN

I just updated my TP-Link Archer C7 AC1750 v2 from 19.07.8 (ar71xx) to 21.02.0 (ath79). Everything seems to have updated fine, except computers in the LAN can't seem to use the OpenWrt DNS. I can ping 8.8.8.8 fine, but not google.com. If I connect with a VPN, I can ping google.com

I've tested ssh-ing into the router, and I can ping google.com fine from there. The OpenWrt GUI overview shows my ISP's DNS servers correctly. I also tried manually setting the LAN DNS to 8.8.8.8, but that didn't help.

/etc/config/dhcp

config dnsmasq
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.auto'
	option nonwildcard '0'
	option domainneeded '1'
	option localservice '1'
	option authoritative '1'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option dhcpv6 'server'
	option ra 'server'
	option leasetime '500h'
	option ra_management '1'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'
	list ra_flags 'none'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'

config host
	option ip '192.168.1.81'
	option name 'system-home'
	option mac '<redacted>'

config host
	option ip '192.168.1.91'
	option mac '<redacted>'
	option name 'alarmpi'
	option dns '1'

config host
......
......

I'm not entirely sure why some hosts have option dns '1', but regardless, both permutations fail.

/etc/config/network

config interface 'loopback'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'
	option device 'lo'

config globals 'globals'
	option ula_prefix 'fd48:cb6b:f30d::/48'

config interface 'lan'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ipaddr '192.168.1.100'
	option device 'br-lan'
	list dns '119.40.106.35'
	list dns '119.40.106.36'

config interface 'wan'
	option proto 'dhcp'
	option device 'eth0'
	option type 'bridge'

config interface 'wan6'
	option auto '0'
	option proto 'dhcp'
	option device 'eth0'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '0 2 3 4 5'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '1 6'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth1'

How can I connect to the OpenWRT DNS from my LAN?

Have you restored the old ar71xx 19.07 DHCP settings from a backup into the new ath79 21.02.0?
To me it looks like you have outdated settings for resolvfile.

Should be:

option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'

Like this in /etc/config/dhcp:

config dnsmasq
        option domainneeded '1'
...
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'

There is a 19.07 --> 21.02 migration uci-defaults script, but that gets run just once on the first reboot after the flashing, but does not get run if you restore settings later...

8 Likes

Brilliant. That works perfectly. Thank you @hnyman!

Because I was also doing ar7xx -> ath79 (along with 19.07 -> 21.02), I followed the instructions here, which suggested restoring the backup.

Are there any other migration steps that I might have missed then? Should I manually run the script?

Not really.
That DHCP resolvfile was pretty much the only major feature-breaking migration thing (from January 2020...).

(At least that was was only one that I needed to build a downgrade logic for going back into 19.07, when I was testing my 19.07/master community builds, before 21.02 was even branched.)

1 Like

Thanks again @hnyman. Thank you for the super quick and informative reply.
That's awesome. I've just donated, thanks in part to the brilliant support here! Cheers.

1 Like

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