Are you using Network-Manager in no-GUI CentOS 7 Server?
Are you using Network-Manager in no-GUI CentOS 7 Server?
In servers to which when deployed I only connect through SSH (and frequently through week and meager Internet links), I usually don't install the graphical environment (Gnome, KDE, nor plain X-Window).
Now with CentOS 7, by default the networking subsystem is managed by Network-Manager. Network-Manager is primarily a GUI application, and although it has a command line counterpart to it, such CLI tool does not yet have feature parity with the GUI version of Network-Manager. This worries me somewhat... will suddenly some problem appear in production which can only be solved through the GUI tool of Network-Manager? Is it safe in my non-GUI servers to remove Network-Manager and set up networking the old school way?
So poll time! Lets see what people think about the proper course of action regarding Network-Manger on headless CentOS 7 servers!
Now with CentOS 7, by default the networking subsystem is managed by Network-Manager. Network-Manager is primarily a GUI application, and although it has a command line counterpart to it, such CLI tool does not yet have feature parity with the GUI version of Network-Manager. This worries me somewhat... will suddenly some problem appear in production which can only be solved through the GUI tool of Network-Manager? Is it safe in my non-GUI servers to remove Network-Manager and set up networking the old school way?
So poll time! Lets see what people think about the proper course of action regarding Network-Manger on headless CentOS 7 servers!
Re: Are you using Network-Manager in no-GUI CentOS 7 Server?
As Fedora's NetworkManager has, judging from their forums, frequently been the cause of problems, and as I can still easily remove it and have my network work properly, it's one of the things I do upon first boot (of both Fedora and CentOS.)
It seems that it still has issues with various non-standard setups, though as I do remove it, that's more hearsay on my part.
It seems that it still has issues with various non-standard setups, though as I do remove it, that's more hearsay on my part.
New users should check the FAQ and Read Me First pages
Re: Are you using Network-Manager in no-GUI CentOS 7 Server?
But do you disable Network-Manager also when the server is set up to run with a graphical interface?scottro wrote:As Fedora's NetworkManager has, judging from their forums, frequently been the cause of problems, and as I can still easily remove it and have my network work properly, it's one of the things I do upon first boot (of both Fedora and CentOS.)
Re: Are you using Network-Manager in no-GUI CentOS 7 Server?
Personally I turn off NetworkManager on all my machines. They are relatively fixed servers and compute nodes which need to be reliably on the network in documented places. It is trivial just to print off the ifcfg-XX files and keep them with the cable schedules and copies of the DNS files. As has been well rehearsed elsewhere; NM is designed for personal machines, particularly mobile ones.
Re: Are you using Network-Manager in no-GUI CentOS 7 Server?
Sorry, I wasn't clear. Yes, I remove NetworkManager regardless of what I'm running. As for GUIs, I tend to use either dwm from a custom install or openbox. On servers, I tend to not install GUIs, but at home, I have a desktop-cum-pseudo-server with NetworkManager removed that runs CentOS-6.
At my former job, I had a Fedora workstation, and as mentioned, I would remove NetworkManager upon first login.
At my former job, I had a Fedora workstation, and as mentioned, I would remove NetworkManager upon first login.
New users should check the FAQ and Read Me First pages
Re: Are you using Network-Manager in no-GUI CentOS 7 Server?
Thanks for the info. You encouraged me to try removing NetworkManager from my testing CentOS 7 server. It all went well and was painless.scottro wrote:Sorry, I wasn't clear. Yes, I remove NetworkManager regardless of what I'm running.
Just in case it may be helpful to anyone else, this is what I did:
- Run this command, and take note of your network card name in Linux, and also of your network card MAC address ("HWaddr"):
In the example above, the network card name is "eth0", but be advised that in CentOS 7 that name can be different from traditional Linux names for the network card; and the MAC address is "00:0C:29:56:FF:FF".
Code: Select all
$ ifconfig eth0 Link encap:Ethernet HWaddr 00:0C:29:56:FF:FF UP BROADCAST MULTICAST MTU:1500 Metric:1
- Note: if you get the error message "command not found" when running ifconfig, then you need to install the package "net-tools", like this:
Code: Select all
# yum install net-tools
- Note: if you get the error message "command not found" when running ifconfig, then you need to install the package "net-tools", like this:
- Run these commands to stop and disable the NetworkManager service:
Code: Select all
# systemctl disable NetworkManager.service # systemctl stop NetworkManager.service
- Edit the file "/etc/sysconfig/network-scripts/ifcfg-XXXXX" (where XXXXX is your network card name in Linux, which you noted in step 1) so that it looks like this:
- If you are on a IPv4 DHCP setup:
Code: Select all
NM_CONTROLLED=no ONBOOT=yes PERSISTENT_DHCLIENT=1 TYPE=Ethernet BOOTPROTO=dhcp DEFROUTE=yes #IPV4_FAILURE_FATAL=no IPV4_FAILURE_FATAL=yes IPV6INIT=no IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes IPV6_FAILURE_FATAL=no # Make sure here XXXXX is your NIC name in Linux, e.g. eth0 <===================== NAME=XXXXX # Comment out UUID, as only NetworkManager uses it. <===================== #### UUID=6fe7887d-db7a-40ac-BLABLABLABLABLABLABLABLABLA # Make sure this is your network card MAC address, noted instep 1 above. <=== HWADDR=00:0C:29:56:FF:FF PEERDNS=yes PEERROUTES=yes
- If you are on a IPv4 static IP setup (replace IPADDR= and NETMASK= with proper values for you):
Code: Select all
NM_CONTROLLED=no ONBOOT=yes TYPE=Ethernet #PERSISTENT_DHCLIENT=1 #BOOTPROTO=dhcp BOOTPROTO=static DEFROUTE=yes #IPV4_FAILURE_FATAL=no IPV4_FAILURE_FATAL=yes IPV6INIT=no IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes IPV6_FAILURE_FATAL=no # Make sure here XXXXX is your NIC name in Linux, e.g. eth0 <===================== NAME=XXXXX # Comment out UUID, as only NetworkManager uses it. <===================== #### UUID=6fe7887d-db7a-40ac-BLABLABLABLABLABLABLABLABLA # Make sure this is your network card MAC address, which you noted instep 1 above. <=== HWADDR=00:0C:29:56:FF:FF #PEERDNS=yes #PEERROUTES=yes IPADDR=172.16.225.150 NETMASK=255.255.255.0
- If you are on a IPv4 DHCP setup:
- Edit the file "/etc/sysconfig/network" so that it look like this:
- If you are on a IPv4 DHCP setup --> leave the file empty.
- If you are on a IPv4 static IP setup (replace these four settings with proper values for you --if you only have one DNS server, you can omit DNS2=):
Code: Select all
GATEWAY=172.16.225.2 DNS1=172.16.225.2 DNS2=172.16.225.3 SEARCH="acme-industries.com"
- Run this command to restart the "legacy" networking subsystem, so that the changes you just made take effect:
Code: Select all
# service network restart
- Check that the "network" service is configured to autostart on boot:
If it is not like above, run this command to enable the "network" service on boot:
Code: Select all
# chkconfig --list network network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Code: Select all
# chkconfig network on
- End of procedure. Check that your network access is working fine, it should be.
- Not strictly needed, but just to make sure it all survives a reboot, now reboot the system and then check that networking is still up and operating fine.
Code: Select all
# reboot
Re: Are you using Network-Manager in no-GUI CentOS 7 Server?
Thanks @InitOrNot. It was a great time saver.
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: Are you using Network-Manager in no-GUI CentOS 7 Server?
You should consider replacing with
Code: Select all
systemctl disable NetworkManager.service
Code: Select all
systemctl mask NetworkManager.service
Re: Are you using Network-Manager in no-GUI CentOS 7 Server?
I went so far that I put
into the %packages section of my installation kickstart file.
Code: Select all
-NetworkManager
-NetworkManager-team
-NetworkManager-tui
-NetworkManager-libnm