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 know the gateway and netmask of your IP address, please see this guide http://wiki.crowncloud.net/?viewing_network_gateway_netmask
First, We find the Network Interface Name,
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 184.108.40.206 netmask 255.255.255.0 broadcast 220.127.116.11 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.
File Content should be,
network: version: 2 renderer: networkd ethernets: [below your system interface name needs to use] ens3: addresses: - ip address here
To configuration the network.
Warning: Stopping systemd-networkd.service, but it can still be activated by: systemd-networkd.socket 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.