On Tue, Apr 21, 2015 at 03:46:52PM +0200, Dennis Jacobfeuerborn wrote:> Networking isn't really controlled by systemd but by NetworkManager. I > usually just yum remove NetworkManager* and then everything works just > as it did in CentOS 6.Note: NetworkManager is in CentOS6 too, and is part of the default workstation install. The NM in CentOS7 is a bit more polished than the NM in CentOS6, but it is configured in the same way, using files in /etc/sysconfig/network-scripts/ (using the ifcfg-rh NetworkManager plugin). In both cases, you can remove NM and use the 'network' service instead. -- Jonathan Billings <billings at negate.org>
On 04/21/2015 08:54 AM, Jonathan Billings wrote:> On Tue, Apr 21, 2015 at 03:46:52PM +0200, Dennis Jacobfeuerborn wrote: >> Networking isn't really controlled by systemd but by NetworkManager. I >> usually just yum remove NetworkManager* and then everything works just >> as it did in CentOS 6. > > Note: NetworkManager is in CentOS6 too, and is part of the default > workstation install. The NM in CentOS7 is a bit more polished than > the NM in CentOS6, but it is configured in the same way, using files > in /etc/sysconfig/network-scripts/ (using the ifcfg-rh NetworkManager > plugin). In both cases, you can remove NM and use the 'network' > service instead. >You can disable NetworkManager for now in CentOS-7 and use the network service .. but in reality I am not sure how long that is going to be 100% true. In fact, things like dnsmsq and even libvirt/qemu are becoming much harder to configure to work via the network service and are pre-configured to work with NetworkManager. (Don't yell at me, not my decision :D) I have decided it is likely better to bite the bullet and learn how to use and configure Network Manager if you are going to do anything other than very simple things with your network .. at least on CentOS-7 or higher (ie, Fedora > 18, etc.). Again, one CAN still use the network service .. but most documentation available now assumes instead that Network Manager is being used. Thanks, Johnny Hughes -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: <http://lists.centos.org/pipermail/centos/attachments/20150421/8d21a339/attachment-0001.sig>
On Tue, Apr 21, 2015 at 09:46:51AM -0500, Johnny Hughes wrote:> I have decided it is likely better to bite the bullet and learn how to > use and configure Network Manager if you are going to do anything other > than very simple things with your network .. at least on CentOS-7 or > higher (ie, Fedora > 18, etc.).A lot of the problems I had with NetworkManager was that even though NM started fairly early in C6, often the network wouldn't be up by the time later-starting services started (since NM didn't block on network), and anything that needs to do a DNS resolution or some sort of initial sync on start would fail. Even worse, if you had both the 'network' and 'NetworkManager' services started, the network would be brought up with the 'network' service, then NM would start, and sometime mid-boot the network would drop then be re-started as NM took over. So it'd be a form of russian roulette as to which service would not have a network during boot. In C7, services have dependencies on the network-online.target, which fixes a lot of the issues I mentioned above. One of the nicer things of having actual service dependencies. -- Jonathan Billings <billings at negate.org>
On 21.04.2015 16:46, Johnny Hughes wrote:> On 04/21/2015 08:54 AM, Jonathan Billings wrote: >> On Tue, Apr 21, 2015 at 03:46:52PM +0200, Dennis Jacobfeuerborn wrote: >>> Networking isn't really controlled by systemd but by NetworkManager. I >>> usually just yum remove NetworkManager* and then everything works just >>> as it did in CentOS 6. >> >> Note: NetworkManager is in CentOS6 too, and is part of the default >> workstation install. The NM in CentOS7 is a bit more polished than >> the NM in CentOS6, but it is configured in the same way, using files >> in /etc/sysconfig/network-scripts/ (using the ifcfg-rh NetworkManager >> plugin). In both cases, you can remove NM and use the 'network' >> service instead. >> > > You can disable NetworkManager for now in CentOS-7 and use the network > service .. but in reality I am not sure how long that is going to be > 100% true. In fact, things like dnsmsq and even libvirt/qemu are > becoming much harder to configure to work via the network service and > are pre-configured to work with NetworkManager. (Don't yell at me, not > my decision :D) > > I have decided it is likely better to bite the bullet and learn how to > use and configure Network Manager if you are going to do anything other > than very simple things with your network .. at least on CentOS-7 or > higher (ie, Fedora > 18, etc.). > > Again, one CAN still use the network service .. but most documentation > available now assumes instead that Network Manager is being used.systemd-networkd is becoming increasingly capable and popular though so NetworkManager might not actually stay around for too long. Regards, Dennis
Mihamina Rakotomandimby
2015-Apr-22 03:22 UTC
[CentOS] C7 systemd and network configuration
On 04/21/2015 04:54 PM, Jonathan Billings wrote:> On Tue, Apr 21, 2015 at 03:46:52PM +0200, Dennis Jacobfeuerborn wrote: >> Networking isn't really controlled by systemd but by NetworkManager. I >> usually just yum remove NetworkManager* and then everything works just >> as it did in CentOS 6. > Note: NetworkManager is in CentOS6 too, and is part of the default > workstation install. The NM in CentOS7 is a bit more polished than > the NM in CentOS6, but it is configured in the same way, using files > in /etc/sysconfig/network-scripts/ (using the ifcfg-rh NetworkManager > plugin). In both cases, you can remove NM and use the 'network' > service instead. >This is the information I needed: " ... using files in /etc/sysconfig/network-scripts/..." Looking furter I found https://access.redhat.com/discussions/644133 where I can read: " What is the preferred method for changing an interface's setttings? Previously, editing /etc/sysconfig/network-scripts/ifcfg-xxx then "service network restart" did the trick. On RHEL 7, after editing the ifcfg file, nothing short of a reboot seems to get it to use that config. I've tried "service network restart" I've tried "systemctl restart network.service" as well as "systemctl stop network.service" followed by "systemctl start network.service" Those don't seem to actually do anything. I need to reboot to get the new config to work. " Then answered by Ryan Sawhill : " A little late, but the command you're missing (if you're using NM) is: * |nmcli connection reload| Which can be shortened to: * |nmcli c r| That will reload the ifcfg files after manual edits. From there if you want to re-up a connection whose file you changed, you need to manually do so with another |nmcli connection| command, e.g.: * |nmcli c up "System eno1"| Note that you don't actually need to take an interface down first, like in the old days (e.g., with |ifdown eth0| followed by |ifup eth0|). " Thanks for all.