FAN Networking and Network Forwards

Hello,
I’ve a LXD with two members with FAN Networking.

On host 1 I use a network forward rule to forward traffic to a container defined in host 1. That works fine.

On host 1 I use a network forward rule to forward traffic to a container defined in host 2. That doesn’t work.

I can provide more details on the setup but it would be great to know upfront: does FAN Networking supports cross-host forwarding rules?

From FanNetworking section How it Works:

Addresses created on the fan can reach the Internet (or other private addresses) by use of NAT from their host. Because they are behind NAT on their host, they themselves cannot be reached directly from non-fan addresses unless special port mapping arrangements have been made. Generally, it is easiest for containers on the same fan to talk to one another.

Thanks @g-schick! I’ll review the documentation, then.

That wont work because network forwards use DNAT which requires the host 2 to use host 1 as the return router for the traffic.

Take a look at our OVN integration for a more flexible cluster wide networking mode.

https://documentation.ubuntu.com/lxd/latest/howto/network_ovn_setup/

Hello @tomp , thanks for the feedback.

I currently use FAN Networking when the LXD cluster is defined on virtual machines. In that case, it gives an extremely simple setup and “does the job” of having a shared network across hosts.

I know that OVN is a more powerful setup, but in some cases I had trouble defining it when having VMs as LXD hosts. Is it generally supported / recommended to setup OVN on virtual network interfaces?