Total deadlock on Ubuntu 16,18,20 configuring multiple IP on one NIC

Good day.

I’ve been trying to make ONE (v5.2) kick an Ubuntu VM with two IP addresses on one NIC to no avail.

I’ve read the whole Internet and none of the solutions seem to work, so I try ONE network/context experts here. Is there such a solution ?

So far I can very well boot contextualized:

  1. Ubuntu /etc/network/interfaces generation (16)
  2. Ubuntu /etc/netplan/ generations 18,20

all very well, but just with one IP address per NIC.

I understand that the contextualization package obliterates the newer generation /etc/netplan/* files which impedes me to try the related known fixes with netplan.

I then resorted to modify the interfaces file following Debian/Ubuntu standards (legacy alias and latest double IP methods), non of both worked.

So my question is:

is there a working procedure with ONE (5.2) to kick a two IP addresses NIC on Ubuntu 16,18 or 20 ?

What is the tiny little thing that I can not see that is blocking me ?

Thanks a gazillion for help.

In recent versions of OpenNebula there is native support for IP alias.

Check here: https://docs.opennebula.io/5.12/operation/network_management/manage_vnets.html#attach-a-nic-alias-to-a-virtual-machine

Note also that context packages have support for this and will configure the alias.

Thank you @ruben I mentioned 5.2 cause I can’t upgrade that quickly our production.

So should I take as an answer that two IP addresses is impossible on 5.2. because network context package code forbids it?

Is there a workaround such as deactivating a small portion of network context package, and configuring what is required for networking as a start_script ?

I guess setting IP addresses should be simple, just need to be sure that network context script will not erase that configuration.

I might also consider the workaround of adding a NIC but that does not scale that well especially on IP ranges configuration.