Skip to content

T6750: sr-te: Adding initial Segment Routing Traffic Engineering portion of FRR#4994

Open
Cheeze-It wants to merge 21 commits intovyos:currentfrom
Cheeze-It:current
Open

T6750: sr-te: Adding initial Segment Routing Traffic Engineering portion of FRR#4994
Cheeze-It wants to merge 21 commits intovyos:currentfrom
Cheeze-It:current

Conversation

@Cheeze-It
Copy link
Copy Markdown
Contributor

Change summary

This is the initial implementation for Segment Routing Traffic Engineering that FRR has
implemented. It is not complete, there's more to add. But this is the start to it.
This has the the configuration commands, the smoketests implemented for the way
that this feature works within FRR.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

https://vyos.dev/T6750

Related PR(s)

FRRouting/frr#18910 <--- Opened Issue for FRR fix
FRRouting/frr#20638 <--- Opened PR fix from https://github.com/hedrok

How to test / Smoketest result

Here's how to add and delete the initial configuration:

[edit]
vyos@vyos# set protocols segment-routing traffic-engineering database-import-protocol isis
[edit]
vyos@vyos# set protocols segment-routing traffic-engineering segment-list testing-segment-list-name index value 0 mpls label 1000

vyos@vyos# compare
[protocols]
+ segment-routing {
+     traffic-engineering {
+         database-import-protocol {
+             isis
+         }
+         segment-list testing-segment-list-name {
+             index {
+                 value 0 {
+                     mpls {
+                         label "1000"
+                     }
+                 }
+             }
+         }
+     }
+ }

[edit]
vyos@vyos# commit
[edit]
vyos@vyos# exit

vyos@vyos:~$ vtysh -c "show run"
Building configuration...

Current configuration:
!
frr version 10.5.1
frr defaults traditional
hostname vyos
log syslog notifications
log timestamp precision 3
no log unique-id
service integrated-vtysh-config
!
ip route 0.0.0.0/0 10.0.0.65
!
segment-routing
 traffic-eng
  mpls-te on
  mpls-te import isis
  segment-list testing-segment-list-name
   index 0 mpls label 1000
  exit
 exit
exit
!
end



vyos@vyos:~$ configure
[edit]
vyos@vyos# delete protocols segment-routing traffic-engineering
[edit]
vyos@vyos# compare
[protocols segment-routing]
- traffic-engineering {
-     database-import-protocol {
-         isis
-     }
-     segment-list testing-segment-list-name {
-         index {
-             value 0 {
-                 mpls {
-                     label "1000"
-                 }
-             }
-         }
-     }
- }

[edit]
vyos@vyos# commit
[edit]
vyos@vyos# exit


vyos@vyos:~$ vtysh -c "show run"
Building configuration...

Current configuration:
!
frr version 10.5.1
frr defaults traditional
hostname vyos
log syslog notifications
log timestamp precision 3
no log unique-id
service integrated-vtysh-config
!
ip route 0.0.0.0/0 10.0.0.65
!
end

Here's the smoketests:

vyos@vyos:~$ /usr/libexec/vyos/tests/smoke/cli/test_protocols_segment-routing.py
test_segment_routing_mpls_label (__main__.TestProtocolsSegmentRouting.test_segment_routing_mpls_label) ... ok
test_segment_routing_mpls_label_and_adjacency (__main__.TestProtocolsSegmentRouting.test_segment_routing_mpls_label_and_adjacency) ... ok
test_segment_routing_mpls_label_and_prefix (__main__.TestProtocolsSegmentRouting.test_segment_routing_mpls_label_and_prefix) ... ok
test_segment_routing_srte_database (__main__.TestProtocolsSegmentRouting.test_segment_routing_srte_database) ... ok
test_srv6 (__main__.TestProtocolsSegmentRouting.test_srv6) ... ok
test_srv6_sysctl (__main__.TestProtocolsSegmentRouting.test_srv6_sysctl) ... ok

----------------------------------------------------------------------
Ran 6 tests in 32.532s

OK

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • [] I have updated the documentation accordingly

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 17, 2026


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


2 out of 3 committers have signed the CLA.
✅ (Cheeze-It)[https://github.com/Cheeze-It]
✅ (c-po)[https://github.com/c-po]
❌ @Cheeze_It
Cheeze_It seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 17, 2026


PR title does not match the required format

@sever-sever sever-sever marked this pull request as draft February 17, 2026 09:05
@hedrok
Copy link
Copy Markdown
Contributor

hedrok commented Feb 17, 2026

Added PR with FRR patch: vyos/vyos-build#1120
With FRR built in that PR + vyos-1x in this PR (and after system restart to update daemons) smoke test passes.

@Cheeze-It
Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA.

@Cheeze-It Cheeze-It marked this pull request as ready for review February 17, 2026 16:57
@l0crian1
Copy link
Copy Markdown
Contributor

Minor syntax suggestion:

I think value is redundant when defining the index for the segment-list. I think just having segment-list testing-segment-list-name index 0 mpls label 1000 would be fine.

@Cheeze-It
Copy link
Copy Markdown
Contributor Author

Cheeze-It commented Feb 18, 2026

Minor syntax suggestion:

I think value is redundant when defining the index for the segment-list. I think just having segment-list testing-segment-list-name index 0 mpls label 1000 would be fine.

I would have loved to have done it like that. Initially when I implemented this I did it literally exactly as you suggested, but it failed on me. Trying to do segment-list as a tag node and index as a tag node right after each other failed. That's why I had to add "value" in there. I wasn't happy with it either.

Copy link
Copy Markdown
Member

@sever-sever sever-sever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are conflicts

<<<<<<< current
{% if traffic_engineering is vyos_defined %}
segment-routing
 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 }}
{%         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.value.items() is vyos_defined %}
{%                 for index, index_config in segment_list_config.index.value.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 %}
{% endif %}
{% if srv6.locator is vyos_defined %}
=======
{% if srv6 is vyos_defined %}
>>>>>>> current
segment-routing
 srv6
{%     if srv6.encapsulation is vyos_defined %}
  encapsulation
{%         if srv6.encapsulation.source_address is vyos_defined %}
   source-address {{ srv6.encapsulation.source_address }}
{%         endif %}
  exit
{%     endif %}
{%     if srv6.locator is vyos_defined %}
  locators
{%         for locator, locator_config in srv6.locator.items() %}
   locator {{ locator }}
{%             if locator_config.prefix is vyos_defined %}
    prefix {{ locator_config.prefix }} block-len {{ locator_config.block_len }} node-len {{ locator_config.node_len }} func-bits {{ locator_config.func_bits }}
{%             endif %}
{%             if locator_config.behavior_usid is vyos_defined %}
    behavior usid
{%             endif %}
{%             if locator_config.format is vyos_defined %}
    format {{ locator_config.format }}
{%             endif %}
    exit
    !
{%         endfor %}
  exit
{%     endif %}
  !
exit
!
exit
!
{% endif %}

Co-authored-by: Christian Breunig <christian@breunig.cc>
vyosbot added a commit to vyos/vyos-cla-signatures that referenced this pull request Mar 8, 2026
@Cheeze-It
Copy link
Copy Markdown
Contributor Author

@sever-sever, I believe I have fixed the conflict on the jinja2 profile :)

@Cheeze-It Cheeze-It requested a review from c-po March 30, 2026 12:34
Co-authored-by: Christian Breunig <christian@breunig.cc>
@c-po
Copy link
Copy Markdown
Member

c-po commented Apr 3, 2026

Minor syntax suggestion:

I think value is redundant when defining the index for the segment-list. I think just having segment-list testing-segment-list-name index 0 mpls label 1000 would be fine.

This has been fixed. I came to the same idea without seeing you comment ;)

@Cheeze-It
Copy link
Copy Markdown
Contributor Author

Minor syntax suggestion:
I think value is redundant when defining the index for the segment-list. I think just having segment-list testing-segment-list-name index 0 mpls label 1000 would be fine.

This has been fixed. I came to the same idea without seeing you comment ;)

Oh he was absolutely correct. I initially tried to do this back like a year ago but the schema didn't allow me then. Thankfully we've made that change in the schema and now we can :)

@github-actions github-actions bot added the rebase label Apr 6, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

CI integration ❌ failed!

Details

CI logs

  • CLI Smoketests ❌ failed
  • CLI Smoketests (interfaces only) ❌ failed
  • Config tests 👍 passed
  • RAID1 tests 👍 passed
  • CLI Smoketests VPP 👍 passed
  • Config tests VPP 👍 passed
  • TPM tests 👍 passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

6 participants