I have six similar RHEL 6 servers in the lab and the settings are same in all the servers. The settings are,
static IP address: 129.XXX.XXX.XX Subnet Mask: 255.255.254.0 Default Gateway: 129.XXX.XXX.1
My default gateway has suddenly stopped working in one of the servers (server1) and am investigating what caused this issue.
Now, if I do
route -n in server1, I get the output as,
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 129.XXX.XXX.0 0.0.0.0 255.255.254.0 U 1 0 0 eth0
I suspected it could be firewall issue but I checked with the school network and the firewall is configured correctly. My
/etc/hosts file is as below.
127.0.0.1 server1.xxx.edu localhost
/etc/resolv.conf is as below.
# Generated by NetworkManager search xxx.edu. xxx.edu nameserver 129.xxx.xx.xx
In server2 which belongs to the same network as server1,
route -n gives the output as below.
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 129.xxx.xxx.0 0.0.0.0 255.255.254.0 U 1 0 0 eth2 0.0.0.0 129.xxx.xxx.1 0.0.0.0 UG 0 0 0 eth2
I am trying to figure out if am missing something else.
The contents of
/etc/sysconfig/network on server1,
NETWORKING=yes HOSTNAME=server1.xxx.edu GATEWAY=255.255.254.0
After I changed the default gateway, if I execute
route -n command the output is as below.
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 129.xxx.xxx.0 0.0.0.0 255.255.254.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
I also tried removing the default gateway entry in the
/etc/sysconfig/networks file as well. But I get the same output for
route -n as above.
cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0" NM_CONTROLLED="yes" ONBOOT=yes TYPE=Ethernet BOOTPROTO=none IPADDR=129.xxx.xxx.xx PREFIX=23 GATEWAY=129.xxx.xxx.1 DNS1=129.xxx.xx.xx DOMAIN=xxx.edu. DEFROUTE=no IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth0" LAST_CONNECT=1406927310