Skip to content

Commit

Permalink
Fix: PVRST root priority has to be configured per-VLAN on EOS
Browse files Browse the repository at this point in the history
  • Loading branch information
ipspace committed Jan 3, 2025
1 parent fde1068 commit 31e0cbd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions netsim/ansible/templates/stp/eos.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ spanning-tree priority {{ stp.priority }}

{# Check for per-VLAN enable and priority; implies Rapid-PVST #}
{% if vlans is defined %}
{% for vname,vdata in vlans.items() if 'stp' in vdata %}
{% if not vdata.stp.enable|default(True) %}
{% for vname,vdata in vlans.items() %}
{% if not vdata.stp.enable|default(True) %}
no spanning-tree vlan-id {{ vdata.id }}
{% elif 'priority' in vdata.stp %}
{% elif vdata.stp.priority is defined %}
spanning-tree vlan-id {{ vdata.id }} priority {{ vdata.stp.priority }}
{% endif %}
{% elif stp.protocol == 'pvrst' and stp.priority is defined %}
spanning-tree vlan-id {{ vdata.id }} priority {{ stp.priority }}
{% endif %}
{% endfor +%}
{% endif %}

Expand Down

0 comments on commit 31e0cbd

Please sign in to comment.