First, thanks to Major Hayden for his blog post which pointed out the use of systemd-resolved:
https://major.io/2017/04/13/openstack-ansible-on-centos-7-with-systemd-networkd/

So, now we have the possibility to use systemd-networkd under ubuntu 18.04, I’d like to use it also under CentOS 7.
And yes, we can.

Install systemd-networkd:

yum -y install systemd-networkd

Disable network manager and enable networkd and resolved:

systemctl disable network NetworkManager
systemctl enable systemd-networkd systemd-resolved

Save the following contents to /etc/systemd/network/99-wildcard.network:

[Match]
Name=eth*

[Network]
DHCP=yes
IPv6AcceptRA=yes

(On my server the interface was no longer called ens3 but now eth0, hence the eth*)

Now create a symlink to the systemd-resolved resolv.conf:

rm -f /etc/resolv.conf
ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf

And just to be sure, reboot 🙂

Now we have it up and running:

[root@el7 ~]# networkctl
IDX LINK             TYPE               OPERATIONAL SETUP     
  1 lo               loopback           carrier     unmanaged 
  2 eth0             ether              routable    configured

2 links listed.
[root@el7 ~]# networkctl status eth0
● 2: eth0
   Link File: n/a
Network File: /etc/systemd/network/99-wildcard.network
        Type: ether
       State: routable (configured)
        Path: pci-0000:00:03.0
      Driver: virtio_net
      Vendor: Red Hat, Inc.
       Model: Virtio network device
  HW Address: 1e:00:85:00:1b:5a
         MTU: 1500
     Address: 185.107.213.51
              2a00:f10:121:b00:1c00:85ff:fe00:1b5a
              fe80::1c00:85ff:fe00:1b5a
     Gateway: 185.107.213.3 (ICANN, IANA Department)
              fe80::d6ca:6dff:fe74:870d (Routerboard.com)
         DNS: 93.180.70.22
              93.180.70.30

Ubuntu’s first point release for Bionic Beaver (18.04 LTS) has been released.

Now this release has had some time to mature, it’s time to have a look.
First thing that you notice is that /etc/network/interfaces is no longer in use and we have netplan.io .

Come on Canonical, haven’t you learned from Mir?

So, if I’m to use this distro, I want to ditch netplan and use native systemd-networkd, which after all is what netplan is built onto.
So can we? Yes, we can.

With a simple setup where you only have one or more wired network cards, this is fairly straightforward.

Remove netplan:

apt remove netplan

Enable systemd-networkd

systemctl enable systemd-networkd

Add the following contents to a file called /etc/systemd/network/99-wildcard.network

[Match]
Name=en*

[Network]
DHCP=yes
IPv6AcceptRA=yes

(Of course I want IPv6 enabled)

Now reboot, and systemd-networkd is up and running:

root@1804:~# networkctl
IDX LINK             TYPE               OPERATIONAL SETUP     
  1 lo               loopback           carrier     unmanaged 
  2 ens3             ether              routable    configured

2 links listed.

root@1804:~# networkctl status ens3
● 2: ens3
       Link File: /lib/systemd/network/99-default.link
    Network File: /etc/systemd/network/99-wildcard.network
            Type: ether
           State: routable (configured)
            Path: pci-0000:00:03.0
          Driver: virtio_net
          Vendor: Red Hat, Inc.
           Model: Virtio network device
      HW Address: 1e:00:6f:00:17:ac
         Address: 185.66.250.47
                  2a00:f10:121:a00:1c00:6fff:fe00:17ac
                  fe80::1c00:6fff:fe00:17ac
         Gateway: 185.66.250.3 (ICANN, IANA Department)
                  fe80::d6ca:6dff:fe74:870d (Routerboard.com)
             DNS: 93.180.70.22
                  93.180.70.30
                  2a00:f10:ff04:253::53
                  2a00:f10:ff04:153::53
  Search Domains: zone01.ams02.cldin.net
    Connected To: n06.c01.ap01.zone01.ams02.cldin.net on port fe:00:6f:00:17:ac (vnet37)