1

On a CentOS 7 laptop I wish to have the Ethernet (wired) network connection work automatically (run DHCP upon cable connection without user interaction) and the Wi-Fi be managed by the user via NetworkManager (this works). The Ethernet cable is not usually connected during boot.

Currently, nothing happens when I plug in a network cable; I need to start dhclient enp1s0f1 & manually as root to initiate DHCP.

This is my /etc/sysconfig/network-scripts/ifcfg-enp1s0f1 for the Ethernet port:

TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp1s0f1
UUID=01234567-89ab-cdef-0123-456789abcdef
DEVICE=enp1s0f1
ONBOOT=yes
PEERDNS=yes
PEERROUTES=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_PRIVACY=rfc3041
NM_CONTROLLED=no

The use of network manager for wired networking is neither useful nor desired in my setup / use cases - and should not be necessary, I would think?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.