From cf5d2b87e184c50b02638442cbc0691e6433dc4c Mon Sep 17 00:00:00 2001 From: Cheeze-It <16260577+Cheeze-It@users.noreply.github.com> Date: Thu, 30 Apr 2026 06:25:49 -0600 Subject: T6750: sr-te: Adding initial Segment Routing Traffic Engineering portion of FRR (#4994) * sr-te: T6750: Adding Segment Routing Traffic Engineering portion of FRR --------- Co-authored-by: Cheeze_It Co-authored-by: Christian Breunig --- data/templates/frr/daemons.frr.tmpl | 4 +-- data/templates/frr/zebra.segment_routing.frr.j2 | 39 ++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 3 deletions(-) (limited to 'data') diff --git a/data/templates/frr/daemons.frr.tmpl b/data/templates/frr/daemons.frr.tmpl index fa39ae9d0..32ef1079b 100644 --- a/data/templates/frr/daemons.frr.tmpl +++ b/data/templates/frr/daemons.frr.tmpl @@ -12,7 +12,7 @@ # eigrp # sharpd # fabricd -# pathd +# # # The zebra, mgmtd and staticd daemons are always started and can not be disabled # @@ -37,7 +37,7 @@ pbrd=no bfdd=yes fabricd=yes vrrpd=no -pathd=no +pathd=yes # # Define defaults for all services even those who shall be kept disabled. diff --git a/data/templates/frr/zebra.segment_routing.frr.j2 b/data/templates/frr/zebra.segment_routing.frr.j2 index a0bcc9210..b3f2a1fbb 100644 --- a/data/templates/frr/zebra.segment_routing.frr.j2 +++ b/data/templates/frr/zebra.segment_routing.frr.j2 @@ -1,6 +1,43 @@ ! -{% if srv6 is vyos_defined %} segment-routing +{% if traffic_engineering is vyos_defined %} + traffic-eng + mpls-te on +{% if traffic_engineering.database_import_protocol is vyos_defined %} +{% for protocol, protocol_config in traffic_engineering.database_import_protocol.items() %} + mpls-te import {{ protocol | replace('ospf', 'ospfv2') }} +{% endfor %} +{% endif %} +{% if traffic_engineering.segment_list is vyos_defined %} +{% for segment_list, segment_list_config in traffic_engineering.segment_list.items() %} + segment-list {{ segment_list }} +{% if segment_list_config.index.items() is vyos_defined %} +{% for index, index_config in segment_list_config.index.items() %} +{% if index_config.mpls.label is vyos_defined %} + index {{ index }} mpls label {{ index_config.mpls.label }} +{% endif %} +{% if index_config.nai is vyos_defined %} +{% if index_config.nai.adjacency is vyos_defined %} +{% for address_family, address_family_options in index_config.nai.adjacency.items() %} + index {{ index }} nai adjacency {{ address_family_options.source_identifier }} {{ address_family_options.destination_identifier }} +{% endfor %} +{% endif %} +{% if index_config.nai.prefix is vyos_defined %} +{% for address_family, address_family_options in index_config.nai.prefix.items() %} +{% for prefix, prefix_options in address_family_options.prefix_identifier.items() %} + index {{ index }} nai prefix {{ prefix }} {{ 'algorithm 0' if prefix_options.algorithm.spf is vyos_defined }} {{ 'algorithm 1' if prefix_options.algorithm.strict_spf is vyos_defined }} +{% endfor %} +{% endfor %} +{% endif %} +{% endif %} +{% endfor %} +{% endif %} +{% endfor %} +{% endif %} + exit +{% endif %} +! +{% if srv6 is vyos_defined %} srv6 {% if srv6.encapsulation is vyos_defined %} encapsulation -- cgit v1.2.3