31 lines
801 B
Django/Jinja
31 lines
801 B
Django/Jinja
# 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 regex (vni.*)
|
|
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/*
|