Double inet eth0 ipv4 address / cant reach LAN or internet

I can ssh to 192.168.2.3, but I can’t reach anything outside my raspberry pi

I have fixed ip (192.168.2.3) and fixed DNS (Cloudflare), ipv6 disabled.

When I do ip address I’m getting:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:a9:1f:20 brd ff:ff:ff:ff:ff:ff
inet 192.168.2.3/24 brd 192.168.2.255 scope global eth0
valid_lft forever preferred_lft forever
inet 169.254.124.168/16 brd 169.254.255.255 scope global noprefixroute eth0
valid_lft forever preferred_lft forever

this is after uninstall adguard home. I cannot update, nor install anything.

How to fix it? My target is install pi-hole.

Required Information

  • DietPi version |
    G_DIETPI_VERSION_CORE=8
    G_DIETPI_VERSION_SUB=11
    G_DIETPI_VERSION_RC=2
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’
    G_LIVE_PATCH_STATUS[0]=‘not applicable’

  • Distro version: bullseye 0

  • Kernel version
    Linux DietPi 5.15.76-v8+ #1597 SMP PREEMPT Fri Nov 4 12:16:41 GMT 2022 aarch64 GNU/Linux

  • SBC model

RPi 3 Model B (aarch64)

  • Power supply used 5V 2.1A
  • SD card used SanDisk 16GB

Hm seems like an IP conflict.
169.254 indicates that an DHCP server is trying to assign an IP adress to this interface.
Is it possible that Adguard acted as DHCP server and there are some leftovers of it?

Can you check your interface settings in dietpi-config > 7 : Network Options: Adapters

can you share following

cat /etc/network/interfaces
ls -la ls -la /etc/network/interfaces.d/

hi,

I think there must be an old configuration in /etc/network/interfaces.d often called setup and it causes a dysfunction of DHCP during the requests …

at least from our side, we don’t place anything there. On a default system it should be an empty folder.

1 Like

Hello again:

cat /etc/network/interfaces
ls -la ls -la /etc/network/interfaces.d/
# Location: /etc/network/interfaces
# Please modify network settings via: dietpi-config
# Or create your own drop-ins in: /etc/network/interfaces.d/

# Drop-in configs
source interfaces.d/*

# Ethernet
allow-hotplug eth0
iface eth0 inet static
address 192.168.2.3
netmask 255.255.255.0
gateway 192.168.2.1
#dns-nameservers 1.1.1.1 1.0.0.1

# WiFi
#allow-hotplug wlan0
iface wlan0 inet dhcp
address 192.168.2.3
netmask 255.255.255.0
gateway 192.168.2.1
#dns-nameservers 2a0c:5a80:0:2::1 2a0c:5a84:0:2::1 fe80::1%eth0
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
ls: cannot access 'ls': No such file or directory
/etc/network/interfaces.d/:
total 8
drwxr-xr-x 2 root root 4096 Nov  4  2020 .
drwxr-xr-x 7 root root 4096 Nov 29 12:34 ..

Maybe Adguard left something somewhere. There are no DHCP servers in this subnetwork. :o

AGH is not doing anything on network configuration. Yes, it is able to run a DHCP server but it wil not configure network interfaces.

Can you do a reboot and check again how network looks like

ip a; ip r
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:a9:1f:20 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.3/24 brd 192.168.2.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet 169.254.124.168/16 brd 169.254.255.255 scope global noprefixroute eth0
       valid_lft forever preferred_lft forever
default dev eth0 scope link src 169.254.124.168 metric 202 
169.254.0.0/16 dev eth0 scope link src 169.254.124.168 metric 202 
192.168.2.0/24 dev eth0 proto kernel scope link src 192.168.2.3

So I decided to clean things, and then removed Unbound (that I think adguard proposed to install) and PiVPN that was installed but not used. Then rebooted and it is working now.

root@DietPi:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:a9:1f:20 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.3/24 brd 192.168.2.255 scope global eth0
       valid_lft forever preferred_lft forever
root@DietPi:~# ip r
default via 192.168.2.1 dev eth0 onlink 
192.168.2.0/24 dev eth0 proto kernel scope link src 192.168.2.3

Thank you for your help and for this wonderful software.

hmm unbound as well is not creating interface entries. Maybe PiVPN did something. Strange thing because 169.254.0.0 is a link local address and will not be used for any communication.

2 Likes