Today we encountered an issue on one of our CentOS 7 servers where the network become unavailable. Running "ifconfig" from the server console showed the devices "eth0" and "eth0:1" up and running as normal.
Next we tried restarting the interfaces with "ifdown eth0;ifup eth0" where the interface went down and did not com back up.
After some head scratching and further investigation it turns out the kernel had changed the name of the device from "eth0" to "enp1s0" based on the new naming convention for network device. It turns out that we needed up update the network scripts to reflect the name change.
To see if you have the same problem just run "dmesg | network" and look for something like:
[ 0.569951] drop_monitor: Initializing network drop monitor service [ 1.162946] systemd-udevd: renamed network interface eth0 to enp1s0
Here is what we had to do, note that we have substituted our public I.P. Addresses with private ones below.
1. Replace /etc/sysconfig/network-scripts/ifcfg-eth0 with /etc/sysconfig/network-scripts/ifcfg-enp1s0
2. Replace /etc/sysconfig/network-scripts/ifcfg-eth0:1 with /etc/sysconfig/network-scripts/ifcfg-enp1s0.1
PHYSDEV=enp1s0 DEVICE=enp1s0.1 VLAN=yes BOOTPROTO=static IPADDR=192.168.1.3 NETMASK=255.255.255.0 ONBOOT=yes TYPE=Vlan VLAN_ID=1
Hopefully this will be of help to anyone else who encounters the same problem. Please email us if you have any comments, [email protected]