Until recently, I was using Ubuntu 16.04. There I had set a custom dns server and a secondary ip address.
The custom dns server was added through resolvconf/resolv.conf.d/head and it got prepended over GCE's dns server in /etc/resolv.conf. Just to be sure, I also added a 'prepend-domain-name-servers' in /etc/dhcp/dhclient.conf.
The secondary ip address was totally arbitrary and added through dchclient.conf using an alias for the 'ens4' interface.
Today, I updated my images to Ubuntu 17.10. And the above stopped working. I managed to get the custom dns server in place, by adding a 'DNS=' line in /etc/systemd/resolved.conf. But I cannot add a secondary ip address properly. I have the same alias in dhclient.conf and after I edit the file I use 'dhclient -r; dhclient' to renew the lease and have my alias enforced. But if I reboot, the secondary ip is gone from the interface.
The last thing I tried was to edit /etc/netplan/50-cloud-init.yml, set the static configuration there and also add custom ip routes. But I haven't found a way to make the routes persist reboot.
Could someone help me and tell me if the above approach is the right one and how I could have a static, custom secondary ip address on Ubuntu 17.10 that survives reboots?