OpenCloud
OpenCloud Service FAQ
< Back

Configuring Private IP on Instances - Ubuntu 18 & 20

After requesting private IP, follow the below steps for configuring the private IP on the instance.
1.Sudo as root and confirm the new interface name created after requesting private IP
Run the below command -

sudo -i

ip a


Below should be shown. The new interface name for private IP would be “ens7” in this sample case. Ubuntu18&20_privateIP_1.png


2.Edit the netplan and add the interface to that fine by using nano

nano /etc/netplan/50-cloud-init.yaml


3.Copy the old interface DHCP entries to the new interface as below (use space , don't use TAB on your keyboard).
ubuntu18&20_privateIP_2.png
Press Ctrl + O to save and Press Ctrl + X to quit nano.


4.Run the follow command to make the interface active.

netplan apply


After that, the interface information should be shown as this -
ubuntu18&20_PrivateIP_3.png

Back
People are also looking for