< draft-ietf-rtgwg-policy-model-28.txt   draft-ietf-rtgwg-policy-model-29.txt >
RTGWG Y. Qu RTGWG Y. Qu
Internet-Draft Futurewei Internet-Draft Futurewei
Intended status: Standards Track J. Tantsura Intended status: Standards Track J. Tantsura
Expires: December 9, 2021 Juniper Networks Expires: December 20, 2021 Juniper Networks
A. Lindem A. Lindem
Cisco Cisco
X. Liu X. Liu
Volta Networks Volta Networks
June 7, 2021 June 18, 2021
A YANG Data Model for Routing Policy A YANG Data Model for Routing Policy
draft-ietf-rtgwg-policy-model-28 draft-ietf-rtgwg-policy-model-29
Abstract Abstract
This document defines a YANG data model for configuring and managing This document defines a YANG data model for configuring and managing
routing policies in a vendor-neutral way. The model provides a routing policies in a vendor-neutral way. The model provides a
generic routing policy framework which can be extended for specific generic routing policy framework which can be extended for specific
routing protocols using the YANG 'augment' mechanism. routing protocols using the YANG 'augment' mechanism.
Status of This Memo Status of This Memo
skipping to change at page 1, line 38 skipping to change at page 1, line 38
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on December 9, 2021. This Internet-Draft will expire on December 20, 2021.
Copyright Notice Copyright Notice
Copyright (c) 2021 IETF Trust and the persons identified as the Copyright (c) 2021 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 27 skipping to change at page 2, line 27
4. Route policy expression . . . . . . . . . . . . . . . . . . . 6 4. Route policy expression . . . . . . . . . . . . . . . . . . . 6
4.1. Defined sets for policy matching . . . . . . . . . . . . 6 4.1. Defined sets for policy matching . . . . . . . . . . . . 6
4.2. Policy conditions . . . . . . . . . . . . . . . . . . . . 7 4.2. Policy conditions . . . . . . . . . . . . . . . . . . . . 7
4.3. Policy actions . . . . . . . . . . . . . . . . . . . . . 8 4.3. Policy actions . . . . . . . . . . . . . . . . . . . . . 8
4.4. Policy subroutines . . . . . . . . . . . . . . . . . . . 9 4.4. Policy subroutines . . . . . . . . . . . . . . . . . . . 9
5. Policy evaluation . . . . . . . . . . . . . . . . . . . . . . 10 5. Policy evaluation . . . . . . . . . . . . . . . . . . . . . . 10
6. Applying routing policy . . . . . . . . . . . . . . . . . . . 10 6. Applying routing policy . . . . . . . . . . . . . . . . . . . 10
7. YANG Module and Tree . . . . . . . . . . . . . . . . . . . . 11 7. YANG Module and Tree . . . . . . . . . . . . . . . . . . . . 11
7.1. Routing Policy Model Tree . . . . . . . . . . . . . . . . 11 7.1. Routing Policy Model Tree . . . . . . . . . . . . . . . . 11
7.2. Routing policy model . . . . . . . . . . . . . . . . . . 12 7.2. Routing policy model . . . . . . . . . . . . . . . . . . 12
8. Security Considerations . . . . . . . . . . . . . . . . . . . 33 8. Security Considerations . . . . . . . . . . . . . . . . . . . 32
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 35 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 34
10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 35 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 35
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 36 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 35
11.1. Normative references . . . . . . . . . . . . . . . . . . 36 11.1. Normative references . . . . . . . . . . . . . . . . . . 35
11.2. Informative references . . . . . . . . . . . . . . . . . 38 11.2. Informative references . . . . . . . . . . . . . . . . . 37
Appendix A. Routing protocol-specific policies . . . . . . . . . 38 Appendix A. Routing protocol-specific policies . . . . . . . . . 37
Appendix B. Policy examples . . . . . . . . . . . . . . . . . . 41 Appendix B. Policy examples . . . . . . . . . . . . . . . . . . 40
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 43 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 42
1. Introduction 1. Introduction
This document describes a YANG [RFC7950] data model for routing This document describes a YANG [RFC7950] data model for routing
policy configuration based on operational usage and best practices in policy configuration based on operational usage and best practices in
a variety of service provider networks. The model is intended to be a variety of service provider networks. The model is intended to be
vendor-neutral, to allow operators to manage policy configuration in vendor-neutral, to allow operators to manage policy configuration in
a consistent way in environments with routers supplied by multiple a consistent way in environments with routers supplied by multiple
vendors. vendors.
skipping to change at page 8, line 26 skipping to change at page 8, line 26
+--rw policy-definitions +--rw policy-definitions
+--rw policy-definition* [name] +--rw policy-definition* [name]
+--rw name string +--rw name string
+--rw statements +--rw statements
+--rw statement* [name] +--rw statement* [name]
+--rw conditions +--rw conditions
| +--rw call-policy? | +--rw call-policy?
| +--rw source-protocol? | +--rw source-protocol?
| +--rw match-interface | +--rw match-interface
| | +--rw interface? | | +--rw interface?
| | +--rw subinterface?
| +--rw match-prefix-set | +--rw match-prefix-set
| | +--rw prefix-set? | | +--rw prefix-set?
| | +--rw match-set-options? | | +--rw match-set-options?
| +--rw match-neighbor-set | +--rw match-neighbor-set
| | +--rw neighbor-set? | | +--rw neighbor-set?
| +--rw match-tag-set | +--rw match-tag-set
| | +--rw tag-set? | | +--rw tag-set?
| | +--rw match-set-options? | | +--rw match-set-options?
| +--rw match-route-type* identityref | +--rw match-route-type* identityref
skipping to change at page 9, line 20 skipping to change at page 9, line 20
+--rw actions +--rw actions
+--rw policy-result? policy-result-type +--rw policy-result? policy-result-type
+--rw set-metric +--rw set-metric
| +--rw metric-modification? | +--rw metric-modification?
| | metric-modification-type | | metric-modification-type
| +--rw metric? uint32 | +--rw metric? uint32
+--rw set-metric-type +--rw set-metric-type
| +--rw metric-type? identityref | +--rw metric-type? identityref
+--rw set-route-level +--rw set-route-level
| +--rw route-level? identityref | +--rw route-level? identityref
+--rw set-preference? uint16 +--rw set-route-preference? uint16
+--rw set-tag? tag-type +--rw set-tag? tag-type
+--rw set-application-tag? tag-type +--rw set-application-tag? tag-type
4.4. Policy subroutines 4.4. Policy subroutines
Policy 'subroutines' (or nested policies) are supported by allowing Policy 'subroutines' (or nested policies) are supported by allowing
policy statement conditions to reference other policy definitions policy statement conditions to reference other policy definitions
using the call-policy configuration. Called policies apply their using the call-policy configuration. Called policies apply their
conditions and actions before returning to the calling policy conditions and actions before returning to the calling policy
statement and resuming evaluation. The outcome of the called policy statement and resuming evaluation. The outcome of the called policy
skipping to change at page 10, line 20 skipping to change at page 10, line 20
5. Policy evaluation 5. Policy evaluation
Evaluation of each policy definition proceeds by evaluating its Evaluation of each policy definition proceeds by evaluating its
individual policy statements in order that they are defined. When individual policy statements in order that they are defined. When
all the condition statements in a policy statement are satisfied, the all the condition statements in a policy statement are satisfied, the
corresponding action statements are executed. If the actions include corresponding action statements are executed. If the actions include
either accept-route or reject-route actions, evaluation of the either accept-route or reject-route actions, evaluation of the
current policy definition stops, and no further policy statement is current policy definition stops, and no further policy statement is
evaluated. If there are multiple policies in the policy chain, evaluated. If there are multiple policies in the policy chain,
subsequent policies are not evaluated. Policy chains are sequences subsequent policies are not evaluated. Policy chains are sequences
of policy definitions (as described in . (Section 4)). of policy definitions (as described in Section 4).
If the conditions are not satisfied, then evaluation proceeds to the If the conditions are not satisfied, then evaluation proceeds to the
next policy statement. If none of the policy statement conditions next policy statement. If none of the policy statement conditions
are satisfied, then evaluation of the current policy definition are satisfied, then evaluation of the current policy definition
stops, and the next policy definition in the chain is evaluated. stops, and the next policy definition in the chain is evaluated.
When the end of the policy chain is reached, the default route When the end of the policy chain is reached, the default route
disposition action is performed (i.e., reject-route unless an disposition action is performed (i.e., reject-route unless an
alternate default action is specified for the chain). alternate default action is specified for the chain).
Note that the route's pre-policy attributes are always used for Note that the route's pre-policy attributes are always used for
skipping to change at page 12, line 6 skipping to change at page 12, line 6
+--rw statement* [name] +--rw statement* [name]
+--rw name string +--rw name string
+--rw conditions +--rw conditions
| +--rw call-policy? -> ../../../../../.. | +--rw call-policy? -> ../../../../../..
| /policy-definitions | /policy-definitions
| /policy-definition/name | /policy-definition/name
| +--rw source-protocol? identityref | +--rw source-protocol? identityref
| +--rw match-interface | +--rw match-interface
| | +--rw interface? -> /if:interfaces/interface | | +--rw interface? -> /if:interfaces/interface
| | /name | | /name
| | +--rw subinterface? -> /if:interfaces/interface
| | /if-ext:encapsulation
| | /if-flex:flexible/match
| | /dot1q-vlan-tagged
| | /outer-tag/vlan-id
| +--rw match-prefix-set | +--rw match-prefix-set
| | +--rw prefix-set? -> ../../../../../../.. | | +--rw prefix-set? -> ../../../../../../..
| | /defined-sets/prefix-sets | | /defined-sets/prefix-sets
| | /prefix-set/name | | /prefix-set/name
| | +--rw match-set-options? match-set-options-type | | +--rw match-set-options? match-set-options-type
| +--rw match-neighbor-set | +--rw match-neighbor-set
| | +--rw neighbor-set? -> ../../../../../../.. | | +--rw neighbor-set? -> ../../../../../../..
| | /defined-sets/neighbor-sets | | /defined-sets/neighbor-sets
| | /neighbor-set/name | | /neighbor-set/name
| +--rw match-tag-set | +--rw match-tag-set
skipping to change at page 12, line 35 skipping to change at page 12, line 30
| +--rw match-route-type* identityref | +--rw match-route-type* identityref
+--rw actions +--rw actions
+--rw policy-result? policy-result-type +--rw policy-result? policy-result-type
+--rw set-metric +--rw set-metric
| +--rw metric-modification? metric-modification-type | +--rw metric-modification? metric-modification-type
| +--rw metric? uint32 | +--rw metric? uint32
+--rw set-metric-type +--rw set-metric-type
| +--rw metric-type? identityref | +--rw metric-type? identityref
+--rw set-route-level +--rw set-route-level
| +--rw route-level? identityref | +--rw route-level? identityref
+--rw set-preference? uint16 +--rw set-route-preference? uint16
+--rw set-tag? tag-type +--rw set-tag? tag-type
+--rw set-application-tag? tag-type +--rw set-application-tag? tag-type
7.2. Routing policy model 7.2. Routing policy model
The following RFCs are not referenced in the document text but are The following RFCs are not referenced in the document text but are
referenced in the ietf-routing-policy.yang module: [RFC2328], referenced in the ietf-routing-policy.yang module: [RFC2328],
[RFC3101], [RFC5130], [RFC5302], [RFC6991], and [RFC8343]. [RFC3101], [RFC5130], [RFC5302], [RFC6991], and [RFC8343].
<CODE BEGINS> file "ietf-routing-policy@2021-06-07.yang" <CODE BEGINS> file "ietf-routing-policy@2021-06-18.yang"
module ietf-routing-policy { module ietf-routing-policy {
yang-version "1.1"; yang-version "1.1";
namespace "urn:ietf:params:xml:ns:yang:ietf-routing-policy"; namespace "urn:ietf:params:xml:ns:yang:ietf-routing-policy";
prefix rt-pol; prefix rt-pol;
import ietf-inet-types { import ietf-inet-types {
prefix "inet"; prefix "inet";
reference "RFC 6991: Common YANG Data Types"; reference "RFC 6991: Common YANG Data Types";
} }
import ietf-yang-types { import ietf-yang-types {
prefix "yang"; prefix "yang";
reference "RFC 6991: Common YANG Data Types"; reference "RFC 6991: Common YANG Data Types";
} }
import ietf-interfaces { import ietf-interfaces {
prefix "if"; prefix "if";
reference "RFC 8343: A YANG Data Model for Interface reference "RFC 8343: A YANG Data Model for Interface
Management (NMDA Version)"; Management (NMDA Version)";
} }
import ietf-routing { import ietf-routing {
prefix "rt"; prefix "rt";
reference "RFC 8349: A YANG Data Model for Routing reference "RFC 8349: A YANG Data Model for Routing
Management (NMDA Version)"; Management (NMDA Version)";
} }
import ietf-if-extensions {
prefix "if-ext";
reference "RFC YYYY: Common Interface Extension YANG
Data Models. Please replace YYYY with
published RFC number for
draft-ietf-netmod-intf-ext-yang.";
}
import ietf-if-flexible-encapsulation {
prefix "if-flex";
reference "RFC ZZZZ: Sub-interface VLAN YANG Data Models.
Please replace ZZZZ with published RFC number
for draft-ietf-netmod-sub-intf-vlan-model.";
}
organization organization
"IETF RTGWG - Routing Area Working Group"; "IETF RTGWG - Routing Area Working Group";
contact contact
"WG Web: <https://datatracker.ietf.org/wg/rtgwg/> "WG Web: <https://datatracker.ietf.org/wg/rtgwg/>
WG List: <mailto: rtgwg@ietf.org> WG List: <mailto: rtgwg@ietf.org>
Editor: Yingzhen Qu Editor: Yingzhen Qu
<mailto: yingzhen.qu@futurewei.com> <mailto: yingzhen.qu@futurewei.com>
Jeff Tantsura Jeff Tantsura
<mailto: jefftant.ietf@gmail.com> <mailto: jefftant.ietf@gmail.com>
skipping to change at page 14, line 43 skipping to change at page 14, line 23
see the RFC itself for full legal notices. see the RFC itself for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT
RECOMMENDED', 'MAY', and 'OPTIONAL' in this document are to be RECOMMENDED', 'MAY', and 'OPTIONAL' in this document are to be
interpreted as described in BCP 14 (RFC 2119) (RFC 8174) when, interpreted as described in BCP 14 (RFC 2119) (RFC 8174) when,
and only when, they appear in all capitals, as shown here."; and only when, they appear in all capitals, as shown here.";
reference "RFC XXXX: A YANG Data Model for Routing Policy."; reference "RFC XXXX: A YANG Data Model for Routing Policy.";
revision "2021-06-07" { revision "2021-06-18" {
description description
"Initial revision."; "Initial revision.";
reference reference
"RFC XXXX: A YANG Data Model for Routing Policy Management."; "RFC XXXX: A YANG Data Model for Routing Policy Management.";
} }
/* Identities */ /* Identities */
identity metric-type { identity metric-type {
description description
"Base identity for route metric types."; "Base identity for route metric types.";
} }
identity ospf-type-1-metric { identity ospf-type-1-metric {
base metric-type; base metric-type;
description description
"Identity for the OSPF type 1 external metric types. It "Identity for the OSPF type 1 external metric types. It
is only applicable to OSPF routes."; is only applicable to OSPF routes.";
skipping to change at page 23, line 40 skipping to change at page 23, line 20
grouping match-interface-condition { grouping match-interface-condition {
description description
"This grouping provides interface match condition."; "This grouping provides interface match condition.";
container match-interface { container match-interface {
leaf interface { leaf interface {
type leafref { type leafref {
path "/if:interfaces/if:interface/if:name"; path "/if:interfaces/if:interface/if:name";
} }
description description
"Reference to a base interface. If a reference to a "Reference to a base interface.";
subinterface is required, this leaf MUST be specified
to indicate the base interface.";
}
leaf subinterface {
type leafref {
path "/if:interfaces/if:interface/if-ext:encapsulation"
+ "/if-flex:flexible/if-flex:match"
+ "/if-flex:dot1q-vlan-tagged"
+ "/if-flex:outer-tag/if-flex:vlan-id";
}
description
"Reference to a subinterface -- this requires the base
interface to be specified using the interface leaf in
this container. If only a reference to a base interface
is required, this leaf MUST NOT be set.";
} }
description description
"Container for interface match conditions"; "Container for interface match conditions";
} }
} }
grouping match-route-type-condition { grouping match-route-type-condition {
description description
"This grouping provides route-type match condition"; "This grouping provides route-type match condition";
leaf-list match-route-type { leaf-list match-route-type {
skipping to change at page 32, line 32 skipping to change at page 31, line 44
type identityref { type identityref {
base route-level; base route-level;
} }
description description
"Route import level."; "Route import level.";
} }
description description
"Set the level for importation or "Set the level for importation or
exportation of routes."; exportation of routes.";
} }
leaf set-preference { leaf set-route-preference {
type uint16; type uint16;
description description
"Set the preference for the route. It is also "Set the preference for the route. It is also
known as 'administrative distance', allows for known as 'administrative distance', allows for
selecting the preferred route among routes with selecting the preferred route among routes with
the same destination prefix. A smaller value is the same destination prefix. A smaller value is
more preferred."; more preferred.";
} }
leaf set-tag { leaf set-tag {
type tag-type; type tag-type;
description description
"Set the tag for the route."; "Set the tag for the route.";
} }
leaf set-application-tag { leaf set-application-tag {
type tag-type; type tag-type;
description description
"Set the application tag for the route. "Set the application tag for the route.
skipping to change at page 39, line 37 skipping to change at page 39, line 4
+--rw policy-definition* [name] +--rw policy-definition* [name]
+--rw name string +--rw name string
+--rw statements +--rw statements
+--rw statement* [name] +--rw statement* [name]
+--rw name string +--rw name string
+--rw conditions +--rw conditions
| +--rw call-policy? | +--rw call-policy?
| +--rw source-protocol? identityref | +--rw source-protocol? identityref
| +--rw match-interface | +--rw match-interface
| | +--rw interface? | | +--rw interface?
| | +--rw subinterface?
| +--rw match-prefix-set | +--rw match-prefix-set
| | +--rw prefix-set? prefix-set/name | | +--rw prefix-set? prefix-set/name
| | +--rw match-set-options? match-set-options-type | | +--rw match-set-options? match-set-options-type
| +--rw match-neighbor-set | +--rw match-neighbor-set
| | +--rw neighbor-set? | | +--rw neighbor-set?
| +--rw match-tag-set | +--rw match-tag-set
| | +--rw tag-set? | | +--rw tag-set?
| | +--rw match-set-options? match-set-options-type | | +--rw match-set-options? match-set-options-type
| +--rw match-route-type* identityref | +--rw match-route-type* identityref
| +--rw bp:bgp-conditions | +--rw bp:bgp-conditions
skipping to change at page 40, line 26 skipping to change at page 39, line 40
| +--rw bp:match-set-options? | +--rw bp:match-set-options?
+--rw actions +--rw actions
+--rw policy-result? policy-result-type +--rw policy-result? policy-result-type
+--rw set-metric +--rw set-metric
| +--rw metric-modification? | +--rw metric-modification?
| +--rw metric? uint32 | +--rw metric? uint32
+--rw set-metric-type +--rw set-metric-type
| +--rw metric-type? identityref | +--rw metric-type? identityref
+--rw set-route-level +--rw set-route-level
| +--rw route-level? identityref | +--rw route-level? identityref
+--rw set-preference? uint16 +--rw set-route-preference? uint16
+--rw set-tag? tag-type +--rw set-tag? tag-type
+--rw set-application-tag? tag-type +--rw set-application-tag? tag-type
+--rw bp:bgp-actions +--rw bp:bgp-actions
+--rw bp:set-route-origin?bt:bgp-origin-attr-type +--rw bp:set-route-origin?bt:bgp-origin-attr-type
+--rw bp:set-local-pref? uint32 +--rw bp:set-local-pref? uint32
+--rw bp:set-next-hop? bgp-next-hop-type +--rw bp:set-next-hop? bgp-next-hop-type
+--rw bp:set-med? bgp-set-med-type +--rw bp:set-med? bgp-set-med-type
+--rw bp:set-as-path-prepend +--rw bp:set-as-path-prepend
| +--rw bp:repeat-n? uint8 | +--rw bp:repeat-n? uint8
+--rw bp:set-community +--rw bp:set-community
 End of changes. 23 change blocks. 
59 lines changed or deleted 23 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/