CentOS - Job for network.service failed
Ugh. Ok, so something I came across today that I figured might help someone else out in the future. I'm setting up a new CentOS 7 box and while I was doing that I kept having intermittent network connectivity issues. For some reason I decided NetworkManager needed to get out of my way... so I went about the process of disabling all that nonsense and went back to doing network config the way I know how. I set a reservation in DHCP (temporary), and set ifcfg-eth0 as a static IP along with all the other relevant pieces to get the interface manually configured.
Problem was I couldn't get the network to come up. Here was my first issue:
Naturally I follow directions and ran "systemctl status network.service -l" and was greeted with:
Relevant bits highlighted. Now I'm pretty sure nothing is using that address since I got it from DHCP ... so a bit of Googling led me to this link. The explanation here is that when ifup-eth runs it does an arping to determine if anything is using that address, and if anything replies then it exists the script. The offending section is this:
So, I ran the same thing from the command line and sure enough I got a response. Interesting. Well long story short here, you have two options:
- Bypass that section of the ifup-eth script (/etc/sysconfig/network-scripts/ifup-eth)
- Find who owns that address. (IP scanner/nslookup/whatever)
In my case, I found it as an undocumented secondary IP on a box sitting under a desk that someone had setup and didn't roll into production yet. Why they statically assigned it from an address in the DHCP scope instead of something outside the scope is a topic for another discussion.