Skip to content
Contents
GuidesOpenWrt

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

A router's LAN address can include a prefix length. DHCPv4 option 6 supplies IPv4 DNS server addresses to clients. If a deleted entry returns, record the interface address, the DHCP setting and the lease actually received by a client.

Identify the service writing the setting

Read these fields from a wired management session. The example assumes a DHCP pool named lan. If there are several pools, use the interface settings in LuCI to identify the one serving your test client. Keep the LAN up during this check.

uci -q get network.lan.ipaddr
uci -q get dhcp.lan.dhcp_option
nextdns version

With LAN address 192.168.4.1/22, the entry for advertising the router itself as the resolver is 6,192.168.4.1. DNS can also be advertised without an explicit option 6 entry. Check the lease. An older NextDNS implementation copied the LAN value directly. Upstream v1.50.2 parses a prefix and extracts the host address. Compare your installed version with its corresponding source. Other DNS packages may manage the same field.

Back up DHCP and NextDNS settings. On a test network, compare the option before and after service startup. If the unexpected value appears only with automatic router setup enabled, check the integration for that version. Use a compatible version or assign upstream management to a single service. Keep the management session open. If resolution fails, restore the old settings and reload only the affected services.

Renew the lease on one test client

Reconnect one test client to the wired network and read its IPv4 DNS list. On Windows, inspect the adapter with ipconfig /all. On Linux with NetworkManager, look for IP4.DNS in nmcli device show. The client's leased address and its default gateway are separate from the DNS option.

ip -n server62 -4 addr show dev svc62 | grep 'inet '
ip netns exec client62 udhcpc -B -i c62 -n -q -t 2 -T 1 -s /tmp/gm62/lease-env 2>/dev/null
awk '{print $3}' /tmp/gm62/leases

The isolated client prints its leased DNS address separately from the server interface prefix.

These commands accompany the recording. The server62 and client62 namespaces and the script printing lease variables belong to the isolated lab. Its DHCP server is 198.18.62.1 and it advertises 198.18.62.53 for DNS. At home, query a known name through the expected resolver, then try it with the application's default settings. If the outcomes differ, check the app's own DNS, IPv6 and other network interfaces.

Trace DNS leaks after enabling DoH on OpenWrt

How to verify the NextDNS profile a client uses through OpenWrt

Explore hardware

Comments