You can disable NetworkManager in RHEL 8 / CentOS 8 and still use the old network service/utility to manage network. You can also have the two services started, enabled and used at the same time just as it can be done in RHEL 7 / CentOS 7
Prior to RHEL 8 systems, the network service(network-scripts) used to be the default when you install Red Hat systems or CentOS systems. It has not only been replaced by NetworkManager daemon in RHEL 8 and CentOS 8 systems, it has also been deprecated.
However, you can disable NetworkManager and still use the old network service(network-scripts) to manage network , you can also use both services if you wish just as it can be done in RHEL/CentOS 7.
Follow the step by step process below to achieve this aim.
How To Disable NetworkManager In RHEL 8 / CentOS 8 To Use The Old network Service
1. Install the network-scripts package
[root@HQDEV1 ~]# yum install network-scripts Updating Subscription Management repositories. Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) 2.1 kB/s | 4.5 kB 00:02 Installed: network-scripts-10.00.6-1.el8.x86_64 network-scripts-team-1.29-1.el8.x86_64 Complete!
2. Verify the network-scripts files
[root@HQDEV1 ~]# ls /etc/sysconfig/network-scripts/ ifcfg-ens33 ifdown-ippp ifdown-sit ifup-aliases ifup-isdn ifup-sit init.ipv6-global ifcfg-lo ifdown-ipv6 ifdown-Team ifup-bnep ifup-plip ifup-Team network-functions
3. Edit the NIC file you don’t want NetworkManager to manage just as it is done the old way
Add “NM_Controlled=no” at the end of the NIC config file
[root@HQDEV1 ~]# vim ifcfg-ens33
4. Stop the NetworkManager service
[root@HQDEV1 ~]# systemctl stop NetworkManager
5. Disable the NetworkManager service
[root@HQDEV1 ~]# systemctl disable NetworkManager Removed /etc/systemd/system/multi-user.target.wants/NetworkManager.service. Removed /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service. Removed /etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service. [root@HQDEV1 ~]#
6. Start the netowrk service
[root@HQDEV1 ~]# systemctl start network.service
7. You may need to bring down the associated NIC & restart network if network fails to start
[root@HQDEV1 ~]# ifdown ens33
7. Enable the network service
[root@HQDEV1 ~]# systemctl enable network.service network.service is not a native service, redirecting to systemd-sysv-install. Executing: /usr/lib/systemd/systemd-sysv-install enable network [root@HQDEV1 ~]#
8. If you brought down the associated NIC, bring it up
[root@HQDEV1 ~]# ifup ens33
If you wish to use both services, you can also start and enable NetworkManager as well.
Your feedback is welcomed. If you love others, you will share with others.
Leave a Reply