I'm learning Ubuntu 16.04 LTS and i confuse between networking.service, NetworkManager.service and systemd-networkd.service.
After googling i found that NetworkManager.service and systemd-networkd.service are two way to manage the network and we only need 1 of them. No result for networking.service.
I already tested on Ubuntu 16.04 Desktop and Server. On desktop NetworkManager.service and networking.service are active, on server only networking.service active. I don't understand what networking.service is?
Could you help me please?
1 Answer
networking.service raises or downs the network interfaces configured in /etc/network/interfaces, that is, those network interfaces which are not managed by NetworkManager. If you look into /lib/systemd/system/networking.service you will see that all it does is ifup or ifdown depending on whether it is to be started or stopped.
It is a oneshot unit, which means that it does its thing and exits, it does not remain running in the background.
By default all network interfaces are managed by NetworkManager and networking.service does nothing. On a server it is quite common to assign a static IP address to one or more interfaces by editing /etc/network/interfaces, and in this case those interfaces are no longer managed by NetworkManager and they are raised or downed by network.service.