1

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/

Georg
  • 43

1 Answers1

2

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.

slangasek
  • 5,562
  • 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 '19 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 '19 at 03:42
  • Hi @Georg, can you please show me your correct configuration with /etc/network/interfaces? as the link on your post already unreachable. I have similar situation here https://askubuntu.com/questions/1444416/add-public-ip-to-kvm-virtual-machine-on-ubuntu-22-04-1-server-host and I think your condition is similar. Thank you – khgasd652k Dec 09 '22 at 07:05
  • Apologies for not seeing this for... an entire year. And also for my answer, which is that I migrated from LXD/Ubuntu to Proxmox a couple years ago so that original config is long lost. – Georg Dec 21 '23 at 17:51