-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add Srv6 static config HLD #1860
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
Changes from 9 commits
ed6c1c2
cb0a83d
2301048
100b3fc
7758034
906d87a
793e255
633fae3
c6f49cb
13720b9
bd92ca2
098a038
5fb2d75
833483b
3a8f49b
d0fcc74
21420cc
078dd6e
53c80e0
41d0cf2
81cc67d
fb20b35
3c5f54b
49a62fc
11ac46c
c5b1b06
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| module sonic-srv6 { | ||
| revision 2024-12-05 { | ||
| description | ||
| "Initial revision."; | ||
| } | ||
| namespace "http://github.com/sonic-net/sonic-srv6"; | ||
|
|
||
| import ietf-yang-types { | ||
| prefix yang; | ||
| } | ||
|
|
||
| import ietf-inet-types { | ||
| prefix inet; | ||
| } | ||
|
|
||
| import sonic-common { | ||
| prefix scommon; | ||
| } | ||
|
|
||
| container sonic-srv6 { | ||
| scommon:db-name "CONFIG_DB"; | ||
|
|
||
| list SRV6_MY_SID_TABLE { | ||
| key "ip-address"; | ||
| scommon:key-delim "|"; | ||
| scommon:key-pattern "SRV6_MY_SID_TABLE|{ip-address}"; | ||
|
|
||
| leaf ip-address { | ||
| type inet:ipv6-address; | ||
| } | ||
|
|
||
| leaf block_len { | ||
| type uint8 { | ||
| range "1..128"; | ||
| } | ||
|
|
||
| default 32; | ||
| } | ||
|
|
||
| leaf node_len { | ||
| type uint8 { | ||
| range "1..128"; | ||
| } | ||
|
|
||
| default 16; | ||
| } | ||
|
|
||
| leaf func_len { | ||
| type uint8 { | ||
| range "1..128"; | ||
| } | ||
|
|
||
| default 16; | ||
| } | ||
|
|
||
| leaf arg_len { | ||
| type uint8 { | ||
| range "1..128"; | ||
| } | ||
|
|
||
| default 0; | ||
| } | ||
|
|
||
| leaf action { | ||
| type string; | ||
| } | ||
|
|
||
| leaf vrf { | ||
| type leafref { | ||
| path "/vrf:sonic-vrf/VRF/VRF_LIST/name"; | ||
| } | ||
| } | ||
|
|
||
| leaf-list adj { | ||
| type inet:ipv6-address; | ||
| ordered-by user; | ||
| } | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,174 @@ | ||||
| # Static Configuration of SRv6 in SONiC HLD | ||||
|
|
||||
| # Table of Contents | ||||
|
|
||||
| - [Revision](#revision) | ||||
| - [Definition/Abbreviation](#definitionabbreviation) | ||||
| - [About This Manual](#about-this-manual) | ||||
| - [1 Introuduction and Scope](#1-introuduction-and-scope) | ||||
| - [2 Feature Requirements](#2-feature-requirements) | ||||
| - [2.1 Functional Requirements](#21-functional-requirements) | ||||
| - [2.2 Configuration and Managment Requirements](#22-configuration-and-management-requirements) | ||||
| - [2.3 Warm Boot Requirements](#23-warm-boot-requirements) | ||||
| - [3 Feature Design](#3-feature-design) | ||||
| - [3.1 New Table in ConfigDB](#31-new-table-in-configdb) | ||||
| - [3.2 Bgpcfgd Changes](#32-bgpcfgd-changes) | ||||
| - [3.3 YANG Model](#33-yang-model) | ||||
| - [4 Unit Test](#4-unit-test) | ||||
| - [5 References ](#5-references) | ||||
|
|
||||
| # Revision | ||||
|
|
||||
| | Rev | Date | Author | Change Description | | ||||
| | :--: | :-------: | :------------------------: | :---------------------: | | ||||
| | 0.1 | 12/5/2024 | Changrong Wu | Initial version | | ||||
|
|
||||
|
|
||||
| # Definition/Abbreviation | ||||
|
|
||||
| ### Table 1: Abbreviations | ||||
|
|
||||
| | ****Term**** | ****Meaning**** | | ||||
| | -------- | ----------------------------------------- | | ||||
| | BGP | Border Gateway Protocol | | ||||
| | SID | Segment Identifier | | ||||
| | SRv6 | Segment Routing IPv6 | | ||||
| | SDN | Software Defined Network | | ||||
| | uSID | Micro Segment | | ||||
| | VRF | Virtual Routing and Forwarding | | ||||
|
|
||||
| # 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). | ||||
|
||||
|
|
||||
| # 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. | ||||
|
||||
| ### 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.
Outdated
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
abdosi marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
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
Outdated
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
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.
add decap_dscp_mode also in example
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
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.
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.
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 ready to add FRR config now?
Outdated
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.
abdosi marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
abdosi marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
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.
@BYGX-wcr : can we add some failure UT case also. What will happen if bgpcfgd gets exception and exited ? I assume bgp/swss/syncd docker restart and everything should get reprommed but lets add the test case to confirm.
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.
Do you mean when bgpcfgd restarts, the SRv6 manager should retrieve all existing MY_SID config from CONFIG_DB and program them to 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.
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.