Simple bridge from lxd to hosts private network, with static IP

You’ve got 2 options for connecting instances to an external network:

  1. Setup an unmanaged bridge (Debian BridgeNetworkConnections - Debian Wiki, Ubuntu Netplan | Backend-agnostic network configuration in YAML) e.g. br0. Connect your current external interface to it, and move your external interface’s IP config onto the bridge interface. Then use a LXD bridged NIC device on your instances to connect to the unmanaged bridge. E.g. lxc config device add c1 eth0 nic nictype=bridged parent=br0.
  2. Use a LXD macvlan NIC device to connect directly to the external interface. E.g lxc config device add c1 eth0 nic nictype=macvlan parent=enp3s0. Note: With macvlan NICs the LXD host and the instance will not be able to communicate with each other. The Instance will only be able to communicate with other hosts on the network. It will also not be able to use multiple MAC addresses.

Then inside the instance, configure the static IP in the network configuration files like a normal machine or let it use auto configuration (DHCP) from the external network.

1 Like