15

Hi I am new to Fedora/Centos/RHEL. I am confused about NetworkManager and network service in these Linux OS. May I know what is the relation between NetworkManager and network service?

If I am using NetworkManager, do i need to turn off network service? Similarly, if I am using network service, do I need to turn off NetworkManager? Will they conflict with each other if I use both application at the same time?

userpal
  • 593
  • 3
  • 9
  • 17

3 Answers3

16

Working on this question in Fedora 20. Have quick diagram of the files involved, as it might be useful to anyone who comes along.

Files dealing with networking in Fedora 20

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
David Tonhofer
  • 910
  • 1
  • 9
  • 29
  • 2
    I normally prefer text as a communication medium but a graphical answer is wholly appropriate to describe the complicated relationships between all the different networking components and their corresponding configuration files. Great answer! – Anthony Geoghegan Jul 14 '15 at 11:51
12

Just disable the NetworkManager service if you're working with server systems. It is not installed on the production systems I deploy because of its ill interaction with normal services.

It has no place in a server deployment mainly because it is for enabling interfaces during interactive user sessions.

ewwhite
  • 194,921
  • 91
  • 434
  • 799
  • 3
    Just to add a small note ;) networkmanager might be the default and de-facto standard in upcoming releases. – Soham Chakraborty Aug 15 '13 at 17:26
  • 1
    @SohamChakraborty Should I bother incorporating NetworkManager into my installations? I don't think it offers any benefit in its current form. – ewwhite Aug 15 '13 at 17:51
  • No no. not in current form. Might be one major release upward ;) you know what I mean. It has went tremendous improvement however. I will ping you on chat. That's a better place to discuss things like this. – Soham Chakraborty Aug 16 '13 at 02:10
  • 1
    It would be grateful if you add why should disable NetworkManager on Production, root cause – Rahul Patil Feb 04 '14 at 10:13
  • 1
    @RahulPatil because it's heavy, has a lot of unneeded functionality, is a program designed for desktops, basically it just sucks and has no place on a server where networking (usually) is just a matter of setting an IP on an Ethernet interface and adding a default route. –  Mar 11 '15 at 21:54
  • Interesting, I wonder why rhel makes it as default... – Alexis May 13 '21 at 15:01
5

We ran into a conflict between NetworkManager and network service on a recent install of CentOS 6.4 64-bit. "NetInstall"ed CentOS as a server (with additional packages), which created a system with both NetworkManager and network service managing eth0 (primary network card). System had a fixed IP address obtained from central DHCP service. No apparent problems on initial installation, but a few weeks later (probably when the system renewed its DHCP lease), 2 DHCP requests were made, and the University DNS system cached the 2nd (incorrect) IP address for the server, effectively taking it out of service.

For us, the solution was to disable NetworkServices (with chkconfig), and add entries in /etc/sysconfig/network-scripts/ifcfg-eth0 to make sure the NIC was controlled by network service and configured at bootup. Steps taken were:

  1. chkconfig NetworkManager off

  2. vi /etc/sysconfig/network-scripts/ifcfg-eth0

    a. Change NM_Controlled="yes" to "no"

    b. Change ONBOOT="no" to "yes"

    c. Add DHCP_HOSTNAME=hostname.domain.edu

    d. Add DHCP_CLIENT_ID=hostname.domain.edu

As discussed in the fedoraforum referenced above, this is appropriate for a server with physical network cabling, but would not be appropriate for a laptop or other machine connecting via WiFi. In that case the better solution would be to disable the network service and use NetworkServices to manage network connectivity instead.

kane freehold
  • 51
  • 1
  • 1