12

Is it sufficient to have one of these three in Ubuntu 19.04? Is it possible to have all three and how to configure them so they were not conflicting?

Does systemd-networkd started by networking.service?

1
  • @Fabby, 19.04. But this is general question (so imply latest version). The question is more appropriate for U&L, but I guessed AU is larger community.
    – midenok
    Jul 27, 2019 at 20:54

1 Answer 1

8
+75

As you might know /etc/network/interfaces has been replaced with netplan. And netplan works fine with both NetworkManager and systemd-networkd.

So you can have them all work together!

If you're running Ubuntu as your desktop, then you should use NetworkManager or config netplan so it uses NetworkManager as its default renderer:

network:
  version: 2
  renderer: NetworkManager

Otherwise you can easily setup your interfaces in netplan itself, for example to have interfaces like configuration and network-manager work together:

network:
  version: 2
  renderer: NetworkManager
  wifis:
    wlp4s0:
      dhcp4: yes
      access-points:     
        my-access-point:
          password: passw00rd
network:
  version: 2
  renderer: networkd
  ethernets:
    enp3s0:
      addresses:
        - 192.168.1.10/24
      dhcp4: false
      dhcp6: false
      gateway4: "192.168.1.1"
      nameservers:
        addresses:
          - "8.8.4.4"
          - "8.8.8.8"

Configuration

To configure netplan, save configuration files under /etc/netplan/ with a .yaml extension (e.g. /etc/netplan/config.yaml), then run sudo netplan apply. This command parses and applies the configuration to the system. Configuration written to disk under /etc/netplan/ will persist between reboots.

Netplan configuration examples


Replacing netplan with ifupdown is still possible but something that I wouldn't suggests.

  1. Install ifupdown
  2. Remove netplan
  3. Configure interfaces
  4. Configure /etc/NetworkManager/NetworkManager.conf so it would be able to manage your interfaces.
  5. Restart networking services

You can even run dhclient directly to bring an interface up.

1
  • Where is netplan configured? You list a lot of configuration options but not where they go.
    – Seth
    Aug 20, 2019 at 4:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .