Skip to content

Commit 1ec68bb

Browse files
authored
Fix: Use 'send-community both' on IOS/XE longing to be back in 90s (#2590)
1 parent f3e2a65 commit 1ec68bb

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

netsim/ansible/templates/bgp/ios.macro.j2

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,15 @@
3030
neighbor {{ ip }} next-hop-self all
3131
{% endif %}
3232
{% if n.type in bgp.community|default({}) %}
33-
{% for c_type in bgp.community[n.type] %}
33+
{% set c_list = bgp.community[n.type] %}
34+
{# Deal with IOS/XE regression to the 90s #}
35+
{% if 'standard' in c_list and 'extended' in c_list %}
36+
neighbor {{ ip }} send-community both
37+
{% else %}
38+
{% for c_type in c_list %}
3439
neighbor {{ ip }} send-community {{ c_type }}
35-
{% endfor %}
40+
{% endfor %}
41+
{% endif %}
3642
{% endif %}
3743
{%- endmacro -%}
3844
{#

0 commit comments

Comments
 (0)