0

I configured LXD containers in Ubuntu 18.04 with MACVLAN interfaces so they can DHCP addresses on my LAN. This all works fine, the containers are reachable on my LAN and they can reach each other, but the containers cannot connect to the host.

This is a known and pretty common issue, and the common suggestion is to add a MACVLAN bridge-- but all the instructions use ifupdown, like the link below. How do I add the bridge and required routes on modern Ubuntu with netplan?

http://noyaudolive.net/2012/05/09/lxc-and-macvlan-host-to-guest-connection/

0

macvlan support is not currently implemented in netplan. You can track the progress of this feature at https://bugs.launchpad.net/netplan/+bug/1664847.

In the meantime, you can still configure a macvlan interface using ifupdown, you just need to install the ifupdown package from the Ubuntu archive. ifupdown and netplan can coexist on a system provided you do not try to use both of them to manage the same interface.

  • Just to clarify, I install ifupdown then add the MACVLAN interface to /etc/network/interfaces similarly to the link I posted earlier, without changing anything in netplan at all? And as long as my existing interface isn't in /etc/network/interfaces, they will coexist and work? – Georg Feb 25 at 21:50
  • That worked! Still have an issue with networking not starting properly so I need to ifup macvlan0 after rebooting, but I can ping between the host and containers. Thank you! – Georg Feb 26 at 3:42

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.