Do you ever run into this issue? You need to reconfigure networking and do a network restart and this happens:
# service network restart Shutting down interface eth0: [ OK ] Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface eth0: Determining if ip address 192.0.2.1 is already in use for device eth0... Determining if ip address 192.0.2.2 is already in use for device eth0... Determining if ip address 192.0.2.3 is already in use for device eth0... Determining if ip address 192.0.2.4 is already in use for device eth0... Determining if ip address 192.0.2.5 is already in use for device eth0... Determining if ip address 192.0.2.6 is already in use for device eth0... [ OK ]Code language: CSS (css)
That duplicate ip address check takes a LONG time. On a large web server, you may have hundreds of IP addresses defined for SSL-based websites, and that means your server could take up to 15 or even 30 minutes to restart networking or boot up initially; turning your maintenance windows into a nightmare. This behavior was introduced somewhere around RHEL/CentOS 6.3+ and uses ARP to do the check of each and every IP.
Fortunately, it is easily disabled if you want to revert back to the earlier behavior. No I don’t know why some idiot decided once again that changing default behavior would be a great idea. Just add this to your interface files:
Initially, I thought it could just be added to /etc/sysconfig/network and it would affect all IP’s on the server but that didn’t seem to work. Instead, it has to be added to each interface file. This is pretty easy to do manually if you use range files like /etc/sysconfig/network-scripts/ifcfg-eth0-range0 to define all of your IP’s, but if you use individual files for each IP, like what you’d end up with if you add IP’s through a control panel like Plesk, then you could have hundreds of /etc/sysconfig/network-scripts/ifcfg-eth0:# type files. In that case, use this command to add the arpcheck disable to all of them:
You may need to modify eth0 to em1 or similar depending on how your web server is configured.