1

I am just trying to understand the usage/purpose of NetworkManager in CentOS7/RHEL7. Because by disabling NetworkManager also, I don't loose my network connectivity as my network service is running.

Basically, I am trying to understand the difference between network and NetworkManager service linux.

  • The only real use case for NM is a tablet/laptop/smartphone frequently moving from one WiFi network to another. A stationary desktop or a server does not need it. But due to the "do as I say" mentality of Linux developers and distro builders, everyone must have it and you get flamed on if you speak up against it. – ajeh Jun 12 '18 at 17:19
3

Its purpose is to automatically detect, configure, and connect to a network whether wired or wireless such as VPN, DNS, static routes, addresses, etc which is why you'll see #Configured by NetworkManager in /etc/resolv.conf, for example. Although it will prefer wired connections, it will pick the best known wireless connection and whichever it deems to be the most reliable. It will also switch over to wired automatically if it's there.

It's not necessary and many (including me) disable it as most would rather manage their own network settings and don't need it done for them. It doesn't hurt to use it if the user is new and doesn't want to manage the network settings just yet but for someone who does, it can be an inconvenience with it's auto-configured settings (such as overriding the DNS server(s)) which is why you can rest assured that most experienced users will add NM_CONTROLLED = no to /etc/sysconfig/network-scripts/ifconfig-eth# so that they can do it on their own.

You are fine disabling it if you don't need it which is especially true if you have your own settings that you want to put into place. I'm not saying that NetworkManager is bad or that it completely stops a user from configuring the network to his or her liking but only that it isn't necessary and as its settings can be overridden anyway, it simply isn't needed.

  • "which is especially true if you have your own settings that you want to put into place" - This is a false statement. NetworkManager allows you to override any setting. IP, gateway, dns, routes, etc. Also most admins I know leave it on because it offers a lot more advanced functionality which you can't do with the legacy network scripts (also turning it off unfortunately breaks some automation tools that expect the distro defaults to be left alone). It also integrates with more tools as it's distro agnostic. – Patrick Jun 11 '18 at 23:28
  • 1
    @Patrick It isn't false. If you're going to put your own settings into place you don't need NetworkManager. Most of the admins that you know leave it on. That's fine. Most of the admins that I know turn it off including myself and the other admins where I work. Before you start throwing the term "false statement" around, it's important to understand the point that's being made. I said that it's fine to disable it if someone doesn't need it which is demonstrably true. You just said yourself that it allows you to override any setting so why do you need it if that's what you're going to do? – Nasir Riley Jun 12 '18 at 0:27
  • Then I would adjust your answer. As it is, it essentially reads that if you want to use your own settings, you can't use network manager. – Patrick Jun 12 '18 at 0:40
  • 1
    @Patrick I don't see where it says that but I'll add something at the bottom in the case that someone may interpret it that way. I'm not saying that it's terrible or that it makes it impossible to configure the network settings in the way that you want but only that it isn't necessary especially if you're just going to override its settings anyway. – Nasir Riley Jun 12 '18 at 0:43
  • There's one more thing that hasn't been covered: if you have applications that need to know about the state of the network connection, NetworkManager can provide that. The classical example would be a web browser: if you normally need a proxy to access external sites, but your proxy settings change while the browser is already running (e.g. because you fired up a VPN connection), is the browser going to know about it? If the browser is communicating with NetworkManager, the answer is yes. The traditional way would be either to restart the browser or to fiddle with its settings manually. – telcoM Jun 12 '18 at 8:50

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.