Hello
I am trying to use OVH “failover” IP addresses in “routed” mode to allow a container to have its own IP adress independent from the host.
To add the routed NIC I use the following command
lxc config device add $CONTAINER eth2 nic nictype=routed ipv4.address=$FAILOVER_IP
It works fine when this command is launched once, however the container needs to own multiple IP addresses, so I need to add another routed IP:
lxc config device add $CONTAINER eth3 nic nictype=routed ipv4.address=$FAILOVER_IP_2
The second command fails with the following error:
Error: Invalid expanded devices: Device validation failed for “eth2”: Existing NIC “eth3” already uses “ipv4.gateway” in auto mode
(BTW it seems the eth numbers 2 & 3 are inverted in the error message)
I tried to declare IP aliases in the container network conf (eth0:0) but it won’t work, meaning the alias is not reachable from the outside once the container is running.
How can mutiple “routed” NIC be added to a single container and/or how can IP aliases be allocated to a container?