I am testing a server configuration using CentOS 6.4. I do a minimal install and in the process of installing choose eth0 to be enabled at boot and enter a static IP address and gateway.

When I boot the system up I can ping the router at I can not ping google.com nor yahoo.com. I can not ping any external IP addresses outside of my local network. I can SSH from to this system from a system on the same local network (subnet)

If I run:

route add -net gw

everything works great. Until I restart that is. Then the same thing happens. I must run that command first.

I have tried various forms of editing /etc/sysconfig/network-scripts/ifcfg-eth0 as well as /etc/sysconfig/network-scripts/route-eth0

I have tried adding a GATEWAY= line to /etc/sysconfig/network

I've tried playing with NetworkManger and installing through yum, and that seemed to make things worse. All without luck.

So at this point I have just done a complete reinstall from the DVD ISO to confirm I didn't imagine it all with all of the configuration changes I've made, and I still have the same issue.

Can someone please tell me what the best way of handling this is?

My info is:

IP address of machine:
Gateway IP:

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   U     0      0        0 eth0     U     1002   0        0 eth0


NAME="System eth0"

Before the install process I ran the media check on the DVD I burned it onto. Before that I verified the MD5sum of the ISO file as well.

  • Add the content of the ifcfg-eth0 file to your post please. – Dennis Kaarsemaker Mar 28 '13 at 1:04
  • Also, can you verify if you have indeed checked the ISO to ensure checksums match? Just to rule out any issues with the install medium (not that it sounds like there should be any, but at least we can rule it out of the equation) – Wayne Mar 28 '13 at 1:26
  • can you show the output of route -n before you run the route command – Mike Mar 28 '13 at 5:00
  • Thanks for your help so far. I have answered all your questions in the post itself now. – blaine Mar 28 '13 at 14:02

That's the way the minimal install works.

Why it's not sticking is another thing (MadHatter answered as I was finishing), add GATEWAY= to the ifcfg-eth0 file.


If you did not configure the network during installation ( see CentOS-6 FAQ#2) then:

make sure that the interface is activated at boot time ( set the ONBOOT parameter in the interface configuration file to "yes"). if you are not using DHCP, you will have to manually configure your network interfaces because NetworkManager is not included. Documentation is here. Do not forget about DNS and default route.


Add the line


to /etc/sysconfig/network-scripts/ifcfg-eth0, and either do service network restart, or reboot. And make really sure NetworkManager's disabled by changing NM_CONTROLLED="yes" to NM_CONTROLLED="no" in the same file, that thing's a vile horror for servers.

  • Thanks for the info on the NM_CONTROLLED flag as well. I changed this too. – blaine Mar 28 '13 at 15:09

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.