BLACK FRIDAY SALE IS LIVE !!!!!

Need Assistance?

In only two hours, with an average response time of 15 minutes, our expert will have your problem sorted out.

Server Trouble?

For a single, all-inclusive fee, we guarantee the continuous reliability, safety, and blazing speed of your servers.

How to add additional IP in Ubuntu 22.04

To add an additional IP address in Ubuntu 22.04, you can follow these steps:

  1. Open a terminal on your Ubuntu system. You can do this by pressing Ctrl+Alt+T.

2. Identify the network interface to which you want to add the additional IP address. You can use the ifconfig command to list all network interfaces:

ifconfig

3. Look for the network interface name, such as eth0 or ens33.

Edit the network interface configuration file. Assuming you want to add the additional IP address to the eth0 interface, you can use the following command to open the file in a text editor (replace eth0 with your interface name if necessary):

sudo nano /etc/netplan/01-netcfg.yaml

4. In the configuration file, locate the network interface you identified in Step 2. It will look something like this:

network:

  version: 2

  renderer: networkd

  ethernets:

    eth0:

      dhcp4: true

5. To add an additional IP address, add a new section under the interface definition. It should look similar to the following:

network:

  version: 2

  renderer: networkd

  ethernets:

    eth0:

      dhcp4: true

      addresses: [192.168.1.10/24, 10.0.0.10/24]

In the addresses line, you can add one or more IP addresses separated by commas. Make sure to specify the correct subnet mask (e.g., /24 for a typical subnet).

6. Save the changes and exit the text editor. In nano, you can press Ctrl+O to save and Ctrl+X to exit.

7. Apply the new network configuration using the following command:

sudo netplan apply

This command will apply the changes and activate the additional IP address on the network interface

8. Verify that the additional IP address is added by running the ifconfig command again:

ifconfig

You should see the new IP address listed under the network interface

Liked!! Share the post.

Get Support right now!

Start server management with our 24x7 monitoring and active support team

Can't get what you are looking for?

Available 24x7 for emergency support.