-
Bug
-
Resolution: Not a Bug
-
Normal
-
rhel-8.9.0
-
None
-
None
-
Moderate
-
rhel-plumbers
-
ssg_core_services
-
5
-
False
-
False
-
-
None
-
Red Hat Enterprise Linux
-
None
-
None
-
None
-
None
What were you trying to do that didn't work?
When systemd-resolved is used as the resolver, executing getent hosts $(hostname -s) returns the following:
::1 <hostname>
This happens when IPv6 is disabled (using ipv6.disable=1).
The customer (and myself) are expecting the the local IP to be returned instead, e.g.:
192.168.122.254 vm-rhel8
Please provide the package NVR for which bug is seen:
systemd-239-78.el8.x86_64
How reproducible:
Always
Steps to reproduce
- Boot the system with ipv6.disable=1
- Start systemd-resolved service with following configuration
[Resolve] DNS=192.168.122.1 Domains=libvirt DNSSEC=false LLMNR=no
- Make sure /etc/resolv.conf uses it
search libvirt nameserver 127.0.0.53
- Execute getent hosts $(hostname -s)
Expected results
192.168.122.254 vm-rhel8
Actual results
::1 vm-rhel8
Additional notes
Using FQDN returns the appropriate value:
# getent hosts $(hostname -f) 192.168.122.254 vm-rhel8.libvirt
- duplicates
-
RHEL-6217 systemd_myhostname returns ipv6 address for local host even when ipv6 is disabled
-
- Closed
-
- links to