Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isisd: properly display srv6 algorithm #17414

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dmytroshytyi-6WIND
Copy link
Contributor

When the segment-routing ipv6 is configured, the SPF algoritm shows S-SPF is used:

rt1# show isis segment-routing srv6 node
Area 1:
IS-IS L1 SRv6-Nodes:

System ID Algorithm SRH Max SL SRH Max End Pop SRH Max H.encaps SRH Max End D

0000.0000.0001 S-SPF 3 3 2 5

Actually, the segment-routing ipv6 algo capabilities displayed from router_capability_tlv. Display the segment-routing ipv6 algo capabilities from locator_tlv

Initialize sub tlv "algorithm" in the "locator" tlv with SR_ALGORITHM_SPF value.

rt1# show isis segment-routing srv6 node
Area 1:
IS-IS L1 SRv6-Nodes:

System ID Algorithm SRH Max SL SRH Max End Pop SRH Max H.encaps SRH Max End D

0000.0000.0001 SPF 3 3 2 5

Copy link
Contributor

@cscarpitta cscarpitta left a comment

Choose a reason for hiding this comment

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

I don’t think this is the correct fix for the problem.

show isis segment-routing srv6 node is supposed to display the SRv6 capabilities of the IS-IS nodes, including maximum value of the "Segments Left" field, maximum number of SIDs, and supported algorithms.

As per RFC 9352, IS-IS advertises these capabilities in sub-TLVs of the Router Capability TLV.

Therefore, show isis segment-routing srv6 node should extract all these values (including algorithm) from the Router Capability TLV and its Sub-TLVs.

The Algorithm field of the SRv6 Locator TLV has a different meaning. It is not used to advertise the algorithms supported by the IS-IS node.

When the segment-routing ipv6 is configured, the SPF
algoritm shows S-SPF is used:

> rt1# show isis segment-routing srv6 node
> Area 1:
> IS-IS L1 SRv6-Nodes:
>
> System ID Algorithm SRH Max SL SRH Max End Pop SRH Max H.encaps SRH Max End D
> -----------------------------------------------------------------------------------------
> 0000.0000.0001 S-SPF 3 3 2 5

Actually, the segment-routing ipv6 algo capabilities (SPF) are rewritten.
Don't rewrite the algo[0].

> rt1# show isis segment-routing srv6 node
> Area 1:
> IS-IS L1 SRv6-Nodes:
>
> System ID Algorithm SRH Max SL SRH Max End Pop SRH Max H.encaps SRH Max End D
> -----------------------------------------------------------------------------------------
> 0000.0000.0001 SPF 3 3 2 5

Fixes: ("78774bbcd51b") isisd: add isis flex-algo lsp advertisement

Signed-off-by: Dmytro Shytyi <[email protected]>
@frrbot frrbot bot added the bugfix label Nov 12, 2024
@github-actions github-actions bot added size/XS and removed size/M labels Nov 12, 2024
@dmytroshytyi-6WIND
Copy link
Contributor Author

@cscarpitta , thanks. I changed the logic of the commit according to your comment. We show router_capa that is rewritten. This changed commit avoid rewritting the SPF value. Now the algo displayed is SPF.

@dmytroshytyi-6WIND dmytroshytyi-6WIND marked this pull request as ready for review November 13, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants