Categorized under: linux, OS, Quick Tips, servers

CentOS networking not active after installation

I needed to install a CentOS 6.4 server in a VM and after installing I was not able to hit anything on the Internet, or any network for that matter.  When I tried using the yum packages manager I received the error “Couldn’t resolve host ‘mirrorlist.centos.org…” and I was at a loss on what to do next.  I was not able to ping anything.

This led me to look into the networking and and upon opening the /etc/resolv.conf I found it totally empty.  So I then opened /etc/sysconfig/network-scripts/ifcfg-eth0 and found the issue.  The line “ONBOOT” was set to “no”.

The complete file /etc/sysconfig/network-scripts/ifcfg-eth0 after I altered it: (NOTE: the only thing I altered was the ONBOOT flag.)

DEVICE=eth0
HWADDR=09:00:27:D7:61:8D
TYPE=Ethernet
UUID=q93perfj-earf-ewrf-wqer-546877145475
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp

After changing “ONBOOT” to “yes”, then rebooted for the configuration to take effect, all is good now.  I probably could have simply done a networking restart, but reboot on a fresh system was pretty fast.

Comments

  1. I’ve been browsing online more than 3 hours today, yet I never found any interesting article like yours.


    Zach Smith
    June 26th, 2013

RSSSubscribe to my feed now.

About Me

Adam Culp (GeekyBoy)
Adam Culp (GeekyBoy) is a Zend PHP 5.3 certified engineer and member of the Zend Certification Advisory Board working as a Senior Professional Services Consultant at Zend Technologies. He enjoys technology and posts things he finds interesting to this blog, mostly so he remembers, but also to help others. As organizer of the South Florida PHP Users Group (SoFloPHP), as well as the SunshinePHP Developer Conference in Miami, he is passionate about the PHP community. He also created ReqHarbor.com to help others gather and manage application requirements, and set up OutsourceHarbor.com to help companies find great developers. Read More >>
Zend PHP 5.3 Certified Zend Certification Advisory Board
Pair with me

profile for Adam Culp at Stack Overflow, Q&A for professional and enthusiast programmers