Page 1 of 1

Configure automatic DHCP on boot

Posted: 2019/12/29 00:35:16
by liminalsunset
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

Re: Configure automatic DHCP on boot

Posted: 2019/12/29 12:06:50
by jlehtone
There should not be. To act as dhcp client is the default for connections.

Can you show:

Code: Select all

nmcli con show enp5s0

Re: Configure automatic DHCP on boot

Posted: 2020/01/18 20:45:43
by lightman47
Might you have edited settings in the adapter files perhaps?

Re: Configure automatic DHCP on boot

Posted: 2020/01/22 22:20:38
by summitflier
You might have to auto-enable the connection.

nmcli con mod enp5s0 connection.autoconnect yes

(change enp5s0 to whatever the connection name is)