Routing inside LXC container (System V)

bsd at todoo.biz bsd at todoo.biz
Tue Jun 4 10:00:05 CEST 2019


Hello, 

We are trying to reproduce a configuration which creates routes inside an LXC container; 
Following config is used for Ubuntu 14 / 16 CT which works perfectly. 

/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



For CT based on Ubuntu 18, everything has changed and we can no longer use such config. 
I am looking for precise way to handle the "up" / "down" dynamic routes that we need, with 100% compatibility inside Proxmox. 

I have red in various posts that one must use ".pve-ignore.interfaces", but semantic is not precisely known / explained, and neither is the location of this file (inside the CT or on the PVE hypervisor). 

All in all, I think that Proxmox should publish a page explaining precisely how to handle this situation since quite many users might be using multi-homed CT with many interfaces and internal routing configuration. 


Sincerely yours. 


---
   ____              _______ 
   / __ \__  ______  / ____(_)
  / / / / / / / __ \/ /_  / / 
 / /_/ / /_/ / / / / __/ / /  
/_____/\__, /_/ /_/_/   /_/   
      /____/                  

+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+
|D|y|n|a|m|i|c| |F|i|r|e|w|a|l|l|s|
+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+





More information about the pve-user mailing list