Configuring additional IP address on Ubuntu using Netplan.

This guide is applicable only for KVM based VPSes, for OpenVZ based VPSes please click here

In this article, we will learn how to configure networking in newer versions of Ubuntu, such as Ubuntu 18.04, 19.04 and 19.10 using Netplan.

To Find The Network Gateway and Netmask

To know the gateway and netmask of your IP address, please see this guide

Configuring additional IPv4

First, We find the Network Interface Name,

ifconfig -a


ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet  netmask  broadcast
        inet6 fe80::5652:ff:fee4:7796  prefixlen 64  scopeid 0x20<link>
        ether 54:52:00:e4:77:96  txqueuelen 1000  (Ethernet)


In this example, the system is configured with the network interface name as ens3, this might not be the case with your system, please verify the system network interface name with the ifconfig -a command above before proceeding with the guide below!

Second, to add additionall ip address.

vi /etc/netplan/60-static.yaml

File Content should be,

  version: 2
  renderer: networkd
    [below your system interface name needs to use]
             - ip address here

To configuration the network.

 netplan try


 Warning: Stopping systemd-networkd.service, but it can still be activated by:
Do you want to keep these settings?

Press ENTER before the timeout to accept the new configuration

Changes will revert in 113 seconds
Configuration accepted.

After this step try ping the ip.

ping ip address

If ip address is not pinging adding additional ip is unsuccessfull and if it is ping, adding additional ip is successfuly Completed.