Local DNS Domain not announced with IPv6-only

When I use IPv4 the local domain name is announced, e.i. I can see the domain name in output of resolvectl under appropriate interface and I can also ping plain hostname ping my-pc.

With IPv6-only setup this is not the case. I do not see the local domain in output of resolvectl and I cannot ping plain hostname I have to ping full name ping my-pc.localdomain.
EDIT: By IPv6 only I mean I disabled IPv4 on my laptop/desktop.

It can be worked around by setting Announced DNS domains under under IPv6 Setting of the LAN interface.
EDIT: This corresponds to list domain under config dhcp 'iface' in /etc/config/dhcp.

However I would expect it to work automatically. Am I missing anything? Could be this considered a bug?

Can you describe what you steps you undetook to make an IPv6-only setup on your network?

It's not clear from your post. Sharing the network config may be helpful.

Could you please post output of

ubus call system board
1 Like

I simply disabled IPv4 on my Linux laptop.

ubus call system board
{
	"kernel": "5.15.150",
	"hostname": "OpenWRT",
	"system": "ARMv8 Processor rev 4",
	"model": "GL.iNet GL-MT6000",
	"board_name": "glinet,gl-mt6000",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "23.05.3",
		"revision": "r23809-234f1a2efa",
		"target": "mediatek/filogic",
		"description": "OpenWrt 23.05.3 r23809-234f1a2efa"
	}
}

What do you mean ( in /etc/config/network )

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '10.0.0.1'
	option netmask '255.255.255.0'
	option ip6assign '56'
	option ip6hint 'ff00'
	list dns_search 'my-local-domain' #  <- This
	list dns_search 'my-other-domain' 

EDIT: my bad this is NOT the config that I have to set. It appears this setting will not affect IPv6 domain announcement.

In LuCI this can be under interface tab "DHCP Server" -> "IPv6 settings".
Without it my Linux machine won't get domain (can be checked by resolvectl on the Linux laptop/desktop).

Also the hint for the field in LuCI says:

Specifies a fixed list of DNS search domains to announce via DHCPv6. If left unspecified, the local device DNS search domain will be announced.

So I believe that I do not need to set it manually, it should assume localdomain set in DNS config.

@brada4
Oh my bad:
The settings is actually in /etc/config/dhcp:

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'
        list domain 'my-local-domain' # <- This must be set manually but it should not be needed IMO.
        list domain 'some-other-domain-to-search'

IMO this is probably a bug. Or at least the help text in LuCI is deceiving.

thats resolv.conf search list, nothing to do with autoconfiguring other devices.

If I modify list domain in /etc/config/dhcp it definetely has an effect.

This might be true for the list in /etc/config/network but not for /etc/config/dhcp.

I am forced to set may domain there. Otherwise domain is not set on my laptop automatically. IMO it should just work.

How do you obtain an address on your computer? Slaac or dhcpv6? Iirc the domain can only be set via dhcpv6. DNS nameserver Info can be sent by booth, RA for slaac or via dhcpv6.

I use both DHCPv6 and also SLAAC.

The domain announcement does work when I set it manually. The thing is that IMO I should not need to set it explicitly.

Possibly related: https://github.com/openwrt/odhcpd/issues/206 .

2 Likes

I should have checked GH first.

1 Like

According to documentation: https://openwrt.org/docs/techref/odhcpd

the dns search domain is announced only if it is configured in the

dhcp section of /etc/config/dhcp as list domain 'lan'

Therefore, the help text in Luci is currently misleading, as there is no configuration happening if the domain is only set in

/etc/config/network as list dns_search 'lan'

1 Like