Add links between container in a cluster

Hello,

Following the guide here:
network management

I am able to create a working network in an lxd cluster;
My lxd version is 3.0.3;
the servers are in the same network and they are configured to work in the same lxd cluster;
I configured testbr0 to use vxlan tunnelling.(Example 1)

The next step is to create a link between 2 different running containers in the cluster;
for example, in this scenario, I want to add 4 links (Example 2)

is it possible to create a bridge (ex. Br-c1-c2) and 2 new interfaces in C1 and C2, connect the 2 new interfaces using Br-c1-c2 and assign ip address while the containers are running?
I want to do the same thing also when the containers are in the same Host (ex. Br-c2-c3)
What are the best practices to do that?

The last question is:
Why when I want to create a new network we first need to create to each physical node and then actually create it without the --target?

thank you
Giuseppe

Looking at your example 2 drawing: why not create GRE tunnel interfaces between the containers? They all look point to point interfaces to me. Or you had something else in your mind?

Hello,
Actually, I will use also gre at same point; I want to do some performance experiment using different solutions :slight_smile:

Looking at the different techniques, GRE will probably win. Both do encapsulation, but GRE is protocol based (no ports used) and VXLAN is Layer 4 (uses UDP port), so I expect the overhead of GRE to be less than VXLAN and so faster :wink:
Besides that…GRE is easier to implement i.m.o. :wink:

Yep, this is what I expect; But I have to implement it :smiley:

VXLAN is hardware accelerated though, at least with modern NICs.