Thanks

8 views
Skip to first unread message

Ben Green

unread,
May 28, 2021, 10:55:21 AM5/28/21
to lxc-...@lists.linuxcontainers.org
Hi all,

I wanted to say a thankyou, especially to Serge E. Hallyn for all the
help getting LXC up and running, which began to feel like fighting
systemd for while. The fight isn't over but we are the current winners.

We've had a production unprivileged LXC install going for a good amount
of time now and half of our servers are on there. Thanks again.

Cheers,

Ben

Saint Michael

unread,
May 28, 2021, 11:11:39 AM5/28/21
to Ben Green, LXC users mailing-list
Since the current Ubuntu uses netplan, every time I need to deploy my LXC containers, I need to remove netplan and install ifupdown, but that always requires KVM access because you will get kicked out.
What would it be the "legal" way to deploy many containers sharing a single network interface, under netplan, considering the bridges are not the preferred option because of performance. I have failed to find one.

 

Brian Candler

unread,
Jun 30, 2021, 4:38:45 PM6/30/21
to lxc-users, ven...@gmail.com, LXC users mailing-list
Bridges are a perfectly good way to have multiple containers share one network interface.  I use lxd with netplan and bridges (and presumably lxc would be fine as well).

There is no need to install ifupdown: it was only a transition mechanism for Ubuntu 16.04->18.04 and may not be available at all in 20.04.  You should get used to it now.

Here's a netplan config from an Ubuntu 18.04 box running lots of lxd containers, where br255 is the primary interface (with the server's management IP), and br254 is just a bridge that containers can connect to.  Both of these are trunked as tagged vlans on interface enp3s0.

network:
  version: 2
  ethernets:
    enp3s0:
      wakeonlan: true
      dhcp4: false
      accept-ra: false
      link-local: []
  vlans:
    vlan254:
      id: 254
      link: enp3s0
      accept-ra: false
      link-local: []
    vlan255:
      id: 255
      link: enp3s0
      accept-ra: false
      link-local: []
  bridges:
    br254:
      macaddress: 11:22:33:44:55:66
      interfaces: [vlan254]
      parameters:
        stp: false
        forward-delay: 0
      dhcp4: false
      accept-ra: false
      link-local: []
    br255:
      macaddress: 11:22:33:44:55:66
      interfaces: [vlan255]
      parameters:
        stp: false
        forward-delay: 0
      dhcp4: false
      accept-ra: false
      addresses: [10.12.255.11/24, "2001:db8::11/64"]
      gateway4: 10.12.255.1
      gateway6: "2001:db8::1"
      nameservers:
        addresses: [10.12.255.1]
        search: [example.net]


Replace 11:22:33:44:55:66 with the MAC address of the enp3s0 interface, because otherwise each bridge gets a random MAC address which is not stable.

jjs - mainphrame

unread,
Jun 30, 2021, 4:43:28 PM6/30/21
to lxc-users
Probably shouldn't get too used to netplan either.

Within the space of a few short years we've seen ifupdown, network manager, and netplan, which I'm guessing will soon be replaced by systemd-network.service

Jake



--
You received this message because you are subscribed to the Google Groups "lxc-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lxc-users+...@lists.linuxcontainers.org.
To view this discussion on the web visit https://groups.google.com/a/lists.linuxcontainers.org/d/msgid/lxc-users/da70a9bb-2bcf-4e57-ba53-5e60593892den%40lists.linuxcontainers.org.

Fajar A. Nugraha

unread,
Jul 1, 2021, 4:32:24 AM7/1/21
to lxc-users
On Thu, Jul 1, 2021 at 3:43 AM jjs - mainphrame <j...@mainphrame.com> wrote:
Probably shouldn't get too used to netplan either.

Within the space of a few short years we've seen ifupdown, network manager, and netplan, which I'm guessing will soon be replaced by systemd-network.service


I'm pretty sure netplan is already capable of using systemd-network as backend.

That being said, personally I also use ifupdown. One of the reason is that some configs (e.g. openvswitch) does not work (at that time) with netplan.
 
 
On Wed, Jun 30, 2021 at 1:38 PM Brian Candler <b.ca...@pobox.com> wrote:
Bridges are a perfectly good way to have multiple containers share one network interface.  I use lxd with netplan and bridges (and presumably lxc would be fine as well).

There is no need to install ifupdown: it was only a transition mechanism for Ubuntu 16.04->18.04 and may not be available at all in 20.04.  You should get used to it now.



 On Friday, 28 May 2021 at 16:11:39 UTC+1 ven...@gmail.com wrote:
Since the current Ubuntu uses netplan, every time I need to deploy my LXC containers, I need to remove netplan and install ifupdown, but that always requires KVM access because you will get kicked out.
What would it be the "legal" way to deploy many containers sharing a single network interface, under netplan, considering the bridges are not the preferred option because of performance. I have failed to find one.



You could create a new OS base image (e.g. AWS AMI, or whatever similar in your environment) to have ifupdown already installed in every new deployment.

--
Fajar
Reply all
Reply to author
Forward
0 new messages