-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add Srv6 static config HLD #1860
Add Srv6 static config HLD #1860
Conversation
doc/srv6/srv6_static_config_hld.md
Outdated
func_len = flen ; bit length of function portion in address, default 16 | ||
arg_len = alen ; bit length of argument portion in address, default 0 | ||
action = behavior ; behaviors defined for the SID | ||
vrf = VRF_TABLE.key ; Optional, VRF name for decapsulation actions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let add comment applicable only for UDT46. If not define default VRF will be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
doc/srv6/srv6_static_config_hld.md
Outdated
arg_len = alen ; bit length of argument portion in address, default 0 | ||
action = behavior ; behaviors defined for the SID | ||
vrf = VRF_TABLE.key ; Optional, VRF name for decapsulation actions | ||
adj = address, ; Optional, list of adjacencies for cross-connect actions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can remove this as we are not planning to test it anyways. This can be extended. in future as needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
doc/srv6/sonic-srv6.yang
Outdated
} | ||
|
||
leaf action { | ||
type enumeration { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might restrict the static configuration only for the 3 types below. Is the plan to support only these 3 types for now and later extend it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, currently we only plan to support these 3 types of action.
|
||
|
||
## 3.2 Bgpcfgd changes | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please capture the FRR configuration sample. It would be good if you can provide sonic field to FRR configuration mapping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is still some ongoing discussion on the details of the new FRR configuration CLI. We'd better add the config sample and mapping later.
doc/srv6/srv6_static_config_hld.md
Outdated
Specifically, there is no mechamism in SONiC allowing SDN controllers or users to directly add configuration for SRv6 without involving BGP. | ||
|
||
In this document, we first define a new **SRV6_MY_SID_TABLE** table in CONFIG_DB that serves as the configuration source of SRv6 in SONiC. | ||
Then, we design a new SRv6 Manager module in bgpcfgd to subscribe to the **SRV6_MY_SID_TABLE** table and compile changes in CONFIG_DB to changes in the configurations of FRR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to mention about the sonic specific patch to support action field in FRR as by default FRR doesn't support it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a note
@dgsudharsan : Regarding supporting below requirement for DT46 End behavior do we need something like this in Config DB schema for MY_SID_TABLE ? We need OA to read this to create tunnel with the correct attribute. What do you suggest ?
|
``` | ||
|
||
|
||
## 3.2 Bgpcfgd changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're already using frrcfgd for SRv6, I would suggest to use frrcfgd for static SRv6 also for consistency, if there is any reason to use bpgcfgd, please state here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Venkatsen,
The primary reason is that we don't use frrcfgd in our daily operations. Since bgpcfgd has been leveraged to do static route configuration, we think it is not inappropriate to use bgpcfgd for static SRv6 configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eddieruan-alibaba FYI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we discuss it in Routing WG? @BYGX-wcr @venkatmahalingam @lguohan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it would be helpful for the WG to understand/aware the new changes coming in for static SRv6.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Azure Networking has an event tonight starting at 6pm so I am unable to join this week's routing WG meeting. May we discuss this in next week's routing WG meeting? I can start an email thread about this topic. @venkatmahalingam, may you share your email address with me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eddieruan-alibaba
Has static SRv6 meeting happened? Is there a recording
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc/srv6/srv6_static_config_hld.md
Outdated
+--rw sonic-srv6 | ||
+--rw SRV6_MY_SID | ||
| +--rw SRV6_MY_SID_LIST* [ip-address] | ||
| +--rw ip-address inet:ipv6-address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we have same ipv6 address exist across VRFs? should use VRF as a key instead of field in the table?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This table defines the MY_SID_LIST which should only have one instance in the current system. The VRF field is used to specify which VRF should be used for look up after the SRv6 functions decapsulates the packet. It is not used to specify which VRF the SID belongs to.
doc/srv6/srv6_static_config_hld.md
Outdated
|
||
# About this Manual | ||
|
||
This document provides general information about the design of the enhancements in SONiC to support static configuration of Segmentation Routing over IPv6 protocol, which is crucial for SRv6 SDN deployment (without usage of BGP). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we adding support only for end-point behaviors? how about steering the traffic to SRv6 at the head-end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Right now, we only intend to add support for end-point behaviors because the traffic steering is done on the NICs in our use scenarios.
doc/srv6/sonic-srv6.yang
Outdated
|
||
leaf action { | ||
type enumeration { | ||
enum uN; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that you support only uSID not regular end.dt6, end.dt46..etc, correct?, we should mention clearly in the HLD that static SRv6 supports only uSID based handling now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a table for the current list of supported behaviors. Feel free to extend the list after you add the necessary support and tests.
doc/srv6/srv6_static_config_hld.md
Outdated
# 1 Introuduction and Scope | ||
|
||
This document describes the high-level design of the new features in SONiC to support SRv6 SDN. | ||
The new features include the addtion of a new table in CONFIG_DB to allow static configuration of SRv6 and the enhancement of bgpcfgd to program FRR with input from CONFIG_DB. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @BYGX-wcr, thanks for the HLD to support SRv6 uSID static configuration.
The static SRv6 uSID configuration model in FRR as follows:
- Configure an SRv6 locator and identify its parameters (name, prefix, block-len, node-len, func-bits). The CLI for this is already in FRR mainline.
- Configure a static SRv6 SID under the SRv6 locator and identify its parameters (behavior, vrf, etc.). The CLI for this is being added in this FRR PR (staticd: Add support for SRv6 Static SIDs FRRouting/frr#16894)
In the current HLD, the configuration model is different and hence can’t be mapped to the current SRv6 uSID configuration model in FRR.
To resolve this, I would propose the following:
- Create a new table (SRV6_MY_LOCATOR) for the SRv6 locator config and its parameters (name, prefix, block-len, node-len, func-bits).
- In the SRV6_MY_SID_TABLE, you add the locator as new parameter for the SID. The locator parameter points to one of the locators in SRV6_MY_LOCATOR via the locator’s name. This way you can map the config to FRR config.
FRR inherits the (block-len, node-len, func-bits) of the locator and install the static SID into SONiC APPL_DB via fpm-sonic-dplane. This is already mainline in FRR and SONiC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The locator PR is added via sonic-net/sonic-buildimage#20954 to frrcfgd.
The sample config db json could be found at
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahsalam: I understand the logic being used by SRV6_MY_LOCATOR. However our current config db schema is good enough to program FRR. We do not want indirection logic using 2 different config tables. If you see in below example we have all the information to program frr. We will parse ipv6 address and extract the opcode prefix
to FRR. Keeping one table in synch with APP_DB format is easier for us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahsalam / @eddieruan-alibaba : We also planning to remove vrf
from config db schema as our current use case is to use SAI_MY_SID_ENTRY_ATTR_TUNNEL_ID
for uDT46 usecase. Currently Tunnel Decap Schema
SONiC/doc/decap/subnet_decap_HLD.md
Line 149 in 56a689c
### TUNNEL_DECAP_TERM_TABLE |
SAI_MY_SID_ENTRY_ATTR_VRF
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DT46 will use default VRF. Our use case is not a typical L3VPN use case.
/azp run |
No pipelines are associated with this pull request. |
@venkatmahalingam Can you clarify why yang can't support back ref? Currently when locator table is removed the yang validation for my_sid table will fail as it points to a locator without reference. I believe option#3 aligns with other tables ACL rule has a reference to ACL table https://github.com/sonic-net/sonic-buildimage/blob/cb85ddb33f0a9e54e0e6a11635e04af489ee4d9e/src/sonic-yang-models/yang-templates/sonic-acl.yang.j2#L56 |
@BYGX-wcr @abdosi @venkatmahalingam The concern that Venkat raises whether the key of SRV6_MY_SID_TABLE is a unique key across locators or not. If not unique, it may lead to problems that you cannot have two locators pointed by the same my_sid entry. Please clarify if this is a valid use case or not. |
/azp run |
No pipelines are associated with this pull request. |
Hi @dgsudharsan @venkatmahalingam , I have fixed the inconsistencies in the document per our discussions. I also added an example for the MY_LOCATORS table. |
@BYGX-wcr @venkatmahalingam @dgsudharsan I saw all parties have approved this PR. Do we still need to discuss three options listed in this week's WG? |
MY_SID is used similar as vpn label in MPLS logically. it should be unique at the local device. |
No, we're good @eddieruan-alibaba |
I merged this PR based on all the approval. |
@dgsudharsan : Please add OA PR in this PR description. |
The PRs: |
Added |
Adding FRR CLI to support SRv6 static. The HLD for the feature is available at sonic-net/SONiC#1860 Signed-off-by: Carmine Scarpitta <[email protected]>
<!-- Please make sure you've read and understood our contributing guidelines: https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md ** Make sure all your commits include a signature generated with `git commit -s` ** If this is a bug fix, make sure your description includes "fixes #xxxx", or "closes #xxxx" or "resolves #xxxx" Please provide the following information: --> #### Why I did it There is a motivation to add capabilities in SONiC that allows static configuration of SRv6 network. ##### Work item tracking - Microsoft ADO **(number only)**: 30251795 #### How I did it I added a SRv6 manager in Bgpcfgd that subscribes to SRV6_MY_LOCATORS and SRV6_MY_SIDS in CONFIG_DB and programs the changes to FRR's configuration. Note: this change depends on the availability and implementation details of the following FRR patch [FRR SRv6 Static SID CLI](sonic-net/sonic-buildimage#21380) #### How to verify it - Run unit tests - Build an image that contains this change and the relevant FRR CLI support. - Test the Image on a virtual device or physical device <!-- If PR needs to be backported, then the PR must be tested against the base branch and the earliest backport release branch and provide tested image version on these two branches. For example, if the PR is requested for master, 202211 and 202012, then the requester needs to provide test results on master and 202012. --> #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 - [ ] 202205 - [ ] 202211 - [ ] 202305 #### Tested branch (Please provide the tested image version) <!-- - Please provide tested image version - e.g. - [x] 20201231.100 --> - [ ] <!-- image version 1 --> - [ ] <!-- image version 2 --> #### Description for the changelog <!-- Write a short (one line) summary that describes the changes in this pull request for inclusion in the changelog: --> <!-- Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU. --> #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md --> [SRv6 static config HLD](sonic-net/SONiC#1860) #### A picture of a cute animal (not mandatory but encouraged)
Adding FRR CLI to support SRv6 static. The HLD for the feature is available at sonic-net/SONiC#1860 Signed-off-by: Carmine Scarpitta <[email protected]>
Adding FRR CLI to support SRv6 static. The HLD for the feature is available at sonic-net/SONiC#1860
<!-- Please make sure you've read and understood our contributing guidelines: https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md ** Make sure all your commits include a signature generated with `git commit -s` ** If this is a bug fix, make sure your description includes "fixes #xxxx", or "closes #xxxx" or "resolves #xxxx" Please provide the following information: --> #### Why I did it There is a motivation to add capabilities in SONiC that allows static configuration of SRv6 network. ##### Work item tracking - Microsoft ADO **(number only)**: 30251795 #### How I did it I added a SRv6 manager in Bgpcfgd that subscribes to SRV6_MY_LOCATORS and SRV6_MY_SIDS in CONFIG_DB and programs the changes to FRR's configuration. Note: this change depends on the availability and implementation details of the following FRR patch [FRR SRv6 Static SID CLI](sonic-net/sonic-buildimage#21380) #### How to verify it - Run unit tests - Build an image that contains this change and the relevant FRR CLI support. - Test the Image on a virtual device or physical device <!-- If PR needs to be backported, then the PR must be tested against the base branch and the earliest backport release branch and provide tested image version on these two branches. For example, if the PR is requested for master, 202211 and 202012, then the requester needs to provide test results on master and 202012. --> #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 - [ ] 202205 - [ ] 202211 - [ ] 202305 #### Tested branch (Please provide the tested image version) <!-- - Please provide tested image version - e.g. - [x] 20201231.100 --> - [ ] <!-- image version 1 --> - [ ] <!-- image version 2 --> #### Description for the changelog <!-- Write a short (one line) summary that describes the changes in this pull request for inclusion in the changelog: --> <!-- Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU. --> #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md --> [SRv6 static config HLD](sonic-net/SONiC#1860) #### A picture of a cute animal (not mandatory but encouraged)
Adding FRR CLI to support SRv6 static. The HLD for the feature is available at sonic-net/SONiC#1860 Signed-off-by: Carmine Scarpitta <[email protected]>
This PR proposes to add a High-level Design document for changes in SONiC to support static configuration of Segment-routing over IPv6. Besides, a YANG model specification for the new table in CONFIG_DB is also defined.
Implementation PRs: