Open ahinrichs opened 1 month ago
This has to be implemented netavark so I move the issue there.
For 1. the code is in a different repo common, func createBridge, line 16
yes but until it is implemented in netavark (PRs welcome) there is no point in allowing that in c/common/libnetwork
Feature request description
With
podman
+netavark
it is currently not possible to create veth links with VLAN tags.I use the linux bridge in VLAN-aware mode to interconnect different container/VMs (podman, libvirt, lxc, systemd-nspawn). To connect podman container to a specific VLAN I use the CNI bridge plugin in L2-only vlan configuration.
Suggest potential solution
It would need two changes:
network_interface
but differentvlan
optionsudo bridge vlan add vid 20 pvid untagged dev veth1
1. network creation
Currently, the
podman network create
already allows to set a vlan option:gives
/etc/containers/networks/vlan20.json
But it fails to create another network on the same bridge:
2. container startup / link creation
When using a network, the vlan option currently is ignored:
With CNI (or libvirt, lxc, ...) it works as expected:
Have you considered any alternatives?
I used to use CNI and custom shell based plugins. As CNI is considered deprecated I try to recreate my setup. Netavark and its support for multiple static interfaces is great but the lack of VLAN support in podman currently a stopper for me. So I need to stick with CNI for now.
Additional context
From the
podman network create
manpage:--opt, -o=option
Set driver specific options.
Additionally the bridge driver supports the following options:
vlan
: This option assign VLAN tag and enables vlan_filtering. Defaults to none.com.docker.network.bridge.name
: This option assigns the given name to the created Linux Bridge