Agreed. It is strange. But this behaviour only occurs when I turn on DHCP on the Pihole. No other changes at all for certain.
Your router's leasetime would have an impact here. A device's interface that has acquired its lease via your router's DHCP server may hold on to its IP until its lease expires.
The lease time on the router is 120 minutes. The connection goes down in less than 120 minutes
Your debug log shows that youre RPi's eth0 did not carry an IP at times:
Wow. I did not realize this. This might be a major contributor to the issue I'm facing. I know I'm harping on the same point but for the past 2 hours, since I switched back to the router DHCP, this issue has not occurred. I don't know if this is a red-herring but the timing and coincidence is suspicious to me.
Did you perhaps engage in other tools like ifupdown or dhcpcd before you settled on nmtui for configuring a static IP?
No. I only used nmtui. I setup the RPi OS normally using the imager app, turned on DHCP on the router, switched off the Pi, swapped the SD cards and booted the Pi. From the router, I fetched the dynamic IP that the router assigned to the Pi, SSHed to the Pi and then used nmtui to set a static IP.
> nmcli device status
DEVICE TYPE STATE CONNECTION
eth0 ethernet connected Wired connection 1
lo loopback connected (externally) lo
wlan0 wifi unavailable --
Looks fine to me
> nmcli device show eth0 | grep IP4
IP4.ADDRESS[1]: 192.168.0.6/24
IP4.GATEWAY: 192.168.0.1
IP4.ROUTE[1]: dst = 192.168.0.0/24, nh = 0.0.0.0, mt = 100
IP4.ROUTE[2]: dst = 0.0.0.0/0, nh = 192.168.0.1, mt = 100
IP4.DNS[1]: 9.9.9.9
IP4.DNS[2]: 149.112.112.112
IP4.DNS[3]: 192.168.0.6
Here also everything looks fine (I've not yet set the primary DNS on the Pi to Pihole yet).
sudo journalctl --boot -u NetworkManager | grep eth0
Over an 8 minute period, there are lots of logs. The last few logs are:
Jul 25 12:07:48 raspberrypi NetworkManager[550]: <info> [1753425468.9319] dhcp4 (eth0): activation: beginning transaction (timeout in 45 seconds)
Jul 25 12:07:48 raspberrypi NetworkManager[550]: <info> [1753425468.9338] policy: set 'Wired connection 1' (eth0) as default for IPv4 routing and DNS
Jul 25 12:08:33 raspberrypi NetworkManager[550]: <info> [1753425513.7877] device (eth0): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
Jul 25 12:08:33 raspberrypi NetworkManager[550]: <warn> [1753425513.7906] device (eth0): Activation: failed for connection 'Wired connection 1'
Jul 25 12:08:33 raspberrypi NetworkManager[550]: <info> [1753425513.7915] device (eth0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Jul 25 12:08:33 raspberrypi NetworkManager[550]: <info> [1753425513.8139] dhcp4 (eth0): canceled DHCP transaction
Jul 25 12:08:33 raspberrypi NetworkManager[550]: <info> [1753425513.8140] dhcp4 (eth0): activation: beginning transaction (timeout in 45 seconds)
Jul 25 12:08:33 raspberrypi NetworkManager[550]: <info> [1753425513.8141] dhcp4 (eth0): state changed no lease
Jul 25 12:13:33 raspberrypi NetworkManager[550]: <info> [1753425813.8432] device (eth0): Activation: starting connection 'Wired connection 1' (c9ea9f2b-0cf2-312c-972d-e23ac07b239a)
Jul 25 12:13:33 raspberrypi NetworkManager[550]: <info> [1753425813.8436] device (eth0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jul 25 12:13:33 raspberrypi NetworkManager[550]: <info> [1753425813.8458] device (eth0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jul 25 12:13:33 raspberrypi NetworkManager[550]: <info> [1753425813.8480] device (eth0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Jul 25 12:13:33 raspberrypi NetworkManager[550]: <info> [1753425813.8500] dhcp4 (eth0): activation: beginning transaction (timeout in 45 seconds)
Jul 25 12:13:33 raspberrypi NetworkManager[550]: <info> [1753425813.8520] policy: set 'Wired connection 1' (eth0) as default for IPv4 routing and DNS
Jul 25 12:13:33 raspberrypi NetworkManager[550]: <info> [1753425813.8933] dhcp4 (eth0): state changed no lease
Jul 25 12:13:33 raspberrypi NetworkManager[550]: <info> [1753425813.8994] dhcp4 (eth0): state changed new lease, address=192.168.0.6
Jul 25 12:13:33 raspberrypi NetworkManager[550]: <info> [1753425813.9724] device (eth0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Jul 25 12:13:34 raspberrypi NetworkManager[550]: <info> [1753425814.0395] device (eth0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Jul 25 12:13:34 raspberrypi NetworkManager[550]: <info> [1753425814.0404] device (eth0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Jul 25 12:13:34 raspberrypi NetworkManager[550]: <info> [1753425814.0428] device (eth0): Activation: successful, device activated.
I'm don't know what these mean (I'm going to look into it). I'm including them here for posterity (and if you can see something from your experience
)