I'm trying to set up a new box with CentOS7.2. I have an existing box already running (now up to 7.3) on the same subnet, although in a different physical room in my building (existing box is in a "server room"), and the new box is sitting on my desk, connected to a switch that my laptop is also connected to.

My laptop has no trouble reaching the network.

I've configured a static ip and fqhn on the new box. The output from "ip addr" reflects this.

On the first box, in "/etc/sysconfig/network-scripts", I have "ifcfg-eno1" configured with my static ip, gateway ip, and other flags. This appears to work fine.

On the new box, I found "ifcfg-enp0s31f6" in "/etc/sysconfig". I added my static ip and the same gateway ip as the first box.

I've rebooted the new box, to be sure.

However, when all this is done, it doesn't seem like it's getting to the network. I can't ping the gateway IP or the other box that I set up, or any other IP that I've tried. They all say "Destination Host Unreachable".

What else might I be doing wrong?


It seems like NetworkManager isn't picking up your edits (even though it really should have after a reboot).

First make sure that your network is actually managed by NetworkManager

systemctl status NetworkManager.service

If that is active, check the output of journalctl -u NetworkManager for any errors.

Check what the actual NetworkManager setting seems to be via nmcli dev show [devicename] and nmcli con show to list all connections, then nmcli con show [connectionname] to print all configurations.

Other than that,...

  • It could be a permissions problem on the files in /etc/sysconfig/network-scripts
  • You could try forcing NetworkManager to load the configuration in the file with nmcli con load /path/to/config/file
  • Make sure that nmcli con show [connectionname] shows that ipv4.method is set to manual, and not auto.
  • You could set the static IP, gateway IP and other things through nmcli directly. To change the static IP for instance, use nmcli con mod enp0s3 ipv4.addr, if your connection name is enp0s3.
| improve this answer | |
  • Thanks for this. Unfortunately, all the checks you suggest seem to show perfectly normal output, with no errors. The service is up, with no errors, nmcli shows the correct ip and gateway, ipv4.method is manual. I guess I'll have to try a different cat5 cable. – David M. Karr Apr 14 '17 at 15:30
  • A different cat5 cable made no difference. Still get "Destination Host Unreachable" from the new box, trying to ping the older box, or any other existing valid IP. – David M. Karr Apr 14 '17 at 16:00
  • "Destination host unreachable" indicates a routing problem on the local machine. Check the routing table (with ip route and under ipv4.routes in the output of nmcli con show [connectionname]). Make sure you have the gateway and the netmask set correctly. Compare with your laptop configuration if necessary. – user6075516 Apr 14 '17 at 22:44
  • Actually, I fixed this an hour or so ago and hadn't updated this yet. The problem was that the gateway IP I was using only works when the box is connected in the same room as the other box using the same gateway. It doesn't work when I use it from my desk. Once I installed it in our "server room" it worked immediately. – David M. Karr Apr 14 '17 at 23:57

Well, the actual answer is probably unfair to all of you :) , as an assumption I stated in the posting was incorrect. I had assumed my desk was on the same subnet as the "server room", so I assumed the gateway IP would work from my desk. I was wrong on both counts. Once I moved the box to the server room, it worked perfectly fine.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.