SPRING Working Group L. Gong
Internet Draft China Mobile
Intended status: Standards Track C. Lin
Expires: December 20, 2025 New H3C Technologies
R. Chen
ZTE Corporation
Y. Qiu
New H3C Technologies
June 18, 2025
YANG Data Model for SR Policy Group
draft-gong-spring-sr-policy-group-yang-02
Abstract
This document defines YANG data models for Segment Routing (SR)
Policy group that can be used for configuring, instantiating, and
managing SR Policy groups. The model is generic and apply equally to
the MPLS and SRv6 instantiations of SR policy groups.
Status of this Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six
months and may be updated, replaced, or obsoleted by other documents
at any time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
This Internet-Draft will expire on December 20, 2025.
Copyright Notice
Copyright (c) 2025 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with
respect to this document. Code Components extracted from this
document must include Simplified BSD License text as described in
Gong, et al. Expires December 20, 2025 [Page 1]
Internet-Draft YANG Data Model for SR Policy Group June 2025
Section 4.e of the Trust Legal Provisions and are provided without
warranty as described in the Simplified BSD License.
Table of Contents
1. Introduction ................................................ 3
1.1. Terminology ............................................ 3
1.2. Conventions Used in This Document ...................... 3
1.3. Tree Diagrams .......................................... 4
1.4. Prefixes in Data Node Names ............................ 4
2. Model Overview .............................................. 4
3. SR Policy Group YANG Module ................................. 4
3.1. Tree View .............................................. 4
3.2. Yang Module ............................................ 6
4. Security Considerations .................................... 12
5. IANA Considerations ........................................ 12
6. References ................................................. 12
6.1. Normative References .................................. 12
6.2. Informative References ................................ 13
Authors' Addresses ............................................ 14
Gong, et al. Expires December 20, 2025 [Page 2]
Internet-Draft YANG Data Model for SR Policy Group June 2025
1. Introduction
The Network Configuration Protocol (NETCONF) [RFC6241] defines
mechanisms to manage network devices. YANG [RFC6020] is a modular
language that represents data structures in an XML tree format, and
is used as a data modeling language for the NETCONF.
[I-D.cheng-spring-sr-policy-group] describes SR policy Group in MPLS
and IPv6 environments. It illustrates some use cases for parent SR
policy and SR Policy Group to provide best practice cases for
operators.
[I-D.ietf-spring-sr-policy-yang] defines a YANG data model for SR
Policy that can be used for configuring, instantiating, and managing
SR policies.
This document defines YANG data models for SR Policy group that can
be used for configuring, instantiating, and managing SR Policy
groups. The model is generic and apply equally to the MPLS and SRv6
instantiations of SR policy groups.
1.1. Terminology
The terminology for describing YANG data models is found in
[RFC6020] and [RFC7950], including:
o augment
o data model
o data node
o identity
o module
The definitions of the basic terms are identical to those found in
Segment Routing Architecture [RFC8402], Segment Routing Policy
Architecture [RFC9256], and Segment Routing Policy group [I-D.cheng-
spring-sr-policy-group].
1.2. Conventions Used in This Document
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in
BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
Gong, et al. Expires December 20, 2025 [Page 3]
Internet-Draft YANG Data Model for SR Policy Group June 2025
1.3. Tree Diagrams
Tree diagrams used in this document follow the notation defined in
[RFC8340].
1.4. Prefixes in Data Node Names
In this document, names of data nodes, actions, and other data model
objects are often used without a prefix, as long as it is clear from
the context in which YANG module each name is defined. Otherwise,
names are prefixed using the standard prefix associated with the
corresponding YANG module, as shown in Table 1.
+=================+======================+=======================+
| Prefix | YANG module | Reference |
+=================+======================+=======================+
| rt | ietf-routing | [RFC8349] |
+-----------------+----------------------+-----------------------+
Table 1
2. Model Overview
SR Policy group YANG data model are defined in this document.
The ietf-sr-policy-group.yang data model provides the methods for
configuring and managing SR Policy group. It includes:
* Configuration of SR Policy group: Container that defines list of
policy groups with their attributes, such as service
identification methods, mapping relationship between DSCP and
color, mapping relationship between service class and color etc.
* The operational state of SR Policy group, such as the state
related to configuration items.
3. SR Policy Group YANG Module
3.1. Tree View
Following diagram depicts high level yang organization and hierarchy
for an SR policy group specification:
Gong, et al. Expires December 20, 2025 [Page 4]
Internet-Draft YANG Data Model for SR Policy Group June 2025
Segment-routing
Traffic-engineering
+ attributes
| + ......
+ policies
| policy* [color endpoint]
| ......
+ sr-policy-groups
group* [group-color]
+ name
+ description
+ forward-based-dscp
| + best-effort-dscp-list
| + dscp-mismatch-drop-v4
| + dscp-mismatch-drop-v6
| + dscp-color-mapping-entries
| mapping-entry* [policy-color dataplane]
| dscp-list
| ......
+ forward-based-dot1q
| + best-effort-dot1q-list
| + dot1q-mismatch-drop
| + dot1q-color-mapping-entries
| mapping-entry* [policy-color]
| dot1q-list
| ......
+ forward-based-serviceclass
+ best-effort-classlist
+ class-mismatch-drop
+ class-color-mapping-entries
mapping-entry* [policy-color]
class-list
......
SR Policy group YANG data model augments "/rt:routing" specified in
[RFC8349] and specifies the configuration and operational state to
manage the SR Policy groups.
The complete tree of the ietf-sr-policy-group.yang data model is
represented as following. See [RFC8340] for an explanation of the
symbols used.
Gong, et al. Expires December 20, 2025 [Page 5]
Internet-Draft YANG Data Model for SR Policy Group June 2025
module: ietf-sr-policy-group
augment /rt:routing:
+--rw sr-policy-groups
+--rw group* [group-color]
+--rw group-color uint32
+--rw name? string
+--rw description? string
+--rw service-distinguish-method enumeration
+--rw forward-based-dscp
| +--rw best-effort-dscp-list-v4 string
| +--rw best-effort-dscp-list-v6 string
| +--rw dscp-mismatch-drop Boolean
| +--rw dscp-color-mapping-entries
| | +--rw mapping-entry* [policy-color dataplane]
| | | +--rw policy-color uint32
| | | +--rw dataplane dataplane-type
| | | +--rw dscp-list string
| | | +--rw is-as-default? Boolean
+--rw forward-based-dot1q
| +--rw best-effort-dot1q string
| +--rw dot1q-mismatch-drop Boolean
| +--rw dot1q-color-mapping-entries
| | +--rw mapping-entry* [policy-color]
| | | +--rw policy-color uint32
| | | +--rw dot1q-list string
| | | +--rw is-as-default? Boolean
+--rw forward-based-serviceclass
+--rw best-effort-classlist string
+--rw class-mismatch-drop Boolean
+--rw class-color-mapping-entries
+--rw mapping-entry* [policy-color]
+--rw policy-color uint32
+--rw class-list string
+--rw is-as-default? Boolean
3.2. Yang Module
<CODE BEGINS> file "ietf-sr-policy-group@2024-05-22.yang"
module ietf-sr-policy-group {
yang-version "1.1";
namespace "urn:ietf:params:xml:ns:yang:ietf-sr-policy-group";
prefix "sr-policy-group";
import ietf-routing {
prefix rt;
reference
"RFC 8349, A YANG Data Model for Routing Management
(NMDA Version).";
}
Gong, et al. Expires December 20, 2025 [Page 6]
Internet-Draft YANG Data Model for SR Policy Group June 2025
organization
"IETF SPRING Working Group";
contact
"TBD";
description
"This module describes a YANG model for configuring and managing
SR Policy Groups.
This YANG model conforms to the Network Management
Datastore Architecture (NMDA) as described in RFC 8342.
Copyright (c) 2024 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Revised BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX;
see the RFC itself for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
revision 2024-05-22 {
description
"Initial Version";
reference
"draft-ietf-spring-sr-policy-yang-02, YANG Data Model for
Segment Routing Policy";
}
typedef dataplane-type {
description "Dataplane type of segment routing";
type enumeration {
enum mpls {
value 1;
description "Segment-routing MPLS";
}
enum srv6 {
value 2;
description "Segment-routing v6";
Gong, et al. Expires December 20, 2025 [Page 7]
Internet-Draft YANG Data Model for SR Policy Group June 2025
}
}
}
augment "/rt:routing" {
description
"SR Policy Group augmentation to the segment routing traffic
engineering model.";
container sr-policy-groups {
description
"Configuration parameters of SR Policy Group.";
list sr-policy-group {
key "group-color";
description
"Each entry contains parameters for SR Policy Group
identifiedby the 'color' key.";
leaf group-color {
type uint32 {
range "1..4294967295";
}
mandatory true;
description "Color associated with the policy group";
}
leaf name {
type string {
length "1..59";
}
description "SR Policy group name";
}
leaf description {
type string;
description "Description of the policy group";
}
leaf service-distinguish-method {
type enumeration {
enum DSCP-based {
value 1;
description "Distinguish service type based on DSCP
in the message";
}
enum dot1q-based {
value 2;
description "Distinguish service type based on dot1q";
}
enum ServiceClass-based {
value 3;
description "Distinguish service type based on service
class";
}
enum None {
Gong, et al. Expires December 20, 2025 [Page 8]
Internet-Draft YANG Data Model for SR Policy Group June 2025
value 4;
description "Not configure service type recognition
method";
}
}
description "Service traffic steering methods within SR
policy group";
}
container forward-based-dscp {
description "parameters of DSCP based steering traffic
for SR policy group";
leaf best-effort-dscp-list-v4 {
type string;
description "DSCP values for IPv4 packets matching
best-effort. It is a comma-separated list of DSCP
values. Each item can be an individual DSCP value
or a DSCP value range. Use a tilde (~) to separate
the start and end DSCP values of a range.
Example: 1,2,3,5~8.";
}
leaf best-effort-dscp-list-v6 {
type string;
description "DSCP values for IPv6 packets matching
best-effort. It is a comma-separated list of DSCP
values. Each item can be an individual DSCP value
or a DSCP value range. Use a tilde (~) to separate
the start and end DSCP values of a range.
Example: 1,2,3,5~8.";
}
leaf dscp-mismatch-drop {
type boolean;
default "false";
description "When all DSCP values configured for
best effort forwarding and SR policy forwarding do
not match, and no default forwarding path is
specified, discard traffic.";
}
container dscp-color-mapping-entries {
description "DSCP-color mapping table";
list mapping-entry {
key "policy-color dataplane";
description "This table contains color-DSCP mappings
for an SRv6 policy group.";
leaf policy-color {
type uint32 {
range "1..4294967295";
}
mandatory true;
description "Color associated with the policy
group";
Gong, et al. Expires December 20, 2025 [Page 9]
Internet-Draft YANG Data Model for SR Policy Group June 2025
}
leaf dataplane {
type dataplane-type;
mandatory true;
description "The data plane type of the mapping
relationship between DSCP and color";
}
leaf dscp-list {
type string;
description "DSCP values for packets matching.
It is a comma-separated list of DSCP values.
Each item can be an individual DSCP value or
a DSCP value range. Use a tilde (~) to separate
the start and end DSCP values of a range.
Example: 1,2,3,5~8.";
}
leaf is-as-default {
type boolean;
default false;
description "Whether to use the SRv6 policy
with this color as the default policy for
packets";
}
}
}
}
container forward-based-dot1q {
description "parameters of dot1q based steering
traffic for SR policy group";
leaf best-effort-dot1q-list {
type string;
description "Dot1q values for packets matching
best-effort. It is a comma-separated list of
dot1q values. Each item can be an individual
dot1q value or a dot1q value range. Use a
tilde (~) to separate the start and end dot1q
values of a range. Example: 1,2,3,5~8.";
}
leaf dot1q-mismatch-drop {
type boolean;
default "false";
description "When all dot1q values configured
for best effort forwarding and SR policy
forwarding do not match, and no default
forwarding path is specified, discard traffic.";
}
container dot1q-color-mapping-entries {
description "Dot1q-color mapping table";
list mapping-entry {
key "policy-color";
Gong, et al. Expires December 20, 2025 [Page 10]
Internet-Draft YANG Data Model for SR Policy Group June 2025
description "This table contains color-dot1q
mappings for an SRv6 policy group.";
leaf policy-color {
type uint32 {
range "1..4294967295";
}
mandatory true;
description "Color associated with the policy
group";
}
leaf dot1q-list {
type string;
description "Dot1q values for packets
matching. It is a comma-separated list of
dot1q values. Each item can be an individual
dot1q value or a dot1q value range. Use a tilde
(~) to separate the start and end dot1q values
of a range. Example: 1,2,3,5~8.";
}
leaf is-as-default {
type boolean;
default false;
description "Whether to use the SRv6 policy
with this color as the default policy for
packets";
}
}
}
container class-color-mapping-entries {
description "Serviceclass-color mapping table";
list mapping-entry {
key "policy-color";
description "This table contains color-serviceclass
mappings for an SRv6 policy group.";
leaf policy-color {
type uint32 {
range "1..4294967295";
}
mandatory true;
description "Color associated with the policy
group";
}
leaf class-list {
type string;
description "Service class values for packets
matching. It is a comma-separated list of
service class values. Each item can be an
individual service class value or a service
class value range. Use a tilde (~) to separate
the start and end service class values of
Gong, et al. Expires December 20, 2025 [Page 11]
Internet-Draft YANG Data Model for SR Policy Group June 2025
a range. Example: 1,2,3,5~8.";
}
leaf is-as-default {
type boolean;
default false;
description "Whether to use the SRv6 policy
with this color as the default policy for
packets";
}
}
}
}
}
} // sr-policy-group
} // augment
}
<CODE ENDS>
4. Security Considerations
TBD
5. IANA Considerations
TBD
6. References
6.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, DOI
10.17487/RFC2119, March 1997, <https://www.rfc-
editor.org/info/rfc2119>.
[RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", RFC
6991, DOI 10.17487/RFC6991, July 2013, <https://www.rfc-
editor.org/info/rfc6991>.
[RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams",
BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018,
<https://www.rfc-editor.org/info/rfc8340>.
[I-D.cheng-spring-sr-policy-group] Cheng, W., Jiang, W., Lin, C.,
Qiu, Y., Wei, Y., Chen, R., Liang, R., "SR Policy Group",
draft-cheng-spring-sr-policy-group-03 (work in progress),
September 2023.
Gong, et al. Expires December 20, 2025 [Page 12]
Internet-Draft YANG Data Model for SR Policy Group June 2025
[I-D.ietf-spring-sr-policy-yang] Raza, K., Sawaya, R., Shunwan, Z.,
Voyer, D., Durrani, M., Matsushima, S., Beeram, V., "YANG
Data Model for Segment Routing Policy", draft-ietf-spring-
sr-policy-yang-02 (work in progress), September 2022.
6.2. Informative References
XXX
Gong, et al. Expires December 20, 2025 [Page 13]
Internet-Draft YANG Data Model for SR Policy Group June 2025
Authors' Addresses
Liyan Gong
China Mobile
China
Email: gongliyan@chinamobile.com
Changwang Lin
New H3C Technologies
China
Email: linchangwang.04414@h3c.com
Ran Chen
ZTE Corporation
China
Email: chen.ran@zte.com.cn
Yuanxiang Qiu
New H3C Technologies
China
Email: qiuyuanxiang@h3c.com
Gong, et al. Expires December 20, 2025 [Page 14]