Lesson 5

Dates: 2/20/2019
Linux networking
Linux System Administration


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:
    network:
      version: 2
    #  renderer: networkd
      renderer: NetworkManager
    
  • Have the settings applied:
    netplan apply
    
    Reboot the VM.
    Network settings with nmtui

  • Run command nmtui to start a configuration menu:
    nmtui
    
    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:
    ip addr
    
    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:
    nmcli conn
    
  • Disable 'Wired connection 1':
    nmcli conn down "Wired connection 1" iface ens3
    nmcli conn
    
  • Create another connection with IP address 192.168.122.44:
    nmcli con add con-name "Wired connection 2" ifname ens3 type ethernet ip4 192.168.122.44/24 gw4 192.168.122.1
    nmcli conn
    
    Check the active IP address:
    ip addr
    
    Reboot the VM and verify that the IP address shows up the same.
  • Enable 'Wired connection 1':
    nmcli conn up "Wired connection 1" iface ens3
    nmcli conn
    



  • Take me to the Course Website