Static vs dynamic secondary ip addr (and how to delete the latter)

Hello, congrats to all involved in this awesome project. Thank you all.

Ok, my issue is that I’ve set up a static ip for my RPi3 DietPi / pi-hole installation, as seen in the /etc/network/interfaces file:

# Ethernet
allow-hotplug eth0
iface eth0 inet static
#dns-nameservers fe80::1%eth0

I’ve also set up static ip for the DietPi in my router. But still, the eth0 interface seems to acquire a secondary dynamic ip address, as seen in the ouput of ip addr:

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000  
    link/ether b8:27:eb:11:8c:be brd ff:ff:ff:ff:ff:ff
    inet brd scope global eth0
       valid_lft forever preferred_lft forever
    inet brd scope global secondary dynamic noprefixroute eth0  
      valid_lft 1813527sec preferred_lft 1586727sec

This seems to be causing me troubles with my NFS mounts and I want to get rid of it.
I thought there must be a dhcp service running, and indeed there is (I see a dhcpcd in htop), but I can’t see an obvious clean way to disable it, as it is not in Dietpi-Services, and also the dhcp server is not enabled in the local pi-hole installation.

I have seen similar - though not quite the same - issues raised here in the forum, but nothing has helped me so far. Any help would be greatly appreciated.

Welcome to our community.

In the past dhcpcd5 was part of PiHole installation but has been removed if I’m not mistaken. You could try to purge the package.

apt purge dhcpcd*

Thanks for the welcome and for the swift response/solution.

I’d eventually purge it or similar, but I just wanted to make sure that I’m not hackin’ & slashin’ things in unintended ways.

Simply do a system backup, purge the package and check if all working fine. If yes, simply continue operation. If not, restore the backup :slight_smile: