1

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 192.168.1.1. 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 0.0.0.0/0 gw 192.168.1.1

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=192.168.1.1 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: 192.168.1.110
Subnet: 255.255.255.0
Gateway IP: 192.168.1.1

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

/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0"
BOOTPROTO=none
NM_CONTROLLED="yes"
ONBOOT=yes
TYPE="Ethernet"
UUID="0e8f1aa3-a071-4de1-90d8-561204faf2f3"
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
HWADDR=00:22:4D:A0:0A:CF
IPADDR=192.168.1.110
PREFIX=24
DNS1=8.8.8.8

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.

4
  • Add the content of the ifcfg-eth0 file to your post please. Mar 28, 2013 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, 2013 at 1:26
  • can you show the output of route -n before you run the route command
    – Mike
    Mar 28, 2013 at 5:00
  • Thanks for your help so far. I have answered all your questions in the post itself now.
    – blaine
    Mar 28, 2013 at 14:02

2 Answers 2

2

That's the way the minimal install works.

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

http://wiki.centos.org/Manuals/ReleaseNotes/CentOSMinimalCD6.4

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.

0
1

Add the line

GATEWAY=192.168.1.1

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .