20140818 disabling networkmanager step by step - plembo/onemoretech GitHub Wiki
title: Disabling NetworkManager Step by Step link: https://onemoretech.wordpress.com/2014/08/18/disabling-networkmanager-step-by-step/ author: phil2nc description: post_id: 8228 created: 2014/08/18 13:01:13 created_gmt: 2014/08/18 17:01:13 comment_status: closed post_name: disabling-networkmanager-step-by-step status: publish post_type: post
Disabling NetworkManager Step by Step
Just a short article to provide the steps for disabling NetworkManager in Fedora 17, 19, 20 (until upstream changes something so it doesn't work anymore). This should also apply to Red Hat Enterprise Linux 7. Here are the steps to replace NetworkManager with the traditonal network service. 1. Shut down and disable NetworkManager.
systemctl NetworkManager stop
systemctl disable NetworkManage
2. Make sure the following appear in /etc/sysconfig/network:
NETWORKING=yes
HOSTNAME=yourhost.example.com
GATEWAY=10.1.0.1
HOSTNAME is obvious. GATEWAY is the default gateway for your network. 3. Now modify /etc/hosts to add a line for your host IP and name:
127.0.0.1 localhost
::1 localhost6
10.1.0.30 myhost.example.com myhost
4. Your /etc/resolv.conf should have at least your local DNS servers (I usually add a couple of external ones as well -- just in case, in this example the Google's public DNS servers):
nameserver 10.1.0.8
nameserver 10.1.0.10
nameserver 8.8.8.8
nameserver 8.8.4.4
search example.com
5. Modify the existing ifcfg-* scripts for existing physical interfaces so they look something like this (note the example given is for my particular system on my particular network, adjust to conform to your own environment):
NM_CONTROLLED=no
DEVICE=eth0
HWADDR=18:13:63:cc:2f:4b
TYPE=Ethernet
BOOTPROTO=none
IPADDR=10.1.0.30
NETMASK=255.255.255.0
GATEWAY=10.1.0.1
DNS1=10.1.0.8
DNS2=10.1.0.10
DNS3=8.8.8.8
DNS4=8.8.4.4
ONBOOT=yes
USERCTL=no
Special Note: Be sure to include the directive "NM_CONTROLLED=no" in every script, including ifcfg-lo. Otherwise you will find NetworkManager raising its ugly head again and overwriting your network files. DEVICE will ordinarily be the name of the network interface. Consistent Network Device Naming is enabled by default on newer versions of Fedora, in most environments resulting in names like "em1" and "p4p1" rather than the traditional "eth0". Use the command "ip addr" as root to discover the names of the interfaces on your machine (you can also do "dmesg | grep network" to see the renaming of interfaces by udev). IPV6 parameters are ordinarily not required unless you're actually doing IPV6 networking. However, keep in mind that unless IPV6 networking is specifically disabled it will be active and the following default parameters applied:
IPV6_INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
6. Enable and restart the network.
systemctl enable network
systemctl restart network
References: Red Hat Enterprise Linux 7 Networking Guide.
Copyright 2004-2019 Phil Lembo