2

I have my eth0 interface configured with netplan with static IP address. I have applied the changes using 'netplan apply'. The interface gets the static IP address so its fine.

But after a while, the configurations applied using netplan, gets overriden, and the interface will get DHCP IP address instead. Not sure what is over-riding the configuration. When ever this happens, i will have to do a 'netplan apply' to revert it back to static IP address. This is my netplan configuration.

network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      addresses:
        - 10.3.20.12/24
      gateway4: 10.3.20.1
      nameservers:
          addresses: [127.0.0.53, 10.3.20.2,10.3.20.3]

Since I have used 'networkd' as my renderer, i have disabled 'NetworkManager' service as well. Even after this my interface configuration gets overwritten with DHCP! Any suggestions appreciated!

2
  • Has Network Manager respawned when you have a DHCP address? Check: ps aux | grep Network Welcome to Ask Ubuntu.
    – chili555
    Feb 11, 2020 at 15:20
  • The NetworkManager is not running. ps aux| grep Network* returns nothing. And even the NetworkManager process is stopped and disabled. Feb 12, 2020 at 3:48

1 Answer 1

1

Okay, found the culprit.

It was 'dhclient' that was running in the background which was fetching DHCP address and updating the interface configs!!

Found this out by trial and error.

Would be great if i could figure this out from any of the system logs, that indicates dhclient process trying to update the configs. This would have saved time to troubleshoot! Where can I look for such logs?

3
  • This isn't an answer with the question you've stated in there. That said, dhclient spits to /var/log/syslog when run as a daemon process, so you could grep your syslogs for dhclient
    – Thomas Ward
    Feb 26, 2020 at 14:36
  • Thank you for response Thomas. As stated in the description, in spite of applying netplan configuration, some other process was overriding, and hence configuration applied through netplan was not consistent. And it turned out, that other process was dhclient in my case! Let me know if anything in the question needs to be stated more clearly, i will be happy to edit it! Feb 27, 2020 at 3:08
  • 1
    And yeah, thanks for the pointer, I was able to see dhclient activity in the syslog! Feb 27, 2020 at 3:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .