1

On a fresh Fedora 24 install, I want to disable NetworkManager since I have a static IP and hate daemons.

If I do this after startup (as root), everything works fine:

ifconfig enp1s0 192.168.0.3 netmask 255.255.0.0 
ip route add default via 192.168.0.1 

What's the equivalent /etc/sysconfig/network-scripts/ifcfg-enp1s0 files? Following https://stackoverflow.com/questions/21432620/how-to-setup-static-ip-in-fedora-19 (which I realize is Fedora 19, not 24, but probably should work anyway), I did:

DEVICE="enp1s0" 
NM_CONTROLLED="no" 
NAME=enp1s0 
ONBOOT=yes 
TYPE=Ethernet 
BOOTPROTO=none 
DEFROUTE=yes 
IPV4_FAILURE_FATAL=no 
IPADDR=192.168.0.3 
NETMASK=255.255.0.0 
BROADCAST=192.168.255.255 
PEERDNS=yes 
PEERROUTES=yes 
IPV6INIT=no 
IPV6_AUTOCONF=yes 
IPV6_DEFROUTE=yes 
IPV6_PEERDNS=yes 
IPV6_PEERROUTES=yes 
IPV6_FAILURE_FATAL=no 
IPV6_ADDR_GEN_MODE=stable-privacy 
UUID=[masked though unlikely private] 
AUTOCONNECT_PRIORITY=-999 

but this doesn't work. If I reboot with the above, I get "network is unreachable".

I realize I could simply run my commands in a startup script, but am trying to do things the "right way" for now.

  • 1
    To delete all this fluff in Ubuntu/Debian I usually uninstall resolvconf and the package dependencies system pretty much take care of the rest. – Rui F Ribeiro Nov 28 '16 at 7:18
1

Fedora documentation says that NetworkManager is a default network daemon since Fedora 20. Most probably you should say sorry to it and get used to it.

However, you should still be able to use network daemon. Test it via command line:

systemctl start/stop/restart/status network

If it brings up network for you, enable it:

systemctl enable network

Although, as mentioned before, Network Manager is meant to handle your networks and network is more as a helper. Take a look here.

  • I'm trying to bring up a minimal Fedora 24 system, and believe static networks don't need daemons! I should point out that it ran by default, but I'm basically trying to kill as many daemons/processes as necessary :) – barrycarter Nov 27 '16 at 22:39
  • @barrycarter, I might used wrong words. Network service (not to use a daemon word) is responsible for bringing up network interfaces. I don't know fedora very well but RedHat, CentOS or Debian does not create any program that runs in the background. Network is only a script run on boot/shutdown that is responsible for bringing up a network. After it finishes it's work, nothing is left in background to watch status of network. Take a look what it does in start section at /etc/init.d/network. – Kalavan Nov 28 '16 at 7:20
1

Distable the network-manager:

systemctl stop NetworkManager.service
systemctl disable NetworkManager.service

Start and enable network.service:

systemctl restart network.service
systemctl enable network.service

Edit you /etc/sysconfig/network-scripts/ifcfg-enp1s0 change:

BOOTPROTO=none 
PEERDNS=yes 

To:

BOOTPROTO="static"
PEERDNS=no

Configure your /etc/resolv.conf then apply changes:

systemctl restart network.service

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.