Ubuntu – how to add additional ip address

After allocating an additional ip address, you need to add it to the Ubuntu settings.

Opening the file:

sudo nano /etc/network/interfaces

Inside we see something like:

auto ens3
iface ens3 inet static
address 111.111.111.111/24
gateway 111.111.111.1

If instead of writing 111.111.111.111/24 will be stated like this:

address 111.111.111.111
netmask 255.255.255.0

then they are one and the same.

We beat off the line and add in the same place:

auto ens3:one
iface ens3:one inet static
address 112.111.111.111/24

Letter combinations like ens3 can be very different. Our business, when new IP addresses appear, duplicate the code, increase the digit after the colon :one and indicate your new ip address.

Restart the service:

service networking restart

There is no advertisement on the site! Why do you mean?

Helping people is my hobby. And the developer’s skills allow not to be soared by zero monetization of this site. Although…

If the information helped you, then even from a donation of 40 rubles I will be pleased. Dokin is a little bit, I’ll buy a latte at a McDuck, remember at whose expense the banquet and karma will be credited to you!

But just leaving a comment of gratitude below will bring me a smile of joy 🙂

And if you want to write all sorts of nasty things with the transition to personalities, do not hesitate either, but usually I send this to spam. I love it when the house is clean.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *