-1

I have a Raspberry PI 4 running Ubuntu 21.10 with a static ip-address on eth0. Despite that, I keep getting a secondary 'dynamic' DHCP address on on it.

netplan

  network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: no
      addresses:
        - 192.168.0.10/24
      routes:
        - to: default
          via: 192.168.0.1
      nameservers:
          search: [lan]
          addresses: [192.168.0.12]

ip addr show

eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether dc:a6:32:da:df:55 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.10/23 brd 192.168.1.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet 192.168.0.225/23 brd 192.168.1.255 scope global secondary dynamic eth0
       valid_lft 68727sec preferred_lft 68727sec
    inet6 fe80::dea6:32ff:feda:df55/64 scope link 
       valid_lft forever preferred_lft forever

Even if I delete that interface, it keeps coming back after a few minutes. I have another PI with the "same" configuration and it doesn't have this problem. I also have the /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg per instructions.

Kingfranz
  • 184
  • 1
  • 12

1 Answers1

0

Have you tried using the word false instead of no on your dhcp4 entry to netplan?

  • That didn't work either. But I noticed that (not surprising) it makes a new DHCP request every time I run 'netplan apply' – Kingfranz Jan 20 '22 at 12:32
  • This is really interesting. I use that directive in Netplan for a few Ubuntu 18 virtual machines and don't see this behavior. Very interesting. Wondering if this is a nuance on Pi. I have some spare Pi SBCs around, I may tinker with this. – Ronald Coe Jr. Jan 20 '22 at 14:18
  • I have 3 PIs, all same model, all same OS and version, all updated and only one of them does this. I've been trying to fix this for a few days now and every time I find some network related clue, it turns out to be identical on all 3 of them. Strange is putting it mildly. One is running a custom weather program, one is running pi-hole and the one with the problem is running IRedMail, Radicale and a custom shopping program. – Kingfranz Jan 20 '22 at 15:19