Disabling Network Manager and enabling network.service causes 'Network is unreachable' error

Issues related to configuring your network
Post Reply
jentos
Posts: 4
Joined: 2018/09/28 08:18:18

Disabling Network Manager and enabling network.service causes 'Network is unreachable' error

Post by jentos » 2018/09/28 08:23:52

I installed CentOS 7 using the minimal ISO on my Proxmox VPS (Hosted on SoYouStart / OVH - noted since they have weird networking policies), configured my ifcfg-eth0 file. After that I was able to use yum update, ping 8.8.8.8, connect via SSH, etc.

After following this guide to disable network manager - I'm no longer able to do anything network related, including pinging 8.8.8.8 (I get 'connect: Network is unreachable')

My ifcfg-eth0:

Code: Select all

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO="none"
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth0
UUID=My UUID
DEVICE=eth0
ONBOOT="yes"
HWADDR=My VPS's virtual mac
IPADDR=XXX.XXX.192.145
PREFIX=24
GATEWAY=Main IP on my proxmox box gateway IP (XXX.XXX.XXX.254)
DNS1=8.8.8.8
DNS2=8.8.4.4
IPV6_PRIVACY=no
ARPCHECK="no"
NETMASK=255.255.255.255

tunk
Posts: 1205
Joined: 2017/02/22 15:08:17

Re: Disabling Network Manager and enabling network.service causes 'Network is unreachable' error

Post by tunk » 2018/09/28 11:43:21

Are you sure it's called eth0? - the default in CentOS 7 is something else like em1 or enp3s0.
Last edited by tunk on 2018/09/28 15:12:53, edited 1 time in total.

jentos
Posts: 4
Joined: 2018/09/28 08:18:18

Re: Disabling Network Manager and enabling network.service causes 'Network is unreachable' error

Post by jentos » 2018/09/28 13:16:18

tunk wrote:
2018/09/28 11:43:21
Are you sure it's called eth0? - the defult in CentOS 7 is something else like em1 or enp3s0.
eth0 is what was autoassigned on installation, and what worked with NetworkManager. How do I change it to test to see if it's something different for network.service?

tunk
Posts: 1205
Joined: 2017/02/22 15:08:17

Re: Disabling Network Manager and enabling network.service causes 'Network is unreachable' error

Post by tunk » 2018/09/28 15:01:54

Your NETMASK may be a bit restrictive.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Disabling Network Manager and enabling network.service causes 'Network is unreachable' error

Post by TrevorH » 2018/09/28 15:31:36

OVH have a very weird networking setup where the default gateway is not within the same subnet as the ip assigned to the server. You have to add an explicit route to that gateway via the ethernet device itself, not via another ip.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

jentos
Posts: 4
Joined: 2018/09/28 08:18:18

Re: Disabling Network Manager and enabling network.service causes 'Network is unreachable' error

Post by jentos » 2018/09/28 21:03:38

How do I do these things? I'm completely new to CentOS and don't have much experience with networking

stevemowbray
Posts: 519
Joined: 2012/06/26 14:20:47

Re: Disabling Network Manager and enabling network.service causes 'Network is unreachable' error

Post by stevemowbray » 2018/10/01 11:48:02

In that case maybe you should just stick with the default NetworkManager setup. Why are you trying to change it?

tunk
Posts: 1205
Joined: 2017/02/22 15:08:17

Re: Disabling Network Manager and enabling network.service causes 'Network is unreachable' error

Post by tunk » 2018/10/01 12:29:45

I don't know if it will work, but you could try NETMASK=255.255.0.0

jentos
Posts: 4
Joined: 2018/09/28 08:18:18

Re: Disabling Network Manager and enabling network.service causes 'Network is unreachable' error

Post by jentos » 2018/10/01 13:55:52

stevemowbray wrote:
2018/10/01 11:48:02
In that case maybe you should just stick with the default NetworkManager setup. Why are you trying to change it?
Because cPanel doesn't work with NetworkManager

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Disabling Network Manager and enabling network.service causes 'Network is unreachable' error

Post by TrevorH » 2018/10/01 17:11:07

OVH have instructions on how to configure their own weird brand of networking. You need to ask them about it as they are the only people that do things in this weird way. You have to add an explicit route for the gateway ip address via the correct network device and then set up your default route to go via that gateway after that. Expressed in `ip` commands it's something like

ip route add 1.2.3.4 via dev eth0
ip route add default via 1.2.3.4

How you set up the system to do this is OVH's problem. Sorry.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply