PiHole stopped working after DietPi OS update interrupted

After a DietPi OS update froze mid-stream something in my network config broke. I’ve since been able to fix the OS install and that’s fine. But there’s something wrong as the PiHole is no longer connected properly via ethernet.

Here’s a token: https://tricorder.pi-hole.net/dHWOtyfK/

grep -Hn -A3 -B1 -E '(^|\s)eth0(\s|$)' /etc/network/interfaces /etc/network/interfaces.d/* 2>/dev/null
/etc/network/interfaces-8-# Ethernet
/etc/network/interfaces:9:allow-hotplug eth0
/etc/network/interfaces:10:iface eth0 inet static
/etc/network/interfaces-11-address 192.168.0.180
/etc/network/interfaces-12-netmask 255.255.255.0
/etc/network/interfaces-13-gateway 192.168.0.1

Would someone be able to look at the log & suggest how to fix it so the PiHole is able to communicate with the DHS server? Thank you.

Your debug log shows Pi-hole is working.

Apparently something else is broken.

"something wrong" is not very descriptive.
We need more information.

Can you access the web interface via IP?

Yes - I can access the web interface. One problem is it shows two concurrent IP addresses in the Ethernet.

This happened during a DietPi OS update. So the problem is likely on that end. I'll work with their support on this I guess. Thanks.

We are here as well. Can you show the output of these commands please:

ip a
ip r

Feel free to mask/anonymize IPv6 addresses. Are the two IP addresses you see in Pi-hole visible in this output as well?

Where do you see those?
Your debug log shows your RPi's eth0 interface to carry only one IPv4:

   2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
       inet 192.168.0.180/24 brd 192.168.0.255 scope global eth0
          valid_lft forever preferred_lft forever
1 Like
~# 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
    inet6 ::1/128 scope host noprefixroute 
       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:02:94:34 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.180/24 brd 192.168.0.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet 192.168.227.5/24 brd 192.168.227.255 scope global noprefixroute eth0
       valid_lft forever preferred_lft forever
    inet6 ##################/64 scope link 
       valid_lft forever preferred_lft forever
~# ip r
default via 192.168.227.1 dev eth0 src 192.168.227.5 metric 1002 
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.180 
192.168.227.0/24 dev eth0 proto dhcp scope link src 192.168.227.5 metric 1002 

So this is just a continuation of this issue: HELP: LAN IP is the same as IPv4

Hence there is still another DHCP server active in your network which distributes an invalid subnet with a default route which points to nowhere.

So a static IP without DHCP client is still the solution, and anyway reasonable for a Pi-hole DNS resolver.

I guess

pihole-FTL dhcp-discover

does not trigger any DHCP offer from that 192.168.227.1 rogue server, i.e. it is not visible in the tricorder upload of this issue either, right?

Does anyone have a good idea how to detect a DHCP server which distributes a default route that does not exist? Not visible on the true router either, since it is in that different subnet. tcpdump could work, e.g. on a detachable shell session, so the command can just run for a day or so and does not abort if the SSH connection does:

apt install tcpdump
tcpdump -i eth0 udp port 68

EDIT: Or a running a network scanner with ping (or something on port 67 which DHCP servers respond to) through 192.168.227.1 - 192.168.227.254 range, as that DHCP server should have an IP in that range as well. Why not just that:

for i in {1..254}; do ping -c1 -W1 -q "192.168.227.$i"; done

A attempt and 1 second timeout per IP, could be tweaked, but should usually work for hosts in same LAN which do respond to pings at all.

That's correct. (click for details)
*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 6 seconds)
   Scanning all your interfaces for DHCP servers and IPv6 routers
   Timeout: 6 seconds
   
   Error while sending Router Solicitation on eth0: Address not available

   * Received 300 bytes from 192.168.0.1 @ eth0
     Offered IP address: 192.168.0.180
     Server IP address: 192.168.0.1
     Relay-agent IP address: N/A
     BOOTP server: (empty)
     BOOTP file: (empty)
     DHCP options:
      Message type: DHCPOFFER (2)
      server-identifier: 192.168.0.1
      lease-time: Infinite
      netmask: 255.255.255.0
      broadcast: 192.168.0.255
      dns-server: 192.168.0.1
      router: 192.168.0.1
      --- end of options ---
   
   Received 1 DHCP (IPv4) and 0 RA (IPv6) answers on eth0

I don't see any indications that another DHCP server would be involved here.

A DHCP server may well be active on the same link / network segment / collision domain, while handing out configurations for a different subnet, i.e. it would have link layer visibility, and it may even have transport/IP layer accessibility through the link's router(s).

Since no other DHCP server answered the Pi-hole machine's broadcasts, that would suggest that there is no other DHCP server on the same link, or that it wasn't active when the DHCPDISCOVER was broadcasted (and similar would apply if a DHCP relay would transfer broadcasts to other links).

Most importantly, jacorizla's IP output clearly indicates that both IPs have not been dynamically assigned via DHCP (no appearance of dynamic), suggesting that they were assigned by some process on the device itself.

You should verify your OS's static IP configuration.

Hmm you are right, I thought I saw in earlier output of the other related topic.

ifupdown at least has only the one IP in its configs. Maybe the following reveals some other active network tool:

systemctl
 UNIT                                                                                                 LOAD   ACTIVE SUB       DESCRIPTION                                                                              
  proc-sys-fs-binfmt_misc.automount                                                                    loaded active waiting   Arbitrary Executable File Formats File System Automount Point                            
  sys-devices-platform-soc-3f202000.mmc-mmc_host-mmc0-mmc0:1234-block-mmcblk0-mmcblk0p1.device         loaded active plugged   /sys/devices/platform/soc/3f202000.mmc/mmc_host/mmc0/mmc0:1234/block/mmcblk0/mmcblk0p1
  sys-devices-platform-soc-3f202000.mmc-mmc_host-mmc0-mmc0:1234-block-mmcblk0-mmcblk0p2.device         loaded active plugged   /sys/devices/platform/soc/3f202000.mmc/mmc_host/mmc0/mmc0:1234/block/mmcblk0/mmcblk0p2
  sys-devices-platform-soc-3f202000.mmc-mmc_host-mmc0-mmc0:1234-block-mmcblk0.device                   loaded active plugged   /sys/devices/platform/soc/3f202000.mmc/mmc_host/mmc0/mmc0:1234/block/mmcblk0
  sys-devices-platform-soc-3f215040.serial-3f215040.serial:0-3f215040.serial:0.0-tty-ttyS0.device      loaded active plugged   /sys/devices/platform/soc/3f215040.serial/3f215040.serial:0/3f215040.serial:0.0/tty/ttyS0
  sys-devices-platform-soc-3f980000.usb-usb1-1\x2d1-1\x2d1.1-1\x2d1.1.1-1\x2d1.1.1:1.0-net-eth0.device loaded active plugged   7800
  sys-devices-virtual-block-ram0.device                                                                loaded active plugged   /sys/devices/virtual/block/ram0
  sys-devices-virtual-block-ram1.device                                                                loaded active plugged   /sys/devices/virtual/block/ram1
  sys-devices-virtual-block-ram10.device                                                               loaded active plugged   /sys/devices/virtual/block/ram10
  sys-devices-virtual-block-ram11.device                                                               loaded active plugged   /sys/devices/virtual/block/ram11
  sys-devices-virtual-block-ram12.device                                                               loaded active plugged   /sys/devices/virtual/block/ram12
  sys-devices-virtual-block-ram13.device                                                               loaded active plugged   /sys/devices/virtual/block/ram13
  sys-devices-virtual-block-ram14.device                                                               loaded active plugged   /sys/devices/virtual/block/ram14
  sys-devices-virtual-block-ram15.device                                                               loaded active plugged   /sys/devices/virtual/block/ram15
  sys-devices-virtual-block-ram2.device                                                                loaded active plugged   /sys/devices/virtual/block/ram2
  sys-devices-virtual-block-ram3.device                                                                loaded active plugged   /sys/devices/virtual/block/ram3
  sys-devices-virtual-block-ram4.device                                                                loaded active plugged   /sys/devices/virtual/block/ram4
  sys-devices-virtual-block-ram5.device                                                                loaded active plugged   /sys/devices/virtual/block/ram5
  sys-devices-virtual-block-ram6.device                                                                loaded active plugged   /sys/devices/virtual/block/ram6
  sys-devices-virtual-block-ram7.device                                                                loaded active plugged   /sys/devices/virtual/block/ram7
  sys-devices-virtual-block-ram8.device                                                                loaded active plugged   /sys/devices/virtual/block/ram8
  sys-devices-virtual-block-ram9.device                                                                loaded active plugged   /sys/devices/virtual/block/ram9
  sys-devices-virtual-tty-ttyprintk.device                                                             loaded active plugged   /sys/devices/virtual/tty/ttyprintk
  sys-module-configfs.device                                                                           loaded active plugged   /sys/module/configfs
  sys-module-fuse.device                                                                               loaded active plugged   /sys/module/fuse
  sys-subsystem-net-devices-eth0.device                                                                loaded active plugged   7800    

Does this offer any insight? Thank you.

This is incomplete. Below mount and device sections, there should be services and timers listed, loaded on you system. If a pager was used (often invoked automatically), hit backspace to show the remaining parts of the output.

Copy/paste output for below?

systemctl --full --no-pager

1 Like

Something fishy going on.
Looks like below route was created/installed via DHCP:

$ man ip-route
[..]
              protocol RTPROTO
                     the routing protocol identifier of this route.  RT‐
                     PROTO may be a number or a string from the file
                     /etc/iproute2/rt_protos.  If the routing protocol ID
                     is not given, ip assumes protocol boot (i.e. it as‐
                     sumes the route was added by someone who doesn't un‐
                     derstand what they are doing). Several protocol val‐
                     ues have a fixed interpretation.  Namely:

                             redirect - the route was installed due to an
                             ICMP redirect.

                             kernel - the route was installed by the ker‐
                             nel during autoconfiguration.

                             boot - the route was installed during the
                             bootup sequence.  If a routing daemon starts,
                             it will purge all of them.

                             static - the route was installed by the ad‐
                             ministrator to override dynamic routing.
                             Routing daemon will respect them and, proba‐
                             bly, even advertise them to its peers.

                             ra - the route was installed by Router Dis‐
                             covery protocol.

                     The rest of the values are not reserved and the ad‐
                     ministrator is free to assign (or not to assign) pro‐
                     tocol tags.

At #16:

$ cat /etc/iproute2/rt_protos
#
# Reserved protocols.
#
0       unspec
1       redirect
2       kernel
3       boot
4       static
8       gated
9       ra
10      mrt
11      zebra
12      bird
13      dnrouted
14      xorp
15      ntk
16      dhcp
18      keepalived
42      babel
99      openr
186     bgp
187     isis
188     ospf
189     rip
192     eigrp

Maybe still worth to run a tcpdump of some kind?

EDIT: Fabricated below :wink:

sudo tcpdump -ntvvvi any udp port 67

Maybe together with:

$ man tcpdump
[..]
       -c count
              Exit after receiving count packets.
UNIT                                                                                                 LOAD   ACTIVE SUB       DESCRIPTION                                                                              
  proc-sys-fs-binfmt_misc.automount                                                                    loaded active waiting   Arbitrary Executable File Formats File System Automount Point                            
  sys-devices-platform-soc-3f202000.mmc-mmc_host-mmc0-mmc0:1234-block-mmcblk0-mmcblk0p1.device         loaded active plugged   /sys/devices/platform/soc/3f202000.mmc/mmc_host/mmc0/mmc0:1234/block/mmcblk0/mmcblk0p1
  sys-devices-platform-soc-3f202000.mmc-mmc_host-mmc0-mmc0:1234-block-mmcblk0-mmcblk0p2.device         loaded active plugged   /sys/devices/platform/soc/3f202000.mmc/mmc_host/mmc0/mmc0:1234/block/mmcblk0/mmcblk0p2
  sys-devices-platform-soc-3f202000.mmc-mmc_host-mmc0-mmc0:1234-block-mmcblk0.device                   loaded active plugged   /sys/devices/platform/soc/3f202000.mmc/mmc_host/mmc0/mmc0:1234/block/mmcblk0
  sys-devices-platform-soc-3f215040.serial-3f215040.serial:0-3f215040.serial:0.0-tty-ttyS0.device      loaded active plugged   /sys/devices/platform/soc/3f215040.serial/3f215040.serial:0/3f215040.serial:0.0/tty/ttyS0
  sys-devices-platform-soc-3f980000.usb-usb1-1\x2d1-1\x2d1.1-1\x2d1.1.1-1\x2d1.1.1:1.0-net-eth0.device loaded active plugged   7800
  sys-devices-virtual-block-ram0.device                                                                loaded active plugged   /sys/devices/virtual/block/ram0
  sys-devices-virtual-block-ram1.device                                                                loaded active plugged   /sys/devices/virtual/block/ram1
  sys-devices-virtual-block-ram10.device                                                               loaded active plugged   /sys/devices/virtual/block/ram10
  sys-devices-virtual-block-ram11.device                                                               loaded active plugged   /sys/devices/virtual/block/ram11
  sys-devices-virtual-block-ram12.device                                                               loaded active plugged   /sys/devices/virtual/block/ram12
  sys-devices-virtual-block-ram13.device                                                               loaded active plugged   /sys/devices/virtual/block/ram13
  sys-devices-virtual-block-ram14.device                                                               loaded active plugged   /sys/devices/virtual/block/ram14
  sys-devices-virtual-block-ram15.device                                                               loaded active plugged   /sys/devices/virtual/block/ram15
  sys-devices-virtual-block-ram2.device                                                                loaded active plugged   /sys/devices/virtual/block/ram2
  sys-devices-virtual-block-ram3.device                                                                loaded active plugged   /sys/devices/virtual/block/ram3
  sys-devices-virtual-block-ram4.device                                                                loaded active plugged   /sys/devices/virtual/block/ram4
  sys-devices-virtual-block-ram5.device                                                                loaded active plugged   /sys/devices/virtual/block/ram5
  sys-devices-virtual-block-ram6.device                                                                loaded active plugged   /sys/devices/virtual/block/ram6
  sys-devices-virtual-block-ram7.device                                                                loaded active plugged   /sys/devices/virtual/block/ram7
  sys-devices-virtual-block-ram8.device                                                                loaded active plugged   /sys/devices/virtual/block/ram8
  sys-devices-virtual-block-ram9.device                                                                loaded active plugged   /sys/devices/virtual/block/ram9
  sys-devices-virtual-tty-ttyprintk.device                                                             loaded active plugged   /sys/devices/virtual/tty/ttyprintk
  sys-module-configfs.device                                                                           loaded active plugged   /sys/module/configfs
  sys-module-fuse.device                                                                               loaded active plugged   /sys/module/fuse
  sys-subsystem-net-devices-eth0.device                                                                loaded active plugged   7800                                                                                     
  -.mount                                                                                              loaded active mounted   Root Mount
  boot-firmware.mount                                                                                  loaded active mounted   /boot/firmware
  dev-mqueue.mount                                                                                     loaded active mounted   POSIX Message Queue File System
  run-lock.mount                                                                                       loaded active mounted   Legacy Locks Directory /run/lock
  sys-fs-fuse-connections.mount                                                                        loaded active mounted   FUSE Control File System
  sys-kernel-config.mount                                                                              loaded active mounted   Kernel Configuration File System
  sys-kernel-debug.mount                                                                               loaded active mounted   Kernel Debug File System
  sys-kernel-tracing.mount                                                                             loaded active mounted   Kernel Trace File System
  tmp.mount                                                                                            loaded active mounted   /tmp
  var-log.mount                                                                                        loaded active mounted   /var/log                                                                                 
  systemd-ask-password-console.path                                                                    loaded active waiting   Dispatch Password Requests to Console Directory Watch
  systemd-ask-password-wall.path                                                                       loaded active waiting   Forward Password Requests to Wall Directory Watch                                        
  init.scope                                                                                           loaded active running   System and Service Manager                                                               
  console-setup.service                                                                                loaded active exited    Set console font and keymap
  cron.service                                                                                         loaded active running   Regular background program processing daemon
  dhcpcd.service                                                                                       loaded active running   DHCP Client Daemon on all interfaces
  dietpi-postboot.service                                                                              loaded active exited    DietPi-PostBoot
  dietpi-preboot.service                                                                               loaded active exited    DietPi-PreBoot
  dietpi-ramlog.service                                                                                loaded active exited    DietPi-RAMlog
  dropbear.service                                                                                     loaded active running   Lightweight SSH server
  getty@tty1.service                                                                                   loaded active running   Getty on tty1
  ifup@eth0.service                                                                                    loaded active exited    ifup for eth0
  ifupdown-pre.service                                                                                 loaded active exited    Helper to synchronize boot up for ifupdown
  keyboard-setup.service                                                                               loaded active exited    Set the console keyboard layout
  kmod-static-nodes.service                                                                            loaded active exited    Create List of Static Device Nodes
  networking.service                                                                                   loaded active exited    Raise network interfaces
  pihole-FTL.service                                                                                   loaded active running   Pi-hole FTL
  rngd.service                                                                                         loaded active running   Start entropy gathering daemon (rngd)
  serial-getty@ttyS0.service                                                                           loaded active running   Serial Getty on ttyS0
  systemd-fsck-root.service                                                                            loaded active exited    File System Check on Root Device
  systemd-fsck@dev-disk-by\x2dpartuuid-e8af6eb2\x2d01.service                                          loaded active exited    File System Check on /dev/disk/by-partuuid/e8af6eb2-01
  systemd-journal-flush.service                                                                        loaded active exited    Flush Journal to Persistent Storage
  systemd-journald.service                                                                             loaded active running   Journal Service
  systemd-modules-load.service                                                                         loaded active exited    Load Kernel Modules
  systemd-random-seed.service                                                                          loaded active exited    Load/Save OS Random Seed
  systemd-remount-fs.service                                                                           loaded active exited    Remount Root and Kernel File Systems
  systemd-sysctl.service                                                                               loaded active exited    Apply Kernel Variables
  systemd-tmpfiles-setup-dev-early.service                                                             loaded active exited    Create Static Device Nodes in /dev gracefully
  systemd-tmpfiles-setup-dev.service                                                                   loaded active exited    Create Static Device Nodes in /dev
  systemd-tmpfiles-setup.service                                                                       loaded active exited    Create System Files and Directories
  systemd-udev-load-credentials.service                                                                loaded active exited    Load udev Rules from Credentials
  systemd-udev-trigger.service                                                                         loaded active exited    Coldplug All udev Devices
  systemd-udevd.service                                                                                loaded active running   Rule-based Manager for Device Events and Files
  systemd-user-sessions.service                                                                        loaded active exited    Permit User Sessions                                                                     
  -.slice                                                                                              loaded active active    Root Slice
  system-getty.slice                                                                                   loaded active active    Slice /system/getty
  system-modprobe.slice                                                                                loaded active active    Slice /system/modprobe
  system-serial\x2dgetty.slice                                                                         loaded active active    Slice /system/serial-getty
  system-systemd\x2dfsck.slice                                                                         loaded active active    Slice /system/systemd-fsck
  system.slice                                                                                         loaded active active    System Slice                                                                             
  systemd-creds.socket                                                                                 loaded active listening Credential Encryption/Decryption
  systemd-hostnamed.socket                                                                             loaded active listening Hostname Service Socket
  systemd-initctl.socket                                                                               loaded active listening initctl Compatibility Named Pipe
  systemd-journald-dev-log.socket                                                                      loaded active running   Journal Socket (/dev/log)
  systemd-journald.socket                                                                              loaded active running   Journal Sockets
  systemd-sysext.socket                                                                                loaded active listening System Extension Image Management
  systemd-udevd-control.socket                                                                         loaded active running   udev Control Socket
  systemd-udevd-kernel.socket                                                                          loaded active running   udev Kernel Socket                                                                       
  var-swap.swap                                                                                        loaded active active    /var/swap                                                                                
  basic.target                                                                                         loaded active active    Basic System
  getty.target                                                                                         loaded active active    Login Prompts
  graphical.target                                                                                     loaded active active    Graphical Interface
  local-fs-pre.target                                                                                  loaded active active    Preparation for Local File Systems
  local-fs.target                                                                                      loaded active active    Local File Systems
  multi-user.target                                                                                    loaded active active    Multi-User System
  network-online.target                                                                                loaded active active    Network is Online
  network-pre.target                                                                                   loaded active active    Preparation for Network
  network.target                                                                                       loaded active active    Network
  nss-lookup.target                                                                                    loaded active active    Host and Network Name Lookups
  paths.target                                                                                         loaded active active    Path Units
  remote-fs.target                                                                                     loaded active active    Remote File Systems
  slices.target                                                                                        loaded active active    Slice Units
  sockets.target                                                                                       loaded active active    Socket Units
  swap.target                                                                                          loaded active active    Swaps
  sysinit.target                                                                                       loaded active active    System Initialization
  time-set.target                                                                                      loaded active active    System Time Set
  timers.target                                                                                        loaded active active    Timer Units                                                                              
  dpkg-db-backup.timer                                                                                 loaded active waiting   Daily dpkg database backup timer
  e2scrub_all.timer                                                                                    loaded active waiting   Periodic ext4 Online Metadata Check for All Filesystems
  fake-hwclock-save.timer                                                                              loaded active waiting   Periodically save current clock
  fstrim.timer                                                                                         loaded active waiting   Discard unused filesystem blocks once a week
  lighttpd-maint.timer                                                                                 loaded active waiting   timer for lighttpd maintenance tasks
  phpsessionclean.timer                                                                                loaded active waiting   Clean PHP session files every 30 mins
  systemd-tmpfiles-clean.timer                                                                         loaded active waiting   Daily Cleanup of Temporary Directories

Legend: LOAD   → Reflects whether the unit definition was properly loaded.
        ACTIVE → The high-level unit activation state, i.e. generalization of SUB.
        SUB    → The low-level unit activation state, values depend on unit type.

110 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

What do below three output?

sudo dhcpcd --test

sudo grep -v '^ *\(#\|$\)' /etc/dhcpcd.conf

sudo rgrep -v '^ *\(#\|$\)' /etc/network/interfaces*

EDIT: Oh one more (redact SIDD etc if any!):

iw dev

That one might be the culprit. Check

cat /etc/dhcpcd.conf

whether is sets this unexpected IP statically.

Generally, since ifupdown is used, dhcpcd is not required. So unless you use it for something specific:

apt autopurge dhcpcd
1 Like

Didnt know that one :+1:

dhcpcd-10.0.6 starting
dev: loaded udev
DUID 00:01:00:01:30:69:9a:e6:dc:97:ba:b7:03:04
wlp170s0: IAID ba:b7:03:04
wlp170s0: soliciting an IPv6 router
wlp170s0: soliciting a DHCP lease
wlp170s0: offered 192.168.0.19 from 192.168.0.1
interface='wlp170s0'
pid='20501'
protocol='dhcp'
reason='TEST'
ifcarrier='up'
ifflags='69699'
ifmetric='3002'
ifmtu='1500'
ifssid='############'
ifwireless='1'
new_broadcast_address='192.168.0.255'
new_dhcp_lease_time='7200'
new_dhcp_message_type='2'
new_dhcp_rebinding_time='6300'
new_dhcp_renewal_time='3600'
new_dhcp_server_identifier='192.168.0.1'
new_domain_name_servers='192.168.0.1'
new_ip_address='192.168.0.19'
new_network_number='192.168.0.0'
new_routers='192.168.0.1'
new_subnet_cidr='24'
new_subnet_mask='255.255.255.0'
dhcpcd exited
duid
persistent
vendorclassid
option domain_name_servers, domain_name, domain_search
option classless_static_routes
option interface_mtu
option host_name
option rapid_commit
require dhcp_server_identifier
slaac private
No such file or directory
phy#0
	Unnamed/non-netdev interface
		wdev 0x3
		addr dc:97:ba:XX:XX:XX
		type P2P-device
	Interface wlp170s0
		ifindex 2
		wdev 0x1
		addr dc:97:ba:XX:XX:XX
		ssid ################
		type managed
		channel 40 (5200 MHz), width: 80 MHz, center1: 5210 MHz
		txpower 22.00 dBm
		multicast TXQ:
			qsz-byt	qsz-pkt	flows	drops	marks	overlmt	hashcoltx-bytes	tx-packets
			0	0	0	0	0	0	0	00

Could you try above one again, maybe a typo, bc if it doesnt output anything, below one also shouldnt right?

Which would mean those files are gone now somehow (EDIT: or all directives are hashed out/commented).
Below is an example of a skeleton config:

$ sudo rgrep -v '^ *\(#\|$\)' /etc/network/interfaces*
/etc/network/interfaces:source-directory /etc/network/interfaces.d

Or below on another Linux box:

$ sudo rgrep -v '^ *\(#\|$\)' /etc/network/interfaces*
/etc/network/interfaces:auto lo
/etc/network/interfaces:iface lo inet loopback
/etc/network/interfaces:auto eth0
/etc/network/interfaces:iface eth0 inet dhcp

Above output is confusing me bc its mentioning a wireless interface wlp170s0 and not eth0.
It also seems to be still connected via Wifi.
What does below output (it redacts the MAC's)?

ip -br l | awk '{print $1,$2,$4}' | column -t

dhcpcd works like so, if you dont configure any IP details for particular interfaces, like in your case from above output, it will try to automatically acquire IP details via DHCP for all detected interfaces.

You either have to configure manual static IP details via dhcpcd.conf,
or you have to purge/uninstall dhcpcd from your system and configure static IP details in the /etc/network/interfaces file (or files in the .d folder if configured correctly) so ifupdown can configure IP details instead of dhcpcd:

$ systemctl is-enabled networking.service
enabled
$ systemctl cat networking.service
[..]
Description=Raise network interfaces
[..]
ExecStart=/sbin/ifup -a --read-environment
$ man ifup
[..]
DESCRIPTION
       The  ifup and ifdown commands may be used to configure (or, respec‐
       tively, deconfigure) network interfaces based on interface  defini‐
       tions  in the file /etc/network/interfaces.

EDIT: below a dhcpcd example:

You have to decide which one you want to use?

Alias for autoremove --purge since Debian Bullseye or so :slightly_smiling_face:.

Indeed weird that wlp170s0 which was not shown in ip l output further above. And since classic interface names are used, it should be wlan0 if any WiFi adapter is attached. And ifupdown config missing now. You did not by chance run the commands in a different system accidentally?

1 Like