Linux – Can’t ping ip’s or hostnames on fresh CentOS 6.2 install

centoscentos-6linux

I just installed CentOS 6.2 on a box using ipmi and have tried setting up the network with no luck.

I've got a 66.x.x.56/29 allocation of ip addresses on vlan (66.x.x.56 to 66.x.x.63), so I have set up 5 ips on one of the nics. 66.x.x.57 is the gateway.

My problem is I can ping any of the 5 ip's on eth1 and get a response, but I cannot ping the gateway or any other ip/hostname. Basically, no outside connections..

/etc/resolv.conf:

nameserver 8.8.8.8
nameserver 8.8.4.4

/etc/sysconfig/network

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=hostname.mydomain.com
GATEWAY=66.x.x.57

/etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE="eth1"
BOOTPROTO=none
IPADDR=66.x.x.58
NETMASK=255.255.255.248
ONBOOT=yes

/etc/sysconfig/network-scripts/ifcfg-eth1:1

DEVICE="eth1:1"
BOOTPROTO=none
IPADDR=66.x.x.59
NETMASK=255.255.255.248
ONBOOT=yes

/etc/sysconfig/network-scripts/ifcfg-eth1:2

DEVICE="eth1:2"
BOOTPROTO=none
IPADDR=66.x.x.60
NETMASK=255.255.255.248
ONBOOT=yes

/etc/sysconfig/network-scripts/ifcfg-eth1:3

DEVICE="eth1:3"
BOOTPROTO=none
IPADDR=66.x.x.61
NETMASK=255.255.255.248
ONBOOT=yes

/etc/sysconfig/network-scripts/ifcfg-eth1:4

DEVICE="eth1:4"
BOOTPROTO=none
IPADDR=66.x.x.62
NETMASK=255.255.255.248
ONBOOT=yes

route -n

Dest           Gateway       Genmask            Flags   Metric   Ref  Use   Iface
66.x.x.56      0.0.0.0       255.255.255.248    U       0        0    0     eth1
169.254.0.0    0.0.0.0       255.255.0.0        U       1003     0    0     eth1
0.0.0.0        66.x.x.57     0.0.0.0            UG      0        0    0     eth1

Please let me know if I left anything out.I included anything that I thought was necessary! Any help is greatly appreciated!

Best Answer

.56 is the subnet address. You can't use it as a host address. When you try to reach the gateway, the source IP address is the subnet address, leaving the gateway baffled as to how to respond. By assigning .56 to the physical interface, you have made it the default source IP address.

Related Question