I have problem with my centos box. After upgrading few packages, after some time network get broken.
What happens is that eth0 is not functional anymore. Only error in log file I have found was this one:
Invalid IP4 netmask 'NETMASK0' "0.0.0.0"
After some research I figured out it was problem with route-eth0 config file because network starts, but routes are not added. If I add them manually, then all goes fine.
Without it, routing table is very strange one:
[root@CentOS-70-64-minimal network-scripts]# route -e Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface default gateway 0.0.0.0 UG 0 0 0 eth1 default gateway 0.0.0.0 UG 0 0 0 eth0 gateway 0.0.0.0 255.255.255.255 UH 0 0 0 eth0 CentOS-70-64-mi 0.0.0.0 255.255.255.255 UH 0 0 0 eth0 link-local 0.0.0.0 255.255.0.0 U 0 0 0 eth0 22.214.171.124 gateway 255.255.255.255 UGH 0 0 0 eth0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
It is CentOS Linux release 7.2.1511 (Core).
DEVICE=eth0 BOOTPROTO=none ONBOOT=yes HWADDR=44:8A:5B:D8:74:B3 IPADDR=126.96.36.199 NETMASK=255.255.255.255 SCOPE="peer 188.8.131.52" IPV6INIT=yes IPV6ADDR=2a01:4f8:212:283::2/64 IPV6_DEFAULTGW=fe80::1 IPV6_DEFAULTDEV=eth0
# routing for eth0 ADDRESS0=0.0.0.0 NETMASK0=0.0.0.0 GATEWAY0=184.108.40.206
Btw, eth1 is working fine. Also on other server all interfaces are working with same configuration.
Problem may be because it was centos 6 and then updated to centos 7. Maybe some setting left and make problem.
Because site is live, I made temporary solution adding this line to crontab to run every minute: