My situation:
On my lxd server I have a single physical nic that is connected to a trunk line (vlans: 100, 110, 120, 130 – nothing untagged). I would like to have vlan 100 (management) connect to the host (and ideally not be accessible from the lxd containers). I would like to make various combinations of vlan 110, 120, and 130 available to lxd containers – where each of these containers can reach all the other containers on the vlans they share (access across vlans would be provided by a router with firewall rules that restrict / control / secure traffic between vlans).
In the lxd server netplan I have (lxd 3.13; kernel 5.0.0; ubuntu 19.04):
ethernets:
lan:
match:
macaddress: 00:e0:4c:68:99:fd
set-name: lan
dhcp4: no
vlans:
vmngt:
id: 100
link: lan
addresses: [ 192.168.100.0/24 ]
vdata:
id: 110
link: lan
addresses: [ 192.168.110.0/24 ]
bridges:
brmngt:
interfaces: [ vmngt ]
addresses: [ 192.168.100.2/24 ]
gateway4: 192.168.100.254
nameservers:
addresses: [ 192.168.110.20 ]
search: [ XXXX.net ]
parameters:
stp: false
forward-delay: 0
brdata:
interfaces: [ vdata ]
addresses: [ 192.168.110.2/24 ]
gateway4: 192.168.110.254
nameservers:
addresses: [ 192.168.110.20 ]
search: [ XXXX.net ]
parameters:
stp: false
forward-delay: 0
I have a profile to connect to the “data” vlan:
config: {}
description: Bridge to data vlan
devices:
eth0:
name: eth0
nictype: bridged
parent: brdata
type: nic
name: brdata
used_by:
- /1.0/containers/test
and within that container I set up a netplan:
network:
version: 2
ethernets:
eth0:
dhcp4: no
addresses: [ 192.168.110.199/24 ]
gateway4: 192.168.110.254
nameservers:
addresses: [ 192.168.110.20 ]
search: [ XXXX.net ]
from the container I can ping to the vmserver, but not to other containers or other hosts on the network.
How ought I set this up to work correctly (i.e., so I can connect different containers to different combinations of bridges to connect them to different combinations of vlans on my lan).
Thank yo