Confused on DNS configuration

I attempted to replicate the settings on my old WRT54Gv8.0 where I entered 3 dns servers; one from my ISP, two from an free DNS service. When I enter these setting in LEDE

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

config globals 'globals'
option ula_prefix 'fd1d:cbc2:5ea4::/48'

config interface 'lan'
option type 'bridge'
option ifname 'eth0'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.2.1'
option gateway '192.168.2.1'
option mtu '1492'
option dns '96.90.175.167 205.171.3.65 104.238.153.170'
option delegate '0'
option broadcast '192.168.2.255'

config interface 'wan'
option ifname 'eth1'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.1.2'
option gateway '192.168.1.1'
option mtu '1492'
option dns '45.32.230.225 23.94.60.240 96.90.175.167'
option delegate '0'
option broadcast '192.168.1.255'

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

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

In the above, only 96.90.175.167 remains as a manual entry. I have no idea where entries 45.32.230.225 23.94.60.240 came from. They did no come from my ISP
https://www.whatsmydns.net/dns/usa/centurylink.html
My modem connects to my ISP via pppOa. In my previous routers, the settings would persist.

I also confused about using a FQDN for my lan. When I now install Debian or OpenBSD /etc/myname is initially has the computer name followed by an appended 'lan'. Although a quick answer would be appreciated, I would actually like to be able to decipher the LEDE/OpenWRT documentation for /etc/config/dhcp and /etc/dnsmask.conf.

This looks like your /etc/config/network file. Usually DNS server settings are put in /etc/config/dhcp or /etc/dnsmasq.conf. Can you show us those two files?

If you remove the weird DNS sources from your config, do they come back after rebooting your router?

My modem connects to my ISP via pppOa. In my previous routers, the settings would persist.

If the config you listed is your /etc/config/network it may not be configured correctly for PPPoE. If your DSL router is operating in bridged mode your config interface 'wan' entry would probably need to look something like this:

config 'interface' 'wan'
option 'proto' 'pppoe'
option 'ifname' 'eth1'
option 'username' 'user'
option 'password' 'pass'
option 'timeout' '10'

I also confused about using a FQDN for my lan. When I now install Debian or OpenBSD /etc/myname is initially has the computer name followed by an appended 'lan'. Although a quick answer would be appreciated, I would actually like to be able to decipher the LEDE/OpenWRT documentation for /etc/config/dhcp and /etc/dnsmask.conf.

The .lan appended to your computer name is normal. It's the private, internal network equivalent of .com, .edu or .org. When your Debian or OpenBSD system requests an IP address via DHCP, the DHCP server also sends back the .lan.

It my be distracting to post my etc/config/dhcp and /etc/dnsmask.conf but if needed I'll be glad to post.

I setup my LAN with static addresses for wired connections and DHCP for wireless.

On my static wired connections I'm able to enter nameservers in /etc/resolv.conf. The issue is with the wireless devices and I think I have 2 options:

  1. Configure DNS nameservers in the router, ?where? and have my wireless LAN clients look up and bind to the router namerservers

  2. /etc/resolv.conf is written with each dhcp assignment but it is possible to append additional nameservers to /etc/resolv.conf with /etc/resolv.conf.tail.

What is confusing to me is that there seem to be multiple places to enter in nameservers for use by lan dhcp clients.

As far as the domain that is assigned to dhcp clients

I mainly use OpenBSD and have set the hostname of my main workstation according to the man page "man myname"

MYNAME(5) File Formats Manual MYNAME(5)

NAME
myname, mygate – default hostname and gateway

SYNOPSIS
/etc/myname
/etc/mygate

DESCRIPTION
The myname and mygate files are read by netstart(8) at system startup
time.

 /etc/myname contains the symbolic name of the host machine.  The file
 should contain a single line specifying the fully qualified domain name
 (FQDN) of the system (e.g. host.example.com).  The name must be
 resolvable, either by matching a hostname specified in /etc/hosts (see
 hosts(5)) or through DNS (see resolv.conf(5)).  The hostname is set via
 the hostname(1) utility at boot time.  See hostname(7) for a description
 of hostname resolution.
 /etc/mygate, if it exists, contains the address of the gateway host.  The
 gateway is added to the routing tables by the route(8) utility.  If
 /etc/mygate does not exist, no default gateway is added to the routing
 tables.  The file may contain gateway addresses for both IPv4 and IPv6
 networks: in dotted quad notation for v4 (e.g. 192.0.2.1) or in colon
 notation for v6 (e.g. 2001:db8::1).  Each address must be specified on a
 separate line.  If more than one address of a specific family is found,
 only the first is used - all other addresses of that family are ignored.
 /etc/mygate is processed after all interfaces have been configured.  If
 any hostname.if(5) files contain “dhcp” directives, IPv4 entries in
 /etc/mygate will be ignored.  If they contain “rtsol” directives, IPv6
 entries will be ignored.
 Empty lines and lines beginning with ‘#’ in either file are ignored.

FILES
/etc/myname Default hostname.
/etc/mygate Default gateway address(es).

For consistency, I would like to not have the "normal" .lan appended to my DHCP clients or have to rename my static workstation as host.lan (technically not a FQDN).

I had two options on the WAN settings with my ADSL modem. The ADSL modem (192.168.1.1) has some routing capability and I set up a subnet for the router (192.168.2.1). The modem has the capability to pass the ppp0a connection through to the router (confusingly called bridge mode).

Fwiw, /etc/config/network is where I put my dns, but only in wan, not lan, and I add -

option peerdns '0'

in wan, otherwise isp overrides everything, I assume adding isp dns manually after disabling with peerdns would still work, although I've never tried it.

I'd put your DNS servers into /etc/config/dhcp. As I understand it, /etc/resolv.conf on a LEDE box is a symlink to /tmp/resolv.conf, which has DNS servers inserted to it depending on other setting, i.e whatever DNSMasq picks up.

Here's what I've got in my /etc/config/dhcp

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

config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
list dhcp_option '6,192.168.1.158'
list dhcp_option '6,192.168.1.1'

The last two lines serve my specified DNS servers to any client making a DHCP request. My first DNS server(192.168.1.158) is a Synology NAS running a PiHole adblocking instance. The second DNS server(192.168.1.1) is my router, as a backup in case the Synology is down.

The two bold lines are what are adding the 'lan' to your host names. You can probably delete them or comment them out to remove the internal domain name on your network.

If your wired clients are set to static IPs they're not going to use any DHCP settings.

Thanks for the replies. I initially placed the dns servers in /etc/config/network and my OpenBSD laptop on wireless dhcp generates the following /etc/resolv.conf

Generated by ath0 client

search lan
nameserver 192.168.2.1
lookup file bind

My dns resolution is working fine with this although it looks like 2 steps: client request for name resolution goes to router - router bounces to WAN nameserver.

@MattBroekemeier, does your /etc/resolv.conf on your clients list your router as nameserver or the entries in /etc/config/dhcp?

Both ways will work fine, when you use /etc/config/network it's also put in /tmp/resolv.conf.auto which is pointed to in config dnsmasq with the resolvfile option, so it's just personal preference or habit.

Not quite a symlink, but they're a confusing pair! /etc/resolv.conf is the permanently stored copy, which will store your custom configurations etc. /tmp/resolv.conf is wiped on restart and a fresh copy of /etc/resolv.conf put back in it's place.

At least that is my understanding of it after wrangling dual instances of dnsmasq on guest wifi setup. I did only pick up LEDE earlier today though, so don't quote me on it.