Skip to content
Contents
GuidesOpenWrt

Whose DNS changes with DHCP option 6 in OpenWrt?

To send PCs directly to a local resolver, change what their leases advertise. To change the router’s own upstream, check its interface and forwarder settings. These addresses can differ.

To send PCs directly to a local resolver, change what their leases advertise. To change the router’s own upstream, check its interface and forwarder settings. These addresses can differ.

Identify the client

Two isolated OpenWrt 25.12.6 VMs share a link. The first serves LAN at 192.168.8.1/24. The second takes a WAN lease. Run this on the second to read its IPv4 address, advertised DNS and default route. On a PC check the active adapter with ipconfig /all or resolvectl status.

ifstatus wan | jsonfilter -e '@["ipv4-address"][0].address' -e '@["dns-server"]'
ip route | grep default

OpenWrt 25.12.6 · DNS 192.168.8.1

Change one setting on the DHCP server

Record the original value. In LuCI open Network, Interfaces, edit the target LAN and find advanced DHCP server options. Add the line below or edit the existing option 6. Substitute a reachable resolver and test it from the client with nslookup example.org followed by its address. Omit /24 here. Save and apply.

6,192.168.8.53

Renew only the test client and repeat the checks. The screenshot cycles the lab client’s WAN. Keep your management link up. DNS changed from .1 to .53 while the gateway stayed .1. The lab tested delivery only, with no resolver running at .53.

DHCPv4 · DNS 192.168.8.53

If queries still use the old server

If the lease is unchanged, check the subnet and responding DHCP server. Otherwise test public and local names with the default resolver. Check browser secure DNS, VPN and IPv6. Option 6 does not control RA or DHCPv6. For the router’s upstream, inspect custom interface DNS, peer DNS and dnsmasq forwarding. Restore the old entry or remove the new one and renew. The lab returned to .1.

Why does DHCP option 6 return after OpenWrt reboots? Check NextDNS and the client lease

Explore hardware

Comments