[PVE-User] Routing inside LXC container (System V)

bsd at todoo.biz bsd at todoo.biz
Wed Jun 5 07:41:11 CEST 2019



> Le 5 juin 2019 à 01:11, Josh Knight <josh at noobbox.com> a écrit :
> 
> Is this configuration inside the Ubuntu container, or on the proxmox host?
> 
> Ubuntu 18.04 uses netplan by default to configure networking backends.  It
> supports adding routes and route policies using a yaml config file.
> 
> https://netplan.io/reference#routing <https://netplan.io/reference#routing>
> 
> Additionally, this faq section (as well as the following two sections)
> should be able to guide you on either converting your scripts to work with
> 18.04, or to install ifupdown and fallback to the legacy
> /etc/network/interfaces configuration.
> 
> https://netplan.io/faq#use-pre-up-post-up-etc-hook-scripts <https://netplan.io/faq#use-pre-up-post-up-etc-hook-scripts>
> 
> Josh

Hello Josh, 


The problem is not netplan, we have implemented netplan in the KVM stack and are mastering it perfectly. 

The question is more focused on the interaction between LXC with Proxmox containers and how Netplan might be implemented in it. 

In other word : how do we have to proceed in order to implement that correctly within Proxmox ? 
Do we have to trigger the netplan stack ? 

Normally the interfaces are defined within the Proxmox GUI which creates a file in /etc/network/interfaces 

Hence the question about the ".pve-ignore.interfaces"… 

Do we have to lock the standard networking mechanism used in the Proxmox ? and deploy netplan ? 


Problem is that the Proxmox documentation is not very precise and clear on this specific topic. 
And to avoid long term problem, we need precise answers / methodology. 


Sincerely yours. 


> 
> On Tue, Jun 4, 2019 at 4:00 AM bsd--- via pve-user <pve-user at pve.proxmox.com <mailto:pve-user at pve.proxmox.com>>
> wrote:
> 
>> 
>> 
>> 
>> ---------- Forwarded message ----------
>> From: "bsd at todoo.biz <mailto:bsd at todoo.biz>" <bsd at todoo.biz <mailto:bsd at todoo.biz>>
>> To: pve-user <pve-user at pve.proxmox.com <mailto:pve-user at pve.proxmox.com>>
>> Cc:
>> Bcc:
>> Date: Tue, 4 Jun 2019 10:00:05 +0200
>> Subject: Routing inside LXC container (System V)
>> 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|
>> +-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+
>> 
>> 
>> 
>> 
>> 
>> ---------- Forwarded message ----------
>> From: bsd--- via pve-user <pve-user at pve.proxmox.com <mailto:pve-user at pve.proxmox.com>>
>> To: pve-user <pve-user at pve.proxmox.com <mailto:pve-user at pve.proxmox.com>>
>> Cc: "bsd at todoo.biz <mailto:bsd at todoo.biz>" <bsd at todoo.biz <mailto:bsd at todoo.biz>>
>> Bcc:
>> Date: Tue, 4 Jun 2019 10:00:05 +0200
>> Subject: [PVE-User] Routing inside LXC container (System V)
>> _______________________________________________
>> pve-user mailing list
>> pve-user at pve.proxmox.com <mailto:pve-user at pve.proxmox.com>
>> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user <https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user>
>> 
> _______________________________________________
> pve-user mailing list
> pve-user at pve.proxmox.com <mailto:pve-user at pve.proxmox.com>
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user <https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user>



More information about the pve-user mailing list