FS#66308 - [netctl] dual stack - only ipv6 dns in resolv.conf
Attached to Project:
Arch Linux
Opened by C. Dominik Bódi (osginyast) - Sunday, 19 April 2020, 11:55 GMT
Last edited by Jouke Witteveen (jouke) - Monday, 27 April 2020, 13:55 GMT
Opened by C. Dominik Bódi (osginyast) - Sunday, 19 April 2020, 11:55 GMT
Last edited by Jouke Witteveen (jouke) - Monday, 27 April 2020, 13:55 GMT
|
Details
Description:
I have a ethernet-dhcp config like this: Description='Ethernet' Interface=enp116s0 Connection=ethernet IP=dhcp IP6=dhcp Starting the interface, I would expect both IPv4 and IPv6 dns server to be added to /etc/resolv.conf. However, only the IP6 dns server is found in /run/systemd/resolve/resolv.conf I am using systemd-resolved, but I am getting the same thing when using openresolv. Ideally, netctl would set up DNS so that both IPv4 and IPv6 dns servers are usable. When setting IP6 to stateless, only IPv4 DNS server shows up in resolv.conf Additional info: * netctl version 1.21-2 Steps to reproduce: 1. Set up a dual-stack ethernet config file with both IP=dhcp and IP6=dhcp 2. netctl start <interface> 3. Check resolv.conf (depending on what dns resolver you are using) - Only IPv6 dns server shows up in resolv.conf 4. change IP6=stateless 5. netctl restart <interface> 6. Check resolv.conf (depending on what dns resolver you are using) - Only IPv4 dns server shows up in resolv.conf Regards, |
This task depends upon
Closed by Jouke Witteveen (jouke)
Monday, 27 April 2020, 13:55 GMT
Reason for closing: Upstream
Additional comments about closing: Will be fixed in dhcpcd 9.0.3.
Possibly, a bug in systemd-resolvconf remains.
Monday, 27 April 2020, 13:55 GMT
Reason for closing: Upstream
Additional comments about closing: Will be fixed in dhcpcd 9.0.3.
Possibly, a bug in systemd-resolvconf remains.
As I use systemd-resolved, /etc/resolv.conf is a symlink to /run/systemd/resolve/stub-resolv.conf
When I use dhclient, that symlink gets replaced by a non-symlink file.
From there it gets even stranger. In the newcly created /etc/resolv.conf, no dns servers are listed except the mdns one provided by avahi.
To sum it up, I cannot use dhclient, it just breaks everything.
Regards,
So, dhcpcd calls dhcpcd-run-hooks with:
interace=enp116s0
protocol=dhcp
It then makes this:
ifname="$interface${protocol+.}$protocol"
And the resolvconf hook ends up calling this:
printf %s "$conf" | "$resolvconf" -a "$ifname"
For IPv6 the protocol will either be ra or dhcp6.
This happens regardless of how dhcpcd is run - protocol per interface, just per interface or as a single daemon.
So it should just work. You can verify this by running
$ resolvconf -i
re0.dhcp re0.dhcp6 re0.ra
So I have three files from one interace.
$ resolvconf -l
will show them
What output do you get from resolvconf -i and resolvconf --version?
openresolv 3.10.0
Copyright (c) 2007-2020 Roy Marples
with both DHCPClient and DHCPClient6 options set to "dhcpcd"
resolvconf -i
enp116s0.dhcp
with defaults (IPv4=dhcpcd, IPv6=dhclient according to manpage)
resolvconf -i
enp116s0.dhcp
with both clients set to dhclient
empty output
I've uninstalled rebooted and reinstalled dhcpcd to clean up /var/lib/dhcpcd
that didn't help.
Strangely enough, the race goes the other way now, I am getting only ipv4.
Looking at the logs, I can see the netctl launches the dhcpcd -6 command, but never gets any response. The IPv4 looks normal.
https://roy.marples.name/cgit/dhcpcd.git/commit/?id=f10b3ded87b73e0d2e1018781ca874aea166eac0
Regards,
I don't think there is much left to do here. At least the situation with openresolv and DHCP6Client=dhcpcd works :-).
[ -n "$ifmetric" ] && export IF_METRIC="$ifmetric"
So that dhcpcd can tell openresolv which interface to prefer over another.
But as that's an environment var, it shouldn't affect anything.
I guess it is systemd-resolvconf that does something "wrong" then?
Regards,