Ubuntu seems to provide at least two network "toolsets" (for lack of a better term). I'm running into conflicts between these two.
- Network Manager
- Something which is more like the traditional network tools (e.g. ifconfig, 'ifup', /etc/network/interfaces
I am often running into conflicts between these different sets of tools. For example, I'm running Ubuntu Desktop at home and I'm using software like KVM/libvirt which recommends that I disable Network Manager, but disabling Network Manager causes other things to break.
What is the difference between Network Manager and the traditional network tools? Can these two suites run side-by-side or must I stick with one or the other? Is there a document which summarizes the difference between these different tools? I have been unable to find one.
(Forgive the vagueness of this question. I've searched and searched for an answer, but I have only found many vague answers which don't seem relevant to Ubuntu 10.04/Lucid, and I may not fully understand the purpose of NetworkManager. However, this seems to be a frequently asked question. If you have advice for clarifying this question, please post a comment.)
NetworkManager
andifconfig
are not (by default) compatible (NetworkManager
won't configure interfaces listed in/etc/network/interfaces
).NetworkManager
is a sort of settings daemon that makes sure that multiple users can edit network connections, this is very smart in a desktop environment (especially on laptops that might move around between different wireless networks). BasicallyNetworkManager
is a frontend toiproute
,dhclient
,wpa_supplicant
andppp
.ifconfig
is a general tool for configuring network interfaces, you can for example do like this:to set your IP, netmask and MAC address of
eth1
, and then down (disable/turn off) your interface.ifconfig
doesn't read any config files and does only exactly what it is told.ifup
andifdown
are helper programs that useifconfig
to configure a network interface in accordance to/etc/network/interfaces
this will make sure that if there are any up, down, pre-up, pre-down, post-up, post-down scripts that need to be run they will be.Ok, then there is
wpa_supplicant
anddhclient
.dhclient
is a DHCP client -ifup
will use this if a network interface is configured for DHCP, as willNetworkManager
.wpa_supplicant
is a tool for configuring encryption on wireless networks.Most of these tools have man pages, for instance the interfaces-file have it's own manpage that describe the format of that config file.
So that being said i would recommend that you remove (or disable)
NetworkManager
, I don't think that any thing will break from removingNetworkManager
except the gui tools for setting up network. If you want to configure wireless withoutNetworkManager
you might want to look at this.These toolsets are complementary, not mutually exclussive.
FWIW,
ifconfig
is just a tool among other*config
tools which are used to configure network interfaces.The
ifup(8)
andifdown(8)
tools are one layer above the*config
tools. You can think of them as helper tools.Likewise, NetworkManager is a level above the
ifup(8)
andifdown(8)
tools. For lack of a better term, NetworkManager is able to orchestrate the tools(ets) from the levels below in order to acomplish higher level tasks like Internet Connection Sharing with additional ease compared to just using the tools from the levels below.On a typical Debian-based distribution you have two command-line utilities used to configure network interfaces: the deprecated
ifconfig
fromnet-tools
and the newerip
fromiproute2
.However these two utilities directly configure the kernel and do not persist your config, if you reboot your machine you will need to reconfigure your interfaces again.
You have three major packages available for that purpose:
ifupdown
NetworkManager
systemd
and its daemonsystemd-networkd
In general, you should choose one and stick to it, even if
ifupdown
works well withNetworkManager
it can still creates unexpected configuration issues.ifupdown
Quite deprecated but reliable, you might encounter it on many older systems. The config is stored in
/etc/network/interfaces
and managed by thenetworking.service
daemon which is a wrapper around theifup
andifdown
commands which are also wrappers themselves aroundifconfig
(orip
forifupdown2
).Read the man at
ifupdown
.NetworkManager
Usually included with desktop distributions since many graphical front-ends are available, the config is stored in
/etc/NetworkManager
and managed by theNetworkManager.service
daemon.You can manage the config with the included
nmcli
ornmtui
utilities.Read the man at
NetworkManager
.systemd-networkd
Usually used on server distributions and the official successor to
ifupdown
as it is included withinsystemd
, the config is stored in/etc/systemd/network
and managed by thesystemd-networkd.service
daemon.Read the man at
systemd-networkd
.dhclient
Although not a daemon,
dhclient
fromisc-dhcp-client
is nonetheless a very important package and often required on desktop distributions as you often need to obtain a IPv4 from a DHCP server.Hopefully, as IPv6 (which uses SLAAC) is slowly being adopted, this will probably change in a near or distant future.
Network Manager is a GUI program used when dealing with Ubuntu as a workstation OS installed on your desktop/laptop.
The ifconfig-type utilities are command-line based and are used when dealing with Ubuntu as a server OS, when you don't have a graphical interface available to you (for example, when you boot up an Amazon EC2 instance based on Ubuntu). They are typically used over an ssh connection.
If you remove network manager I assume you need to configure /etc/network/interface to make interfaces work.