We are migrating container from Ubuntu 14 to Ubuntu 18.
We have a configuration with routing inside the container (in /etc/network/interfaces) :
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 23.51.52.24
netmask 255.255.255.240
gateway 23.51.52.1
auto eth1
iface eth1 inet static
address 192.168.10.25
netmask 255.255.255.0
auto netManagement
iface netManagement inet static
address 192.168.9.25
netmask 255.255.255.0
up /sbin/route add -net 192.168.25.0 netmask 255.255.255.0 gw 192.168.9.1
down /sbin/route del -net 192.168.25.0 netmask 255.255.255.0
up /sbin/route add -net 10.10.10.0 netmask 255.255.255.0 gw 192.168.9.1
down /sbin/route del -net 10.10.10.0 netmask 255.255.255.0
up /sbin/route add -net 10.10.20.0 netmask 255.255.255.0 gw 192.168.9.1
down /sbin/route del -net 10.10.20.0 netmask 255.255.255.0
up /sbin/route add -net 192.168.23.0 netmask 255.255.255.0 gw 192.168.9.1
down /sbin/route del -net 192.168.23.0 netmask 255.255.255.0
up /sbin/route add -net 10.0.99.0 netmask 255.255.255.0 gw 192.168.9.1
down /sbin/route del -net 10.0.99.0 netmask 255.255.255.0
This is working like a charm in older Ubuntu.
We are looking for the best solution to do that in an Ubuntu 18 container using latest PVE ?
We have read some things about ".pve-ignore.interfaces" but documentation is scarce and we would like to avoid long term compatibility issues with LXC or PVE (and we have quite many CT with this kind of config).
Thanks for your reply.
We have a configuration with routing inside the container (in /etc/network/interfaces) :
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 23.51.52.24
netmask 255.255.255.240
gateway 23.51.52.1
auto eth1
iface eth1 inet static
address 192.168.10.25
netmask 255.255.255.0
auto netManagement
iface netManagement inet static
address 192.168.9.25
netmask 255.255.255.0
up /sbin/route add -net 192.168.25.0 netmask 255.255.255.0 gw 192.168.9.1
down /sbin/route del -net 192.168.25.0 netmask 255.255.255.0
up /sbin/route add -net 10.10.10.0 netmask 255.255.255.0 gw 192.168.9.1
down /sbin/route del -net 10.10.10.0 netmask 255.255.255.0
up /sbin/route add -net 10.10.20.0 netmask 255.255.255.0 gw 192.168.9.1
down /sbin/route del -net 10.10.20.0 netmask 255.255.255.0
up /sbin/route add -net 192.168.23.0 netmask 255.255.255.0 gw 192.168.9.1
down /sbin/route del -net 192.168.23.0 netmask 255.255.255.0
up /sbin/route add -net 10.0.99.0 netmask 255.255.255.0 gw 192.168.9.1
down /sbin/route del -net 10.0.99.0 netmask 255.255.255.0
This is working like a charm in older Ubuntu.
We are looking for the best solution to do that in an Ubuntu 18 container using latest PVE ?
We have read some things about ".pve-ignore.interfaces" but documentation is scarce and we would like to avoid long term compatibility issues with LXC or PVE (and we have quite many CT with this kind of config).
Thanks for your reply.