servers/roles/proxmox/templates/interfaces.j2
Timotej Lazar fbfdc83ee5 proxmox: use multiple non-VLAN-aware bridges
The Proxmox SDN feature does not play nice with our FRR and VXLAN setup.
With a single bridge we can’t have interface aliases. So use a bridge
for each VLAN. Actually don’t even have VLANs, just bridges mainlined
into VXLAN tunnels.

Read the list of VLANs carried by Proxmox nodes from a custom field on
the cluster in NetBox. Remove the vmbr0 device from individual nodes.
2024-02-20 16:43:47 +01:00

23 lines
618 B
Django/Jinja

{% set my_cluster = query('netbox.netbox.nb_lookup', 'clusters', raw_data=true,
api_filter='name='~cluster) | first -%}
# bridges must be named vmbrN for proxmox to care
{% for vlan in my_cluster.custom_fields.vlans | sort(attribute='vid') %}
auto vmbr{{ vlan.vid }}
iface vmbr{{ vlan.vid }} inet manual
# {{ vlan.name }}
bridge-vlan-aware no
bridge-ports vni{{ vlan.vid }}
bridge-stp off
bridge-fd 0
auto vni{{ vlan.vid }}
iface vni{{ vlan.vid }} inet static
vxlan-id {{ vlan.vid }}
mstpctl-bpduguard yes
mstpctl-portbpdufilter yes
{% endfor %}
source /etc/network/interfaces.d/*