How to route between two LXD bridges?

networking

#1

So, I have two LXD bridges.

I need to configure the two bridges so that LXD containers connected to each of them can send/receive packets to hosts on the other bridge.

The first bridge (br0)
config:
ipv4.address: 10.0.0.1/24
ipv4.nat: “true”
ipv6.address: fd00::1/64
ipv6.nat: “true”

The second bridge (br1)
config:
ipv4.address: 10.1.0.1/8
ipv4.nat: “true”
ipv6.address: fd10::1/64
ipv6.nat: “true”

The problem is, LXD doesn’t seem to route packets between the bridges by default, so ping operations on one of the hosts with IP 10.0.0.21 to IP 10.1.0.21 fails with the message ‘No route to host’.

Any solutions?


(Stéphane Graber) #2

LXD routes between bridges just fine by default, the problem here is that the mask on your br1 includes the subnet on your br0 bridge. Changing that to a non-overlapping subnet like /24 would fix it.