Configure automatic DHCP on boot

Issues related to configuring your network
Post Reply
Posts: 1
Joined: 2019/12/29 00:23:32

Configure automatic DHCP on boot

Post by liminalsunset » 2019/12/29 00:35:16

Hi all,

I have CentOS 8 on a fairly standard PC with two NICs, enp5s0 and enp6s0.
I have tried using nmtui to set up enp5s0 to automatically connect and DHCP on boot, however it does not do this. Manually running dhclient enp5s0 allows the interface to acquire an IP address normally but this does not happen automatically.

The contents of the config file are standard. Is there anything that needs to happen specifically to make this work?


User avatar
Posts: 3033
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Configure automatic DHCP on boot

Post by jlehtone » 2019/12/29 12:06:50

There should not be. To act as dhcp client is the default for connections.

Can you show:

Code: Select all

nmcli con show enp5s0

Posts: 1182
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: Configure automatic DHCP on boot

Post by lightman47 » 2020/01/18 20:45:43

Might you have edited settings in the adapter files perhaps?
Remember - importing/building packages will likely "byte you in the butt" come update time, long after you'd forgotten you did that! Use repos whenever possible.

Posts: 13
Joined: 2020/01/22 22:16:05

Re: Configure automatic DHCP on boot

Post by summitflier » 2020/01/22 22:20:38

You might have to auto-enable the connection.

nmcli con mod enp5s0 connection.autoconnect yes

(change enp5s0 to whatever the connection name is)

Posts: 1
Joined: 2020/02/28 20:56:56

Re: Configure automatic DHCP on boot

Post by pghood » 2020/02/28 21:15:48

I am having this same issue.

nmcli con mod eno1 connection.autoconnection yes

did not solve the problem.

When I check the configuration settings, autoconnection is clearly enabled, but I still have to use dhclient (and sometimes dhclient -r followed by dhclient) on each boot.
Has anyone seen something similar?

Post Reply

Return to “CentOS 8 - Networking Support”