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

Josh Knight josh at noobbox.com
Wed Jun 5 01:11:37 CEST 2019


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

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

Josh

On Tue, Jun 4, 2019 at 4:00 AM bsd--- via pve-user <pve-user at pve.proxmox.com>
wrote:

>
>
>
> ---------- Forwarded message ----------
> From: "bsd at todoo.biz" <bsd at todoo.biz>
> To: pve-user <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>
> To: pve-user <pve-user at pve.proxmox.com>
> Cc: "bsd at todoo.biz" <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
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user
>



More information about the pve-user mailing list