Score:1

dhcp client doesn't start on boot

us flag

I am using ubuntu 20.04 desktop and one day after booting up my PC, without me touching anything, the internet wasn't working. So after about an hour of frustration I found the magic commad that fixed the issue: sudo dhclient enp7s0

The problem is that now every time I reboot my computer, the interent doesn't work again, until I run this command. So for some reason the dhcp client isn't being started on boot anymore. What can I do to fix this issue?

I can probably set some sort of cronjob to run this command after boot, but that would be a terrible solution, as the networking manager should be able to start the dhcp client on its own.

frippe avatar
ug flag
What network manager are you using and were you using `dhclient` as your DHCP client before? If you by any chance are using `NetworkManager`, it uses an internal DHCP client implementation by default, so that's where I'd start troubleshooting.
Askerman avatar
us flag
@frippe I am using whatever came by defaut with that distribution of ubuntu, I didn't do anything custom, it was just a clean install from the .iso image,
frippe avatar
ug flag
IIRC, the default installation uses netplan and NetworkManager. Since you haven't changed anything, the issues seem to be with the NetworkManger dhcp client and not that dhclient doesn't start on boot (which it shouldn't be expected to do since you haven't configured it to be used). First step should be to check the logs for any dhcp errors.
chili555 avatar
cn flag
Are there any warnings or other clues following this command? `sudo service NetworkManager restart`
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.