DNS address for LAN

In the openwrt, the LAN interface can be attached to DNS servers are two places:

Option 1:
Luci >> Network >> interfaces >> LAN >> Advanced Settings >> click on + and Use custom DNS servers

Option 2:
Luci >> Network >> interfaces >> LAN >> DHCP Server >> Advanced Settings >> click on + for DHCP-Options and Use 6, DNS Servers

Is there any pointer that explains the difference in the two....

Much appreciate.

@chundla provided a clearer explanation, cudos.

1 Like

Thank you.

custom DNS servers in the advanced section defines the DNS server that this interface will use for forwarding DNS requests that come in.

DHCP-Options are what is advertised to the DHCP clients that connect via that interface.

Custom DNS servers: (googles DNS servers which get your DNS request of https://google.com and send back to your router an IP address(s))
DHCP-Options: 3, (your routers IP which will give a DHCP client an appropriate IP address depending on your DHCP IP range)

1 Like is cloudflare. is google.
Also DHCP 3 is gateway you should have 6 here for DNS.

DHCP option 6: which DNS (Domain Name Server) to include in the IP configuration for name resolution

DHCP option 3: default router or last resort gateway for this interface

and @agarg Custom DNS are your upstream DNS servers. Usually these are handed to you as part of your DHCP request to your ISP. This can be overridden however and let you bypass your ISP DNS for other DNS services. Basically your router uses those servers for DNS requests.

Using DHCP Option 6 passes a DNS server downstream to your clients via DHCP. This way you can tell them to use your DNS on the router or even pass on using an external upstream provider like google or cloudflare.

1 Like

Thank you.


BTW, this is incorrect - you would put these on WAN.

This is the DNS used by OpenWrt - OpenWrt issues its IP as the DNS server.

This assigns the DNS servers to the clients - bypassing the OpenWrt.

1 Like

I will have to read these messages a few times and test for my tiny mind and skills! Thanks again.

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