Configure automatic DHCP on boot

Issues related to configuring your network
Post Reply
liminalsunset
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?

Thanks

User avatar
jlehtone
Posts: 4523
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

lightman47
Posts: 1521
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?

summitflier
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)

pghood
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