Exercises: NetworkManager on Ubuntu 18.04
On netplan VM, install NetworkManager, and bring it up:
apt-get install network-manager
systemctl enable NetworkManager
systemctl start NetworkManager
On netplan VM, edit file /etc/netplan/01-netcfg.yaml
to define NetworkManager as the renderer. The content should show up as follows:
Have the settings applied:
Reboot the VM.
Network settings with nmtui
# renderer: networkd
Run command nmtui to start a configuration menu:
In thye menu, and apply network settings to 'Wired connection 1' as follows:
IPv4 CONFIGURATION: Automatic,
Address: 192.168.122.23/24, Gateway: 192.168.122.1,
DNS servers: 192.168.122.1. Activate the connection.
Check the IP address:
It should show 192.168.122.23 for ens3 interface now.
Reboot the VM and verify that the IP address stays the same.
Network settings with nmcli
See the enabled connections:
Disable 'Wired connection 1':
Create another connection with IP address 192.168.122.44:
nmcli conn down "Wired connection 1"
Check the active IP address:
Reboot the VM and verify that the IP address shows up the same.
nmcli con add con-name "Wired connection 2" ifname ens3 type ethernet ip4 192.168.122.44/24 gw4 192.168.122.1
Enable 'Wired connection 1':
nmcli conn up "Wired connection 1"