lxd v. 4.15
Multiple hosts, each connected via eno1 / static IP to public internet.
Each host has an additional 10G interface ens1f0, without default gateway.
Physically connected via Cables and 10G switch, isolated, no public uplink.
Host3:
ens1f0: dhcp4: no addresses: [ 192.168.1.3/24] # No Gateway
Host4:
ens1f0: dhcp4: no addresses: [ 192.168.1.4/24] # No Gateway
Interconnection works so far, as isolated network.
Now I am trying to add interfaces eth1 in containers of each host in order to extend this isolated network into selected containers.
lxc profile add Macv
lxc profile device add Macv eth1 nic nictype=macvlan parent=ens1f0
Host3 Container31:
eth0: bridged network for ingress/egress over public IP
eth1:
iface eth1 inet static
address 192.168.1.31
netmask 255.255.255.0
#NO GW
Host4 Container41:
eth0: bridged network for ingress/egress over public IP
eth1:
iface eth1 inet static
address 192.168.1.41
netmask 255.255.255.0
#NO GW
I can from container 41(192.168.1.41) ping host3(192.168.1.3) and the container31(192.168.1.31) in it.
from container31(192.168.1.31) ping host4(192.168.1.4) and the container41(192.168.1.41) in it.
But cant ping from containers their own hosts:
container31(192.168.1.31) cant ping host3(192.168.1.3), container41(192.168.1.41) cant ping host4(192.168.1.4).
Do I need to create a fake GW, as route for all of them?
But then, by adding GW to container interface, it creates new routes and by default lose the uplink connection, as it uses that GW with same weight for in/outbound traffic everywhere.
Or rather use bridge for above scenario?