Enabling an Ethernet connection on Centos7

I recently created a new Centos VM. When it booted, I noticed it did not have a working ethernet connection. So, I started playing with things, and got it working. Here are my notes:

To view connections

nmcli c

To bring up the connection was simple:

nmcli c up eth0

To make it persist across boots required the autoconnect value:

nmcli c mod eth0 connection.autoconnect yes

This last one reflects the ONBOOT value in the file /etc/sysconfig/network-scripts/ifcfg-eth0

Setting it changed ONBOOT from no to yes.

Rebooting the machine and ip addr shows the connection up.

6 thoughts on “Enabling an Ethernet connection on Centos7

  1. Thanks for the correction. I’ll need to confirm when next I bring up a C7.5 system. But since that is the right order on RHEL, I think you are correct.

  2. Hi,

    I installed CentOS 7 32 bit on my HP DV8000 laptop. Wireless connection is working fine but wired connection is not activated. In NetworkManager app even wired tab is disabled.
    # nmcli d
    DEVICE TYPE STATE CONNECTION
    wlp6s0 wifi connected HKNS-WIRELESS-2
    lo loopback unmanaged —
    No wired device is visible.
    # lspci |grep -i net
    06:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
    08:08.0 Ethernet controller: Intel Corporation PRO/100 VE Network Connection (rev 01)

    # lspci -nn -k |fgrep -i ether
    08:08.0 Ethernet controller [0200]: Intel Corporation PRO/100 VE Network Connection [8086:1092] (rev 01)

    How can I install the driver and activate the wired network adapter? Please help. Thanks in advance!

  3. I am stuck in a silly thing but not sure how to solve it. To enable Automarically Connect checkbox, I am clicking in ENTER button and I am not getting X . How can I enable it?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.