Debian 12.4 with networking managed by systemd networking.service, dual stack IPv4 and IPv6.
I am aware of the many questions asking how to stop the system from updating resolv.conf, and this is not a duplicate.
TL;DR
At bootup, ifup appears to be overwriting resolv.conf (which I want) but doing it "incorrectly" (I think). The result is that resolv.conf ends up looking like this (prefix obfuscated):
nameserver 26xx:xxxx:xxxx:xxxx:201:2eff:fe70:3bfe What is missing here is the nameserver entry for IPv4, and the search entry for my LAN domain.
Details
To troubleshoot, I did the following:
- Deleted all current leases in
/var/lib/dhcp - Started packet capture on the firewall for DHCP and DHCP6 ports
- Rebooted the Debian system
- Examined the resulting capture file with Wireshark
The findings are:
- The IPv4 DHCP transaction requests, and the server returns, all the necessary information, including the hostname, domain name and DNS server IP.
- The IPv6 DHCP transaction requests the same data, but the response includes only the DNS server address; hostname and domain name are not present in the DHCP6 response.
What I suspect is happening is that ifup is correctly setting up resolv.conf with the IPv4 data, then completely overwriting it with the IPv6 response instead of combining them.
THE QUESTION: What is supposed to happen with DHCP options and resolv.conf in a dual-stack system? Another way of asking that is "Who's at fault here, ifup or pfSense?"
Note
Packages network-manager and resolvconf are not installed, and systemd-networkd is disabled. The network is being managed by systemd's networking.service unit. I didn't intentionally set things up this way, it's what I got by default at installation.