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: 2534
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: 1051
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.

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)

Post Reply

Return to “CentOS 8 - Networking Support”