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 22.214.171.124 nameserver 126.96.36.199 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=188.8.131.52 DNS4=184.108.40.206 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