IPv6 DNS of host changes to random name after some short time on raspberry pi

Hello,

i have a big problem with my IPv6 DNS resolution of my Pi. I use my pi as Docker Server.

This is what i did:

dhcpcd -g ( DHCP refresh)
then nslookup raspberrypi

root@raspberrypi:/ # nslookup raspberrypi
server: 10.10.10.1
address: 10.10.10.1#53
Name: raspberrypi.fritz.box
Address: 10.10.10.25
Name: raspberrypi.fritz.box
Address: fd00::xxxx:593b:412c:e677
Name: raspberrypi.fritz.box
Address: 2001:xxxx:xxxx:xxxx:5a5e:adf6:c335:a408

if i wait now a short time and do again a nslookup there is no more ipv6

root@raspberrypi:/ # nslookup raspberrypi
Server: 10.10.10.1
Address: 10.10.10.1#53
Name: raspberrypi.fritz.box
Address: 10.10.10.25

IPv6 is gone.

IIf i do on my Windows PC a ping -a 2001:xxxx:xxxx:xxxx:5a5e:adf6:c335:a408 (ipv6 from above from my pi)
i get:

Ping wird ausgeführt für 0E_49_27_5A_EA_77.fritz.box [ 2001:xxxx:xxxx:xxxx:5a5e:adf6:c335:a408 ] mit 32 Bytes Daten:

Antwort von 2001:xxxx:xxxx:xxxx:5a5e:adf6:c335:a408 : Zeit<1ms

Where does this hostname 0E_49_27_5A_EA_77.fritz.box come from?

If I disable docker complete and reboot this does not happen. So it seems that docker is involved in this problem.

Regards

Peter

it’s the mac address of your rpi’s network interface or the mac address of a macvlan interface.

I doubt the docker engine interfere with the host’s ipv6 stack on its own. I don’t have a pi, but on my docker engine hosts, ipv6 doesn’t get removed.

Are you sure it’s not something you actually run on the host or inside a container that is responsible for this behavior? Did you test if the behavior is the same if you stop all containers? Furthermore, did you modify the configuration of the systemd service or /etc/docker/daemon.json?.

I would assume something like a second dhcp server that responds to the dhcp broadcast request of clients and bypasses the fritzbox dhcp server couuld prevent that the dns name is registered in the fritzbox dns server.

This are all my containers, but i do not think one uses a dhcp server.

code-server
monitoring-prometheus
mariadb
phpmyadmin
nextcloud
influxdb
youtubedl_material
dozzle
speedtest-tracker
homer
portainer
traefik
graylog
elasticsearch
monitoring-grafana
Speedtest-Tracker-New
Mastodon-Redis
authelia
bitwarden
Mastodon-SideKiq
Mastodon-Web
Mastodon-Streaming
Mastodon-DB
homebridge
Watchtower
mongo
youtubedl_mongo
xbs-api
xbs-db
monitoring-node-exporter
mongo6
portainer-tools
monitoring-cadvisor
wg-easy

@meyey and the mac address of my eth0 is dc:a6:32:f4:e4:74 so this does not fit :frowning: there is no mac on my pi which would fit.

No need to share the container list. I not going to go through the list and read each image description to figure out what each container does or doesn’t do.

And are you even sure the fritzbox entry is even pointing to your rpi?
You didn’t mention whether you use maclan.

It is not uncommon that problems tend to hide in parts people don’t share with us, because they think it’s irrelevant.

what is maclan`? all mac adresses from my container networks look like 02:42:ac:14:00 …

If you have no idea what it is, you probably don’t use a docker macvlan network. People use it to get lan ip’s assigned to their containers.

Anothere strange fact … only IPv6 has the problem … the v4 is correctly connected to the dns entry.

I have no other ideas about what might cause the problem. I have never seen the sort of behavior you experience on any of my homelab x86_64 nodes .

I hope you find the solution.

Anyone else who can help me to solve the problem?

You can find the reason if you start with an empty Docker host (no containers are running) and check the the name resolution and start to run containers one by one. After each container you check the name resolution and see what happens.

It culd be a container that changes something in your network. For example disables ipv6 temporarily, but a reboot resets those changes. I don’t recognize all of the software names you shared, but I could imagine that wg-easy (wireguard easy) changes kernel settings to disable ipv6. sysctl commands for example can change settings, but the configuration will not be persistent unless the same configs are saved in a config file. If the kernel settings are changed, you can export the kernel settings before running Docker:

sysctl -a > kernel-before-docker.txt

After Docker

sysctl -a > kernel-after-docker.txt

and after you start al the containers (if they don’t start with Docker)

sysctl -a > kernel-after-containers.txt

You could do the same after each container, but that is not necessary since nslookup can tell you when name resolution changes the diff can help you indentify which setting was changed

diff kernel-before-docker.txt kernel-after-docker.sh
diff kernel-after-docker.sh kernel-after-containers.sh

The ip addr command can also show you if ipv6 is disabled, because then you can’t find IPv6 address for the interfaces.

The reason could be something else, I just guessed, but you are the best person to find the actual reason. At least find out which container affects ipv6 addresses. We can try to help you with the rest.