How to uninstall NetworkManager in RHEL7?
I'm using /etc/sysconfig/network-scripts files to configure my network.
So I guess I can uninstall NetworkManager and may be something else?
(I noticed "ModemManager" in the list of running process which I want to remove it too).
How should I do this in RHEL 7? Should I use NM_CONTROLLED=no flag and where (phisical interfaces, bonds, teams, vlans?) How can I remove ModemManager from the list of running processes?
Responses
Hi Oleg,
You can disable NetworkManager using the systemctl tool:
systemctl stop NetworkManager
systemctl disable NetworkManager
Also, see the Networking Guide: NetworkManager and the Network Scripts.
Can you tell us what you are trying to achieve? The guides document many common tasks so we are interested to know what task you have in mind when you ask these questions.
BTW, ifconfig is deprecated.
Also note there are no runlevels in RHEL7, see the Managing Services with systemd chapter in the Enterprise Linux 7 System Administrators' Guide.
The link to the guide that Robert posted in the first reply is applicable to your question. Here is the non-Beta version NetworkManager and the Network Scripts
The phrase "traditional ifcfg type configuration files are still supported" means that NetworkManager can read them, or if you disable it then the network service will read them.
What do you see if you do:
systemctl status network
You could open a support case for that, I cannot think why LACP does not work when NetworkManager is disabled.
As to latency, I cannot see why this would make a difference, the traffic is not passing through the user space code which is doing the configuring. But I am just a humble scribe, so I will check that with someone with more in depth knowledge of NetworkManager and the network service.
Until you can find out why LACP was not working as expected, why not leave things at there default settings? You can optionally use NM_CONTROLLED=no if you prefer.
You should mask it first, otherwise another process can re-activate it over D-Bus.
systemctl mask NetworkManager
systemctl stop NetworkManager
systemctl disable NetworkManager
But this is not strictly necessary, you can use network scripts and still leave NetworkManager running.
In regards to one of the original questions: "How to uninstall NetworkManager in RHEL7?"
Is that actually a supported approach (specifically uninstalling)? I have not attempted such a thing and I don't even know if it would allow you to (due to dependencies) - but if we knew, for certain, that you should NOT remove NetworkManager (and instead disable, as suggested) then we won't have folks trying to do so ;-)
Oleg Vazhnev,
Although "classic networking" is still supported, NetworkManager is the prefered way to go for RHEL7.
Some new functionality will not be available in "classic networking", I heard this during the RH300 training.
As with every rpm you can remove it, I cannot tell you what would break on RHEL 7, for I did not uninstall it.
I am preparing for a re-exam for RHCE 7.
Kind regards,
Jan Gerrit Kootstra
Valid concerns Oleg.
However, NetworkManager has been updated to do quite a bit more than previous iterations. Myself, I used to view NM as an "added feature" to manage the network environment on something like my desktop (where situations/conditions changed frequently) so I was not having to deal with network manually.
I am absolutely positive I would not be able to convey it's value (so I won't try ;-)
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec-Introduction_to_NetworkManager.html
I found this doc to be fairly helpful (and addresses some questions you may have)
https://access.redhat.com/solutions/783533
EDIT: I was a bit curious also regarding the memory usage. If I did this correctly... it appears my desktop (RHEL 7 Workstation) is using about 11MB
cat /proc/`ps -ef | grep /usr/sbin/NetworkManager | grep -v grep | awk '{ print $2 }'`/smaps | egrep '^Rss' | awk '{ SUM += $2 } END { print SUM }'
11276
Hello, I just found this thread, while looking into why PolKit is getting installed on my server build for RHEL 7. Turns out that Polkit is a dependency for Network Manager. Thus, it might be reasonable that, if you have a kickstart method to load your installation, you might be able to avoid loading Network Manager altogether if you simply do not install it to begin with. Just a suggestion, I may test this idea and report back.
I'm having a similar issue. I did a "yum remove NetworkManager" and configured some VLANs using the ip commands. On reboot they fail to come up because the 8021q module just doesn't load anymore. 8021q.ko exists and is in the correct location. I tried specifying 8021q in /etc/modules-load.d/8021q.conf, and it's even mentioned in messages:
systemd-modules-load: Inserted module '8021q'
kernel: 8021q: 802.1Q VLAN Support v1.8
but after boot lsmod still doesn't show 8021q loaded. Once I manually do a "modprobe 8021q" and re-add the VLANs it's ok.
Hello, if the configuration file is correct it should, since RHEL6 days, load the module and "modprobe 8021q" should not be required. But I was told it loads it when its required, which I think means it would not be loaded until the interface came up.
Do you have VLAN=yes in the VLAN interface config file?
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
