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

Flex-algo model for IGP #550

Merged
merged 49 commits into from
Jul 26, 2023
Merged

Flex-algo model for IGP #550

merged 49 commits into from
Jul 26, 2023

Conversation

vivek-ilangovan
Copy link
Contributor

@vivek-ilangovan vivek-ilangovan commented Jan 4, 2022

Support for IGP Flexible algorithms RFC9350

The change proposes model for following

  1. Definition of flexible algorithm
  2. Advertising of flexible algorithm definition in IS-IS or just participation of IS-IS node in flexible algorithm
  3. Advertisement of a prefix-segment associated with a flexible-algorithm in IS-IS

Flex-algorithm is keyed by a name. Attributes of flex-algorithms can be defined under /network-instances/network-instance/flex-algorithms

        +--rw oc-flexalgo:flex-algorithm
           +--rw oc-flexalgo:flex-algorithm-definition
           |  +--rw oc-flexalgo:algorithm* [flex-algo-id]
           |     +--rw oc-flexalgo:flex-algo-id    -> ../config/flex-algo-id
           |     +--rw oc-flexalgo:config
           |     |  +--rw oc-flexalgo:flex-algo-id             flex-algo-id
           |     |  +--rw oc-flexalgo:flex-algo-name?          string
           |     |  +--rw oc-flexalgo:flex-algo-description?   string
           |     |  +--rw oc-flexalgo:metric-type?             flex-algo-metric-type
           |     |  +--rw oc-flexalgo:calc-type?               flex-algo-calc-type
           |     |  +--rw oc-flexalgo:priority?                uint8
           |     |  +--rw oc-flexalgo:exclude*                 -> ../../../../flex-algo-global-attributes/flex-algo-admin-groups/admin-group/admin-group-name
           |     |  +--rw oc-flexalgo:include-all*             -> ../../../../flex-algo-global-attributes/flex-algo-admin-groups/admin-group/admin-group-name
           |     |  +--rw oc-flexalgo:include-any*             -> ../../../../flex-algo-global-attributes/flex-algo-admin-groups/admin-group/admin-group-name
           |     |  +--rw oc-flexalgo:srlg-exclude*            -> ../../../../flex-algo-global-attributes/srlgs/srlg/name
           |     |  +--rw oc-flexalgo:algo-flags?              boolean
           |     +--ro oc-flexalgo:state
           |        +--ro oc-flexalgo:flex-algo-id             flex-algo-id
           |        +--ro oc-flexalgo:flex-algo-name?          string
           |        +--ro oc-flexalgo:flex-algo-description?   string
           |        +--ro oc-flexalgo:metric-type?             flex-algo-metric-t           |        +--rw oc-flexalgo:admin-group-name    -> ../config/admin-group-name
           |        +--rw oc-flexalgo:config
           |        |  +--rw oc-flexalgo:admin-group-name?   string
           |        |  +--rw oc-flexalgo:bit-position?       uint32
           |        +--ro oc-flexalgo:state
           |           +--ro oc-flexalgo:admin-group-name?   string
           |           +--ro oc-flexalgo:bit-position?       uint32
           +--rw oc-flexalgo:flex-algo-interface-attributes
              +--rw oc-flexalgo:interface* [interface-id]
                 +--rw oc-flexalgo:interface-id    -> ../config/interface-id
                 +--rw oc-flexalgo:config
                 |  +--rw oc-flexalgo:interface-id?      oc-if:interface-id
                 |  +--rw oc-flexalgo:te-metric?         uint32
                 |  +--rw oc-flexalgo:min-delay?         uint32
                 |  +--rw oc-flexalgo:srlg-membership*   -> ../../../../flex-algo-global-attributes/srlgs/srlg/name
                 |  +--rw oc-flexalgo:admin-group*       -> ../../../../flex-algo-global-attributes/flex-algo-admin-groups/admin-group/admin-group-name
                 +--ro oc-flexalgo:state
                    +--ro oc-flexalgo:interface-id?      oc-if:interface-id
                    +--ro oc-flexalgo:te-metric?         uint32
                    +--ro oc-flexalgo:min-delay?         uint32
                    +--ro oc-flexalgo:srlg-membership*   -> ../../../../flex-algo-global-attributes/srlgs/srlg/name
                    +--ro oc-flexalgo:admin-group*       -> ../../../../flex-algo-global-attributes/flex-algo-admin-groups/admin-group/admin-group-name

Once the flex-algo attributes are defined, the IGPs can participate/advertise them by using the flex-algo-name. For example in case of IS-IS the path in the model will be /network-instances/network-instance/protocols/protocol/isis/global/segment-routing/config/fad-bindings

+--rw isis
|  +--rw global
...
             |  |  +--rw segment-routing
             |  |  |  +--rw config
             |  |  |  |  +--rw enabled?   boolean
             |  |  |  |  +--rw srgb?      -> ../../../../../../../segment-routing/srgbs/srgb/config/local-id
             |  |  |  |  +--rw srlb?      -> ../../../../../../../segment-routing/srlbs/srlb/config/local-id
             |  |  |  +--ro state
             |  |  |  |  +--ro enabled?   boolean
             |  |  |  |  +--ro srgb?      -> ../../../../../../../segment-routing/srgbs/srgb/config/local-id
             |  |  |  |  +--ro srlb?      -> ../../../../../../../segment-routing/srlbs/srlb/config/local-id
             |  |  |  |  +--rw flex-algorithm-bindings
             |  |  |  |     +--rw flex-algorithm-binding* [flex-algo-id]
             |  |  |  |        +--rw flex-algo-id    -> ../config/flex-algo-id
             |  |  |  |        +--rw config
             |  |  |  |        |  +--rw flex-algo-id?   uint8
             |  |  |  |        |  +--rw isis-level?     oc-isis-types:level-type
             |  |  |  |        |  +--rw advertised?     boolean
             |  |  |  |        |  +--rw participate?    boolean
             |  |  |  |        +--ro state
             |  |  |  |           +--ro flex-algo-id?   uint8
             |  |  |  |           +--ro isis-level?     oc-isis-types:level-type
             |  |  |  |           +--ro advertised?     boolean
             |  |  |  |           +--ro participate?    booleans

IGPs can advertise prefix-segments with an associated flex-algo by using the flex-algo-name. flex-algo-prefix-sids container is added for associating prefix with a flex-algo segment. Currently only isis uses this container and the path is /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/segment-routing/flex-algo-prefix-sids

+--rw isis
|  +--rw global
...
|  +--rw interfaces
|     +--rw interface* [interface-id]
...
|        +--rw levels
|        |  +--rw level* [level-number]
|        |     +--rw level-number            -> ../config/level-number
...
 |        |     +--rw afi-safi
 |        |     |  +--rw af* [afi-name safi-name]
...
 |        |     |     +--rw segment-routing
 |        |     |        +--rw prefix-sids
 |        |     |        |  +--rw prefix-sid* [prefix]
 |        |     |        |     +--rw prefix    -> ../config/prefix
 |        |     |        |     +--rw config
 |        |     |        |     |  +--rw prefix?          inet:ip-prefix
 |        |     |        |     |  +--rw sid-id?          oc-srt:sr-sid-type
 |        |     |        |     |  +--rw label-options?   enumeration
 |        |     |        |     +--ro state
 |        |     |        |        +--ro prefix?          inet:ip-prefix
 |        |     |        |        +--ro sid-id?          oc-srt:sr-sid-type
 |        |     |        |        +--ro label-options?   enumeration
 |        |     |        |        +--rw flex-algo-prefix-sids
 |        |     |        |        |  +--rw flex-algo-prefix-sid* [prefix flex-algo-id]
 |        |     |        |        |     +--rw prefix          -> ../config/prefix
 |        |     |        |        |     +--rw flex-algo-id    -> ../config/flex-algo-id
 |        |     |        |        |     +--rw config
 |        |     |        |        |     |  +--rw prefix?         inet:ip-prefix
 |        |     |        |        |     |  +--rw flex-algo-id?   uint8
 |        |     |        |        |     |  +--rw sid-id?         oc-srt:sr-sid-type
 |        |     |        |        |     +--ro state
 |        |     |        |        |        +--ro prefix?         inet:ip-prefix
 |        |     |        |        |        +--ro flex-algo-id?   uint8
 |        |     |        |        |        +--ro sid-id?         oc-srt:sr-sid-type

This matches the config model used in eos: https://eos.arista.com/eos-4-27-0f/is-is-flexible-algorithm/
We can configure flex algo definition under router traffic-engineering. This will translate to the path /network-instances/network-instance/flex-algorithms in the yang model

router traffic-engineering
   flex-algo
      flex-algo 128 HFT
      priority 85
      color 47
      metric min-delay
      administrative-group include all 0,3,5 include any 2,4,6 exclude 7-15
      srlg exclude flag marea warf 101 680 880 17

The IS-IS can make use of this definition to either advertise it or it can just participate in the algorithm. This translates to the /network-instances/network-instance/protocols/protocol/isis/global/segment-routing/config/fad-bindings

router isis Amun
   ...
   segment-routing mpls
      flex-algo HFT level-1 advertised

IS-IS can advertise prefix-segments associated with a particular flex algorithm. In EOS, this can be configured under interface mode. This translates to this yang path: /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/segment-routing/flex-algo-prefix-sids

[no | default] node-segment (ipv4|ipv6) index <value> [flex-algo <name>]

Other vendors configuration model looks similar:

Cisco: https://www.cisco.com/c/en/us/td/docs/routers/asr9000/software/asr9k-r6-6/segment-routing/configuration/guide/b-segment-routing-cg-asr9000-66x/b-segment-routing-cg-asr9000-66x_chapter_01111.html

Junos: https://www.juniper.net/documentation/us/en/software/junos/is-is/topics/topic-map/infocus-isis-flex-algo-sr.html

Nokia: https://infocenter.nokia.com/public/7750SR217R1A/index.jsp?topic=%2Fcom.nokia.Segment_Routing_and_PCE_User_Guide_21.7.R1%2Fconfiguring_flexible_algorithms.html

@OpenConfigBot
Copy link

OpenConfigBot commented Jan 4, 2022

Compatibility Report for commit b710383:
pyangbind@23a7a0d

vivek-ilangovan and others added 6 commits January 4, 2022 17:31
…d state and in turn it was used in config and state containers causing lint errors
…e to "Openconfig working group" that is used in other places.

Change the description to fad advertisement to something meaningful instead of a question
@vivek-ilangovan
Copy link
Contributor Author

Somehow the goyang/ygot is failing and it does not seem to be because of this PR. I have no idea how to make it pass!

Sample failure log:

/go/bin/generator -output_file=/go/src/aft.openconfig-aft//oc.go -path=/workspace/release/models,/workspace/third_party/ietf -package_name=exampleoc -generate_fakeroot -fakeroot_name=device -compress_paths=true -shorten_enum_leaf_names -trim_enum_openconfig_prefix -typedef_enum_with_defmod -enum_suffix_for_simple_union_enums -exclude_modules=ietf-interfaces -generate_rename -generate_append -generate_getters -generate_leaf_getters -generate_delete -annotations -generate_simple_unions -list_builder_key_threshold=3 /workspace/release/models/network-instance/openconfig-network-instance.yang /workspace/release/models/aft/openconfig-aft-network-instance.yang

package aft.openconfig-aft: no Go files in /go/src/aft.openconfig-aft

@dplore
Copy link
Member

dplore commented Jun 18, 2022

@vivek-ilangovan you should be able to correct the issue by merging your PR with the latest copy of the master branch. Note there are some conflicts to be resolved

…d state and in turn it was used in config and state containers causing lint errors
…e to "Openconfig working group" that is used in other places.

Change the description to fad advertisement to something meaningful instead of a question
…cremented the openconfig-network-instance.yang's version and the former is a submodule of the latter
F0620 11:25:43.365961 7379 generator.go:374] ERROR Generating GoStruct Code: key flex-algo-name had a leafref key (/openconfig-network-instance/network-instances/network-instance/protocols/protocol/isis/global/segment-routing/config/fad-bindings/fad-binding/flex-algo-name) in dir algorithm that did not exist ([ network-instances network-instance flex-algorithms algorithm name]), key flex-algo-name had a leafref key (/openconfig-network-instance/network-instances/network-instance/protocols/protocol/isis/global/segment-routing/state/fad-bindings/fad-binding/flex-algo-name) in dir algorithm that did not exist ([ network-instances network-instance flex-algorithms algorithm name])

Use a string for now
…igp-top

fad-bindings itself should have config and status for the key to be present and it will not be good to have fad config and status inside sr-igp-config
@rgwilton
Copy link

rgwilton commented May 4, 2023

Hi,

Proxying some comments on this model from an internal expert (and author of RFC 9350):

  1. Flex-algo affinities are encoded using ASLA, which is different to
    affinities used for MPLS TE. As such referring to some TE related config
    does not seem to be correct. The mapping for the flex-algo ASLA affinity
    bits should be independent of the TE affinity mapping.

  2. Enabling flex-algo per level - I'm not sure how useful that is and
    what value does it bring?

  3. They have defined the association between the interface's prefix and
    flex-algo specific SIDs. That works for the SR-MPLS. In SRv6 and IP
    flex-algo there are no SIDs, the prefix itself is bound to the flex-algo.

Do the YANG tree structures at the top of this review still represent the proposed configuration?

Thanks,
Rob

@dplore dplore added the last-call PR that is in final review before merging. label May 4, 2023
@dplore
Copy link
Member

dplore commented May 4, 2023

Last call for additional comments, to be merged on May 28th.

@vivek-ilangovan vivek-ilangovan requested a review from a team as a code owner May 9, 2023 13:09
vivek-ilangovan and others added 3 commits May 9, 2023 18:41
- Added new global and interface specific attributes for flex-algo and detach it from TE attributes
Also change fad-bindings to flex-algo-bindings to make it clear
@vivek-ilangovan
Copy link
Contributor Author

Hi @rgwilton

Thanks for the comments

  1. Flex-algo affinities are encoded using ASLA, which is different to
    affinities used for MPLS TE. As such referring to some TE related config
    does not seem to be correct. The mapping for the flex-algo ASLA affinity
    bits should be independent of the TE affinity mapping.

Makes sense. I have created a new flex-algo-global-attributes and flex-algo-interface-attributes and referring to that in the flex-algo definition. The attributes are mostly copied from the mpls container
@gvandeve can you please help review this part again where I have added the attributes to flex-algorithms container now.

  1. Enabling flex-algo per level - I'm not sure how useful that is and
    what value does it bring?

Arista EOS supports assigning different flex-algo to different levels. So I would like to retain it. Other vendors can probably set the level as level-1-2 in case they do not have that support?

  1. They have defined the association between the interface's prefix and
    flex-algo specific SIDs. That works for the SR-MPLS. In SRv6 and IP
    flex-algo there are no SIDs, the prefix itself is bound to the flex-algo.

I thought of initially supporting the SR-MPLS flex-algo segment for now. Is it ok to add the support for srv6 flex-algo and ip flex-algo later?

Do the YANG tree structures at the top of this review still represent the proposed configuration?

I have updated now with the suggested comments.

Thanks,
-Vivek

release/models/flex-algo/openconfig-flexalgo.yang Outdated Show resolved Hide resolved
release/models/flex-algo/openconfig-flexalgo.yang Outdated Show resolved Hide resolved
release/models/flex-algo/openconfig-flexalgo.yang Outdated Show resolved Hide resolved
description
"list of references to named shared risk link groups that the
interface belongs to.";
}
Copy link

Choose a reason for hiding this comment

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

you need delay metric as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is true. Few implementation allow for dynamic computation of min-delay and few allows a static configuration. I am going to skip this for now and add it in next iteration if that is ok?

@vivek-ilangovan
Copy link
Contributor Author

@dplore just wanted to check with you if this is in a state to be accepted

@dplore
Copy link
Member

dplore commented Jul 7, 2023

We will discuss at OC Operators meeting on July 11, 2023

@vivek-ilangovan
Copy link
Contributor Author

We will discuss at OC Operators meeting on July 11, 2023

Thanks for discussing about this PR!

@dplore
Copy link
Member

dplore commented Jul 14, 2023

Thanks for making the flex algo ID the key, this seems appropriate.

Are there any well known / rfc defined flexalgo ID’s? I didn't see any at the IANA registry but I am not sure I am looking in the right place.

@dplore
Copy link
Member

dplore commented Jul 14, 2023

/gcbrun

@vivek-ilangovan
Copy link
Contributor Author

I do not think so there are any standard/defined flex-algo ids. AFAIK all ids in the valid range 128-255 are user definable

@dplore
Copy link
Member

dplore commented Jul 18, 2023

/gcbrun

@dplore
Copy link
Member

dplore commented Jul 18, 2023

@vivek-ilangovan can you please rebase your fork with the master branch? This should fix the CI checks.

See #917 for example. I can merge #917 instead and refer to this PR but the history would be cleaner if you can rebase this PR.

@vivek-ilangovan
Copy link
Contributor Author

@vivek-ilangovan can you please rebase your fork with the master branch? This should fix the CI checks.

See #917 for example. I can merge #917 instead and refer to this PR but the history would be cleaner if you can rebase this PR.

@dplore I probably did what you asked. Can you check if this looks ok?

@dplore dplore merged commit e84d592 into openconfig:master Jul 26, 2023
6 checks passed
@dplore
Copy link
Member

dplore commented Jul 26, 2023

Thank you very much for the contribution @vivek-ilangovan and reviewers @gvandeve, @rgwilton, @ppsenak and @s19nal. This was a big effort!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
last-call PR that is in final review before merging. non-breaking
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants