ubuntu server and networkmanager
I have a problem with ubuntu server (16.10) and network manager.
The system is freshly installed (an offline install, with no ethernet cable attached) and at the first boot I plugged the cable into the ethernet port, I simply issued a dhclient; apt-get update; apt-get install network-manager
, then I filled a file (/etc/NetworkManager/system-connections/EthernetInterface
) with this data:
[802-3-ethernet]
auto-negotiate=true
mac-address=<<ethernet card mac address>>
[connection]
id=EthernetInterface
uuid=<<randomly generated uuid>>
type=802-3-ethernet
[ipv6]
method=ignore
[ipv4]
method=manual
address1=172.16.20.153,172.16.0.254
dns=8.8.8.8;8.8.4.4;
(the ethernet MAC and UUID were properly filled).
Now, this was enough to make the PC automatically connect at boot, but now... No way.
The nmcli d
command outputs all the network interfaces as unmanaged. File /etc/network/interfaces contains only the loopback device.
I tried also to edit the NetworkManager.conf file, setting managed=true
, but without any luck.
How can I enable the interface? Or how can I track the problem?
Best regards
EDIT:
I know that usually the server it is not managed by NM (in fact it is not even pre-installed).
However I need the NetworkManager features (DBUS interface, automatic fallback on other connections when using mobile interfaces, integration with ModemManager). That's why I installed network-manager. However it is not working: maybe I have to change some default configuration, maybe I have to enable it, or maybe there is some rule somewhere to make it the default network connections handler. Do you know where? Otherwise I'll have to get a desktop version, but I preferred the server version since I didn't need a GUI
The Ubuntu Server edition isn't managed by the networkmanager. It's managed from the /etc/network/interfaces
.
Look here to configure the interfaces
file:
German wiki (cant find the english one now): https://wiki.ubuntuusers.de/interfaces/
After comparing the configuration of two machines (one with ubuntu server 16.10 and NetworkManager, the other with Xubuntu 16.10) I found how to enable NetworkManager on the server version too.
You have to create a file /etc/netplan/01-network-manager-all.yaml
and then write in it:
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
Reboot (or maybe just restart the appropriate service(s), I simply rebooted) and then NetworkManager will start managing all the devices in your system.
DO NOT write managed=true
in the configuration file, though. This way if you write an interface in /etc/network/interfaces you will have it managed by ifupdown instead of NetworkManager (default behavior for nm).