r/debian•
Legogris

IPv6 overwrites IPv4 DNS

EDIT: I resolved this by using systemd-networkd instead of ifupdown-pre.

https://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_modern_network_configuration_without_gui

I have a LAN where clients have both IPv4 and IPv6 addresses, configured with DHCP. Running buster.

I want nodes to use both IPv4 and IPv6 nameservers, acquired via DHCP.

It seems like one of them will "win" by being last and completely overwrite other entries in resolv.conf.

So I arbitrarily end up with either IPv4 or IPv6 DNS.

​

Only "fix" I found so far is to manually "prepend domain-name-servers" in /etc/dhcp/dhclient.conf, but this is not what I want.

sudo ps -Af | grep dhc
root      5929     1  0 06:04 ?        00:00:00 /sbin/dhclient -4 -v -i -pf /run/dhclient.enp3s0.pid -lf /var/lib/dhcp/dhclient.enp3s0.leases -I -df /var/lib/dhcp/dhclient6.enp3s0.leases enp3s0
root      5964     1  0 06:04 ?        00:00:00 /sbin/dhclient -6 -v -pf /run/dhclient6.enp3s0.pid -lf /var/lib/dhcp/dhclient6.enp3s0.leases -I -df /var/lib/dhcp/dhclient.enp3s0.leases enp3s0

​

$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug enp2s0
allow-hotplug enp3s0
iface enp2s0 inet dhcp
iface enp3s0 inet dhcp
iface enp2s0 inet6 dhcp
iface enp3s0 inet6 dhcp

Posted Feb 7, 2020, 6:06 AM UTC · edited

67
Loading comments…