3.19 and Routed networking mode configuration example needed

Hi @Darwin

One of the key principles of the routed NIC type is that LXD will setup static routes and proxy ARP entries on the host to “route” traffic from the parent network to the container’s interface.

In order to do that LXD needs to know what IPs you are assigning to your container.

At the moment you have not told LXD this information, which is why it isn’t working.

You can check this by running ip r on the LXD host and looking for a static route for your container’s IP.

In order to tell LXD what IPs you will be using inside your container you need either:

  1. Add a manually configured NIC device to each container, overriding the profile’s settings, e.g.
lxc profile apply container default,routed
lxc config device override <container> eth0 ipv4.address=x.x.x.x.x
  1. Or you can use a profile per container and store the container’s IPs in the profile config. To see an example of this see @simos guide here How to get LXD containers get IP from the LAN with routed network