proxmox: add initial support for L2 VXLAN

I heard we like L2 so I put some L2 in our L3 so we can L2 as we L3 on L2.
This commit is contained in:
Timotej Lazar 2023-10-18 15:01:02 +02:00
parent c9bb03ea36
commit 0c1cc14e01
8 changed files with 126 additions and 10 deletions

View file

@ -0,0 +1,30 @@
# Keep vmbr0 named as is and in the main interfaces file so Proxmox can find it.
# Bridge for V(X)LANs.
auto vmbr0
iface vmbr0 inet manual
bridge-vlan-aware yes
bridge-ports {{ vlans | map('regex_replace', '^', 'vni') | join(' ') }}
bridge-stp off
bridge-fd 0
# Interfaces.
{% for vlan in vlans %}
auto vni{{ vlan }}
iface vni{{ vlan }} inet static
vxlan-id {{ vlan }}
bridge-access {{ vlan }}
mstpctl-bpduguard yes
mstpctl-portbpdufilter yes
{% endfor %}
# In place of vni* interfaces above this should work also but does not.
# Might start working after proxmox upgrades their ifupdown2.
#auto vxlan
#iface vxlan inet static
# bridge-vlan-vni-map {{ vlans | zip(vlans) | map('join', '=') | join(' ') }}
# bridge-vids {{ vlans | join(' ') }}
# bridge-learning off
source /etc/network/interfaces.d/*