Open systemcrash opened 8 months ago
I met the same problem in 21.02.
I didn't add a network.lan.dns_search
but set dhcp.@dnsmasq[0].domain
instead. Hosts in LAN can obtain the DNS search list from DHCP(v4), but a wireshark capture of IPv6 traffic shows no DNS search list, neither in Router Advertisement nor DHCPv6 reply message. If I add a dhcp.lan.domain
, the search domain will show up in both the RA and DHCPv6 reply.
I'd expect a DNS search list in both the RA and DHCPv6 reply if one of dhcp.lan.domain
, network.lan.dns_search
or dhcp.@dnsmasq[0].domain
is configured. Should there be any conflict, a precedence rule (e.g., dhcp.lan.domain
> network.lan.dns_search
> dhcp.@dnsmasq[0].domain
) may apply.
BTW, I can't see any difference between dhcp.lan.domain
and network.lan.dns_search
. Should we merge them?
I think I encountered similar issue: when I disable IPv4 on my laptop then domain is not set (checked via resolvectl
). I had to set dhcp.lan.domain
in /etc/config/dhcp
manually.
Also does network.lan.dns_search
have any effect on autoconf at all?
I can't see any difference between
dhcp.lan.domain
andnetwork.lan.dns_search
.
After several trials and captures, I've come to realize the semantic difference between network.$interface.dsn_search
and dhcp.$interface.domain
.
network.$interface.dns_search
represents the DNS domain search list received from upstream. Typically, a router who statically configures its WAN IP address could choose to statically configures network.wan.dns_search
; if it receives its WAN IP and search list from DHCP, this configuration is usually unnecessary. When the OpenWrt device itself resolves a (non-FQDN) hostname, it is supposed to try network.wan.dns_search
.
dhcp.$interface.domain
is the domain search list to distribute to attached downstream hosts via DHCPv6 Option 24 and/or Router Advertisement Option 31. It is supposed to be configured on LAN interface(s). (FYI, a dhcp.lan.dhcp_option
can be added to configure DHCP Option 119 for IPv4.)
dhcp.@dnsmasq[0].domain
only sets DHCP Option 15 currently. It is also offered to downstream hosts via DHCP(v4).
if I have e.g.
and I have DHCP config A e.g.
and later DHCP config B (as A but with domains) e.g.:
The GUI in 23.05.0 says for
Announced DNS domains
that:If left unspecified, the local device DNS search domain will be announced.
The ICMPv6 RA do not contain DNSSL Option Type 31 with
jinglebollocks
. But if I set DHCP config B, ICMPv6 RA contain DNSSL Option Type 31 withcongabonga
:Can anyone else verify if this behaviour is also present?
Which is correct: the described behaviour or actual?