< draft-ietf-rtgwg-policy-model-08.txt   draft-ietf-rtgwg-policy-model-09.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: July 5, 2020 Apstra Expires: September 5, 2020 Apstra
A. Lindem A. Lindem
Cisco Cisco
X. Liu X. Liu
Volta Networks Volta Networks
January 2, 2020 March 4, 2020
A YANG Data Model for Routing Policy Management A YANG Data Model for Routing Policy Management
draft-ietf-rtgwg-policy-model-08 draft-ietf-rtgwg-policy-model-09
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 and based on actual routing policies in a vendor-neutral way and based on actual
operational practice. The model provides a generic policy framework operational practice. The model provides a generic policy framework
which can be augmented with protocol-specific policy configuration. which can be augmented with protocol-specific policy configuration.
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 July 5, 2020. This Internet-Draft will expire on September 5, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the Copyright (c) 2020 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 26 skipping to change at page 2, line 26
3. Model overview . . . . . . . . . . . . . . . . . . . . . . . 5 3. Model overview . . . . . . . . . . . . . . . . . . . . . . . 5
4. Route policy expression . . . . . . . . . . . . . . . . . . . 5 4. Route policy expression . . . . . . . . . . . . . . . . . . . 5
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. Routing protocol-specific policies . . . . . . . . . . . . . 11 7. Routing protocol-specific policies . . . . . . . . . . . . . 11
8. Security Considerations . . . . . . . . . . . . . . . . . . . 13 8. Security Considerations . . . . . . . . . . . . . . . . . . . 13
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14
10. YANG modules . . . . . . . . . . . . . . . . . . . . . . . . 14 10. YANG modules . . . . . . . . . . . . . . . . . . . . . . . . 14
10.1. Routing policy model . . . . . . . . . . . . . . . . . . 14 10.1. Routing policy model . . . . . . . . . . . . . . . . . . 14
11. Policy examples . . . . . . . . . . . . . . . . . . . . . . . 31 11. Policy examples . . . . . . . . . . . . . . . . . . . . . . . 35
12. References . . . . . . . . . . . . . . . . . . . . . . . . . 31 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 35
12.1. Normative references . . . . . . . . . . . . . . . . . . 31 12.1. Normative references . . . . . . . . . . . . . . . . . . 35
12.2. Informative references . . . . . . . . . . . . . . . . . 32 12.2. Informative references . . . . . . . . . . . . . . . . . 36
Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 32 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 36
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 33 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 37
1. Introduction 1. Introduction
This document describes a YANG [RFC6020] [RFC7950] data model for This document describes a YANG [RFC6020] [RFC7950] data model for
routing policy configuration based on operational usage and best routing policy configuration based on operational usage and best
practices in a variety of service provider networks. The model is practices in a variety of service provider networks. The model is
intended to be vendor-neutral, in order to allow operators to manage intended to be vendor-neutral, in order to allow operators to manage
policy configuration in a consistent, intuitive way in heterogeneous policy configuration in a consistent, intuitive way in heterogeneous
environments with routers supplied by multiple vendors. environments with routers supplied by multiple vendors.
skipping to change at page 6, line 14 skipping to change at page 6, line 14
Conditions may include multiple match or comparison operations, and Conditions may include multiple match or comparison operations, and
similarly, actions may effect multiple changes to route attributes, similarly, actions may effect multiple changes to route attributes,
or indicate a final disposition of accepting or rejecting the route. or indicate a final disposition of accepting or rejecting the route.
This structure is shown below. This structure is shown below.
+--rw routing-policy +--rw routing-policy
+--rw policy-definitions +--rw policy-definitions
+--rw policy-definition* [name] +--rw policy-definition* [name]
+--rw name string +--rw name string
+--rw statements +--rw policy-statements
+--rw statement* [name] +--rw statement* [name]
+--rw name string +--rw name string
+--rw conditions +--rw conditions
| ... | ...
+--rw actions +--rw actions
... ...
4.1. Defined sets for policy matching 4.1. Defined sets for policy matching
The models provides a set of generic sets that can be used for The models provides a set of generic sets that can be used for
skipping to change at page 8, line 19 skipping to change at page 8, line 19
While most policy conditions will be added by individual routing While most policy conditions will be added by individual routing
protocol models via augmentation, this routing policy model includes protocol models via augmentation, this routing policy model includes
several generic match conditions and also the ability to test which several generic match conditions and also the ability to test which
protocol or mechanism installed a route (e.g., BGP, IGP, static, protocol or mechanism installed a route (e.g., BGP, IGP, static,
etc.). The conditions included in the model are shown below. etc.). The conditions included in the model are shown below.
+--rw routing-policy +--rw routing-policy
+--rw policy-definitions +--rw policy-definitions
+--rw policy-definition* [name] +--rw policy-definition* [name]
+--rw name string +--rw name string
+--rw statements +--rw policy-statements
+--rw statement* [name] +--rw statement* [name]
+--rw conditions +--rw conditions
| +--rw call-policy? | +--rw call-policy?
| +--rw install-protocol-eq? | +--rw install-protocol-eq?
| +--rw match-interface | +--rw match-interface
| | +--rw interface? | | +--rw interface?
| | +--rw subinterface? | | +--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-proto-route-type* identityref
4.3. Policy actions 4.3. Policy actions
When policy conditions are satisfied, policy actions are used to set When policy conditions are satisfied, policy actions are used to set
various attributes of the route being processed, or to indicate the various attributes of the route being processed, or to indicate the
final disposition of the route, i.e., accept or reject. final disposition of the route, i.e., accept or reject.
Similar to policy conditions, the routing policy model includes Similar to policy conditions, the routing policy model includes
generic actions in addition to the basic route disposition actions. generic actions in addition to the basic route disposition actions.
These are shown below. These are shown below.
+--rw routing-policy +--rw routing-policy
+--rw policy-definitions +--rw policy-definitions
+--rw policy-definition* [name] +--rw policy-definition* [name]
+--rw statements +--rw policy-statements
+--rw statement* [name] +--rw statement* [name]
+--rw actions +--rw actions
+--rw policy-result? policy-result-type +--rw policy-result? policy-result-type
+--rw set-metric? uint32 +--rw set-metric
+--rw set-preference? uint16 | +--rw metric-modificatiion?
| | metric-modification-type
| +--rw metric? uint32
+--rw set-metric-type
| +--rw metric-type? identityref
+--rw set-import-level
| +--rw import-level? identityref
+--rw set-preference? uint16
+--rw set-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
affects the evaluation of the calling policy. If the called policy affects the evaluation of the calling policy. If the called policy
results in an accept-route, then the subroutine returns an effective results in an accept-route, then the subroutine returns an effective
skipping to change at page 12, line 6 skipping to change at page 12, line 9
| | +--rw bgp-pol:ext-community-set* [ext-community-set-name] | | +--rw bgp-pol:ext-community-set* [ext-community-set-name]
| | +--rw bgp-pol:ext-community-set-name string | | +--rw bgp-pol:ext-community-set-name string
| | +--rw bgp-pol:ext-community-member* union | | +--rw bgp-pol:ext-community-member* union
| +--rw bgp-pol:as-path-sets | +--rw bgp-pol:as-path-sets
| +--rw bgp-pol:as-path-set* [as-path-set-name] | +--rw bgp-pol:as-path-set* [as-path-set-name]
| +--rw bgp-pol:as-path-set-name string | +--rw bgp-pol:as-path-set-name string
| +--rw bgp-pol:as-path-set-member* string | +--rw bgp-pol:as-path-set-member* string
+--rw policy-definitions +--rw policy-definitions
+--rw policy-definition* [name] +--rw policy-definition* [name]
+--rw name string +--rw name string
+--rw statements +--rw policy-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 subinterface?
| +--rw match-prefix-set | +--rw match-prefix-set
| | +--rw prefix-set? | | +--rw prefix-set?
| | +--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-proto-route-type* identityref
| +--rw bgp-pol:bgp-conditions | +--rw bgp-pol:bgp-conditions
| +--rw bgp-pol:med-eq? uint32 | +--rw bgp-pol:med-eq? uint32
| +--rw bgp-pol:origin-eq? | +--rw bgp-pol:origin-eq?
| bgp-types:bgp-origin-attr-type | bgp-types:bgp-origin-attr-type
| +--rw bgp-pol:next-hop-in* | +--rw bgp-pol:next-hop-in*
| inet:ip-address-no-zone | inet:ip-address-no-zone
| +--rw bgp-pol:afi-safi-in* identityref | +--rw bgp-pol:afi-safi-in* identityref
| +--rw bgp-pol:local-pref-eq? uint32 | +--rw bgp-pol:local-pref-eq? uint32
| +--rw bgp-pol:route-type? enumeration | +--rw bgp-pol:route-type? enumeration
| +--rw bgp-pol:community-count | +--rw bgp-pol:community-count
skipping to change at page 12, line 47 skipping to change at page 12, line 51
| match-set-options-type | match-set-options-type
| +--rw bgp-pol:match-ext-community-set | +--rw bgp-pol:match-ext-community-set
| | +--rw bgp-pol:ext-community-set? | | +--rw bgp-pol:ext-community-set?
| | +--rw bgp-pol:match-set-options? | | +--rw bgp-pol:match-set-options?
| | match-set-options-type | | match-set-options-type
| +--rw bgp-pol:match-as-path-set | +--rw bgp-pol:match-as-path-set
| +--rw bgp-pol:as-path-set? | +--rw bgp-pol:as-path-set?
| +--rw bgp-pol:match-set-options? | +--rw bgp-pol:match-set-options?
| match-set-options-type | match-set-options-type
+--rw actions +--rw actions
+--rw policy-result? policy-result-type +--rw policy-result? policy-result-type
+--rw set-metric? uint32 +--rw set-metric
| +--rw metric-modificatiion?
| | metric-modification-type
| +--rw metric? uint32
+--rw set-metric-type
| +--rw metric-type? identityref
+--rw set-import-level
| +--rw import-level? identityref
+--rw set-preference? uint16 +--rw set-preference? uint16
+--rw set-tag? tag-type
+--rw set-application-tag? tag-type
+--rw bgp-pol:bgp-actions +--rw bgp-pol:bgp-actions
+--rw bgp-pol:set-route-origin? +--rw bgp-pol:set-route-origin?
bgp-types:bgp-origin-attr-type bgp-types:bgp-origin-attr-type
+--rw bgp-pol:set-local-pref? uint32 +--rw bgp-pol:set-local-pref? uint32
+--rw bgp-pol:set-next-hop? bgp-next-hop-type +--rw bgp-pol:set-next-hop? bgp-next-hop-type
+--rw bgp-pol:set-med? bgp-set-med-type +--rw bgp-pol:set-med? bgp-set-med-type
+--rw bgp-pol:set-as-path-prepend +--rw bgp-pol:set-as-path-prepend
| +--rw bgp-pol:repeat-n? uint8 | +--rw bgp-pol:repeat-n? uint8
+--rw bgp-pol:set-community +--rw bgp-pol:set-community
| +--rw bgp-pol:method? enumeration | +--rw bgp-pol:method? enumeration
skipping to change at page 14, line 12 skipping to change at page 14, line 25
YANG modules will be registered in the "YANG Module Names" registry YANG modules will be registered in the "YANG Module Names" registry
[RFC6020]. [RFC6020].
10. YANG modules 10. YANG modules
The routing policy model is described by the YANG modules in the The routing policy model is described by the YANG modules in the
sections below. sections below.
10.1. Routing policy model 10.1. Routing policy model
<CODE BEGINS> file "ietf-routing-policy@2020-01-02.yang" <CODE BEGINS> file "ietf-routing-policy@2020-03-04.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";
} }
skipping to change at page 15, line 9 skipping to change at page 15, line 20
"WG Web: <http://tools.ietf.org/wg/rtgwg/> "WG Web: <http://tools.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>
Acee Lindem Acee Lindem
<mailto:acee@cisco.com> <mailto:acee@cisco.com>
Xufeng Liu Xufeng Liu
<mailto:xufeng_liu@jabil.com> <mailto:xufeng.liu.ietf@gmail.com>";
Anees Shaikh
<mailto:aashaikh@google.com>";
description description
"This module describes a YANG model for routing policy "This module describes a YANG model for routing policy
configuration. It is a limited subset of all of the policy configuration. It is a limited subset of all of the policy
configuration parameters available in the variety of vendor configuration parameters available in the variety of vendor
implementations, but supports widely used constructs for implementations, but supports widely used constructs for
managing how routes are imported, exported, and modified across managing how routes are imported, exported, and modified across
different routing protocols. This module is intended to be different routing protocols. This module is intended to be
used in conjunction with routing protocol configuration modules used in conjunction with routing protocol configuration modules
(e.g., BGP) defined in other models. (e.g., BGP) defined in other models.
skipping to change at page 16, line 38 skipping to change at page 16, line 49
the referenced policy before returning to the calling policy the referenced policy before returning to the calling policy
statement and resuming evaluation. If the called policy statement and resuming evaluation. If the called policy
results in an accept-route (either explicit or by default), results in an accept-route (either explicit or by default),
then the subroutine returns an effective true value to the then the subroutine returns an effective true value to the
calling policy. Similarly, a reject-route action returns calling policy. Similarly, a reject-route action returns
false. If the subroutine returns true, the calling policy false. If the subroutine returns true, the calling policy
continues to evaluate the remaining conditions (using a continues to evaluate the remaining conditions (using a
modified route if the subroutine performed any changes to the modified route if the subroutine performed any changes to the
route)."; route).";
revision "2020-01-02" { revision "2020-03-04" {
description description
"Initial revision."; "Initial revision.";
reference reference
"RFC XXXX: Routing Policy Configuration Model for Service "RFC XXXX: Routing Policy Configuration Model for Service
Provider Networks"; Provider Networks";
} }
// typedef statements /* Identities */
identity metric-type {
description "Base identity for route metric types.";
}
identity ospf-type-1-metric {
base metric-type;
description
"Identity for the OSPF type 1 external metric types. It
is only applicable to OSPF routes.";
}
identity ospf-type-2-metric {
base metric-type;
description
"Identity for the OSPF type 2 external metric types. It
is only applicable to OSPF routes.";
}
identity isis-internal-metric {
base metric-type;
description
"Identity for the IS-IS internal metric types. It is only
applicable to IS-IS routes.";
}
identity isis-external-metric {
base metric-type;
description
"Identity for the IS-IS external metric types. It is only
applicable to IS-IS routes.";
}
identity import-level {
description "Base identity for route import level.";
}
identity ospf-normal {
base import-level;
description
"Identity for OSPF importation into normal areas
It is only applicable to routes imported
into the OSPF protocol.";
}
identity ospf-nssa-only {
base import-level;
description
"Identity for the OSPF NSSA area importation. It is only
applicable to routes imported into the OSPF protocol.";
}
identity ospf-normal-nssa {
base import-level;
description
"Identity for OSPF importation into both normal and NSSA
areas, It is only applicable to routes imported into
the OSPF protocol.";
}
identity isis-level-1 {
base import-level;
description
"Identity for IS-IS Level 1 area importation. It is only
applicable to routes imported into the IS-IS protocol.";
}
identity isis-level-2 {
base import-level;
description
"Identity for IS-IS Level 2 area importation. It is only
applicable to routes imported into the IS-IS protocol.";
}
identity isis-level-1-2 {
base import-level;
description
"Identity for IS-IS Level 1 and Level 2 ara importation. It
is only applicable to routes imported into the IS-IS
protocol.";
}
identity proto-route-type {
description
"Base identity for route type within a protocol.";
}
identity isis-level-1-type {
base proto-route-type;
description
"Identity for IS-IS Level 1 route type. It is only
applicable to IS-IS routes.";
}
identity isis-level-2-type {
base proto-route-type;
description
"Identity for IS-IS Level 2 route type. It is only
applicable to IS-IS routes.";
}
identity ospf-internal-type {
base proto-route-type;
description
"Identity for OSPF intra-area or inter-area route type.
It is only applicable to OSPF routes.";
}
identity ospf-external-type {
base proto-route-type;
description
"Identity for OSPF external type 1/2 route type.
It is only applicable to OSPF routes.";
}
identity ospf-external-t1 {
base ospf-external-type;
description
"Identity for OSPF external type 1 route type.
It is only applicable to OSPF routes.";
}
identity ospf-external-t2-type {
base ospf-external-type;
description
"Identity for OSPF external type 2 route type.
It is only applicable to OSPF routes.";
}
identity ospf-nssa-type {
base proto-route-type;
description
"Identity for OSPF NSSA type 1/2 route type.
It is only applicable to OSPF routes.";
}
identity ospf-nssa-t1 {
base ospf-nssa-type;
description
"Identity for OSPF NSSA type 1 route type.
It is only applicable to OSPF routes.";
}
identity ospf-nssa-t2 {
base ospf-nssa-type;
description
"Identity for OSPF NSSA type 2 route type.
It is only applicable to OSPF routes.";
}
identity bgp-local {
base proto-route-type;
description
"Identity for BGP local route type.
It is only applicable to BGP routes.";
}
identity bgp-external {
base proto-route-type;
description
"Identity for BGP external route type.
It is only applicable to BGP routes.";
}
/* Type Definitions */
typedef default-policy-type { typedef default-policy-type {
// this typedef retained for name compatibiity with default /* This typedef retained for name compatibiity with default
// import and export policy import and export policy. */
type enumeration { type enumeration {
enum accept-route { enum accept-route {
description description
"Default policy to accept the route"; "Default policy to accept the route";
} }
enum reject-route { enum reject-route {
description description
"Default policy to reject the route"; "Default policy to reject the route";
} }
} }
skipping to change at page 18, line 20 skipping to change at page 22, line 4
enum invert { enum invert {
description "Match is true if given value does not match any description "Match is true if given value does not match any
member of the defined set"; member of the defined set";
} }
} }
default any; default any;
description description
"Options that govern the behavior of a match statement. The "Options that govern the behavior of a match statement. The
default behavior is any, i.e., the given value matches any default behavior is any, i.e., the given value matches any
of the members of the defined set"; of the members of the defined set";
} }
// grouping statements typedef metric-modification-type {
type enumeration {
enum set-metric {
description "Set the metric to the specified value";
}
enum add-metric {
description
"Add the specified value to the existing metric.
If the result would exceed the the maximum metric
(0xffffffff), set the metric to the maximum.";
}
enum subtract-metric {
description
"Subtract the specified value to the existing metric.
If the result would be less than 0, set the metric to 0.";
}
}
description
"Type used to specify how to set the metric given the
specified value";
}
/* Groupings */
grouping prefix-set { grouping prefix-set {
description description
"Configuration data for prefix sets used in policy "Configuration data for prefix sets used in policy
definitions."; definitions.";
leaf name { leaf name {
type string; type string;
description description
"Name of the prefix set -- this is used as a label to "Name of the prefix set -- this is used as a label to
skipping to change at page 19, line 16 skipping to change at page 23, line 21
address families (IPv4, IPv6, or both) are present. The address families (IPv4, IPv6, or both) are present. The
mode provides a hint, but the device must validate that all mode provides a hint, but the device must validate that all
prefixes are of the indicated type, and is expected to prefixes are of the indicated type, and is expected to
reject the configuration if there is a discrepancy. The reject the configuration if there is a discrepancy. The
MIXED mode may not be supported on devices that require MIXED mode may not be supported on devices that require
prefix sets to be of only one address family."; prefix sets to be of only one address family.";
} }
} }
grouping prefix-set-top {
description
"Top-level data definitions for a list of IPv4 or IPv6
prefixes which are matched as part of a policy";
container prefix-sets {
description
"Enclosing container ";
list prefix-set {
key "name";
description
"List of the defined prefix sets";
uses prefix-set;
uses prefix-top;
}
}
}
grouping prefix { grouping prefix {
description description
"Configuration data for a prefix definition"; "Configuration data for a prefix definition";
leaf ip-prefix { leaf ip-prefix {
type inet:ip-prefix; type inet:ip-prefix;
mandatory true; mandatory true;
description description
"The prefix member in CIDR notation -- while the "The prefix member in CIDR notation -- while the
prefix may be either IPv4 or IPv6, most prefix may be either IPv4 or IPv6, most
skipping to change at page 20, line 36 skipping to change at page 24, line 21
masklength-lower=21, masklength-lower=21,
masklength-upper=24 masklength-upper=24
Example: 10.3.192.0/21 (an exact match) would be Example: 10.3.192.0/21 (an exact match) would be
expressed as prefix: 10.3.192.0/21, expressed as prefix: 10.3.192.0/21,
masklength-lower=21, masklength-lower=21,
masklength-upper=21"; masklength-upper=21";
} }
} }
grouping prefix-top {
description
"Top-level grouping for prefixes in a prefix list";
container prefixes {
description
"Enclosing container for the list of prefixes in a policy
prefix list";
list prefix-list {
key "ip-prefix masklength-lower masklength-upper";
description
"List of prefixes in the prefix set";
uses prefix;
}
}
}
grouping neighbor-set { grouping neighbor-set {
description description
"This grouping provides neighbor set definitions"; "This grouping provides neighbor set definitions";
leaf name { leaf name {
type string; type string;
description description
"Name of the neighbor set -- this is used as a label "Name of the neighbor set -- this is used as a label
to reference the set in match conditions"; to reference the set in match conditions";
} }
leaf-list address { leaf-list address {
type inet:ip-address; type inet:ip-address;
description description
"List of IP addresses in the neighbor set"; "List of IP addresses in the neighbor set";
} }
} }
grouping neighbor-set-top {
description
"Top-level data definition for a list of IPv4 or IPv6
neighbors which can be matched in a routing policy";
container neighbor-sets {
description
"Enclosing container for the list of neighbor set
definitions";
list neighbor-set {
key "name";
description
"List of defined neighbor sets for use in policies.";
uses neighbor-set;
}
}
}
grouping tag-set { grouping tag-set {
description description
"This grouping provides tag set definitions."; "This grouping provides tag set definitions.";
leaf name { leaf name {
type string; type string;
description description
"Name of the tag set -- this is used as a label to reference "Name of the tag set -- this is used as a label to reference
the set in match conditions"; the set in match conditions";
} }
leaf-list tag-value { leaf-list tag-value {
type tag-type; type tag-type;
description description
"Value of the tag set member"; "Value of the tag set member";
} }
} }
grouping tag-set-top {
description
"Top-level data definitions for a list of tags which can
be matched in policies";
container tag-sets {
description
"Enclosing container for the list of tag sets.";
list tag-set {
key "name";
description
"List of tag set definitions.";
uses tag-set;
}
}
}
grouping match-set-options-group { grouping match-set-options-group {
description description
"Grouping containing options relating to how a particular set "Grouping containing options relating to how a particular set
should be matched"; should be matched";
leaf match-set-options { leaf match-set-options {
type match-set-options-type; type match-set-options-type;
description description
"Optional parameter that governs the behavior of the "Optional parameter that governs the behavior of the
match operation"; match operation";
skipping to change at page 24, line 4 skipping to change at page 26, line 24
path "/if:interfaces/if:interface/if-ext:encapsulation" path "/if:interfaces/if:interface/if-ext:encapsulation"
+ "/if-l3-vlan:dot1q-vlan" + "/if-l3-vlan:dot1q-vlan"
+ "/if-l3-vlan:outer-tag/if-l3-vlan:vlan-id"; + "/if-l3-vlan:outer-tag/if-l3-vlan:vlan-id";
} }
description description
"Reference to a subinterface -- this requires the base "Reference to a subinterface -- this requires the base
interface to be specified using the interface leaf in interface to be specified using the interface leaf in
this container. If only a reference to a base interface this container. If only a reference to a base interface
is requuired, this leaf should not be set."; is requuired, this leaf should not be set.";
} }
description description
"Container for interface match conditions"; "Container for interface match conditions";
} }
} }
grouping match-proto-route-type-condition {
description
"This grouping provides route-type match condition";
leaf-list match-proto-route-type {
type identityref {
base proto-route-type;
}
description
"Condition to check the protocol specific type
of route. This is normally used during route
importation to select routes or to set protocol
specific attributes based on the route type.";
}
}
grouping prefix-set-condition { grouping prefix-set-condition {
description description
"This grouping provides prefix-set conditions"; "This grouping provides prefix-set conditions";
container match-prefix-set { container match-prefix-set {
leaf prefix-set { leaf prefix-set {
type leafref { type leafref {
path "../../../../../../../defined-sets/" + path "../../../../../../../defined-sets/" +
"prefix-sets/prefix-set/name"; "prefix-sets/prefix-set/name";
} }
skipping to change at page 25, line 15 skipping to change at page 28, line 4
container match-tag-set { container match-tag-set {
leaf tag-set { leaf tag-set {
type leafref { type leafref {
path "../../../../../../../defined-sets/tag-sets" + path "../../../../../../../defined-sets/tag-sets" +
"/tag-set/name"; "/tag-set/name";
require-instance true; require-instance true;
} }
description "References a defined tag set"; description "References a defined tag set";
} }
uses match-set-options-restricted-group; uses match-set-options-restricted-group;
description description
"Match a referenced tag set according to the logic defined "Match a referenced tag set according to the logic defined
in the match-options-set leaf"; in the match-options-set leaf";
} }
} }
grouping generic-conditions { grouping generic-conditions {
description "Condition statement definitions for checking description "Condition statement definitions for checking
membership in a generic defined set"; membership in a generic defined set";
uses match-interface-condition; uses match-interface-condition;
uses prefix-set-condition; uses prefix-set-condition;
uses neighbor-set-condition; uses neighbor-set-condition;
uses tag-set-condition; uses tag-set-condition;
uses match-proto-route-type-condition;
} }
grouping policy-conditions { grouping policy-conditions {
description description
"Data for general policy conditions, i.e., those "Data for general policy conditions, i.e., those
not related to match-sets"; not related to match-sets";
leaf call-policy { leaf call-policy {
type leafref { type leafref {
skipping to change at page 26, line 20 skipping to change at page 29, line 10
leaf source-protocol { leaf source-protocol {
type identityref { type identityref {
base rt:control-plane-protocol; base rt:control-plane-protocol;
} }
description description
"Condition to check the protocol / method used to install "Condition to check the protocol / method used to install
the route into the local routing table"; the route into the local routing table";
} }
} }
grouping policy-conditions-top {
description
"Top-level grouping for policy conditions";
container conditions {
description
"Condition statements for the current policy statement";
uses policy-conditions;
uses generic-conditions;
}
}
grouping policy-statements {
description
"Data for policy statements";
leaf name {
type string;
description
"Name of the policy statement";
}
}
grouping policy-actions { grouping policy-actions {
description description
"Top-level grouping for policy actions"; "Top-level grouping for policy actions";
container actions { container actions {
description description
"Top-level container for policy action statements"; "Top-level container for policy action statements";
leaf policy-result { leaf policy-result {
type policy-result-type; type policy-result-type;
description description
"Select the final disposition for the route, either "Select the final disposition for the route, either
accept or reject."; accept or reject.";
} }
leaf set-metric { container set-metric {
type uint32; leaf metric-modificatiion {
type metric-modification-type;
description
"Indicates how to modify the metric.";
}
leaf metric {
type uint32;
description
"Metric value to set, add, or subtract.";
}
description description
"Set a new metric for the route."; "Set the metric for the route.";
}
container set-metric-type {
leaf metric-type {
type identityref {
base metric-type;
}
description
"Route metric type.";
}
description
"Set the metric type for the route.";
}
container set-import-level {
leaf import-level {
type identityref {
base import-level;
}
description
"Route importation level.";
}
description
"Set the import level for importation of routes.";
} }
leaf set-preference { leaf set-preference {
type uint16; type uint16;
description description
"Set a new preference for the route."; "Set the preference for the route.";
}
leaf set-tag {
type tag-type;
description
"Set the tag for the route.";
}
leaf set-application-tag {
type tag-type;
description
"Set the application tag for the route.";
} }
} }
} }
grouping policy-statements-top { grouping policy-statements {
description description
"Top-level grouping for the policy statements list"; "Grouping for the policy statements list";
container statements { container policy-statements {
description description
"Enclosing container for policy statements"; "Enclosing container for policy statements";
list statement { list statement {
key "name"; key "name";
ordered-by user; ordered-by user;
description description
"Policy statements group conditions and actions "Policy statements group conditions and actions
within a policy definition. They are evaluated in within a policy definition. They are evaluated in
the order specified (see the description of policy the order specified (see the description of policy
evaluation at the top of this module."; evaluation at the top of this module.";
uses policy-statements; leaf name {
type string;
description
"Name of the policy statement";
}
container conditions {
description
"Condition statements for the current policy statement";
uses policy-conditions;
uses generic-conditions;
}
uses policy-conditions-top;
uses policy-actions; uses policy-actions;
} }
} }
} }
grouping policy-definitions { grouping policy-definitions {
description description
"This grouping provides policy definitions"; "This grouping provides policy definitions";
leaf name { leaf name {
skipping to change at page 29, line 29 skipping to change at page 32, line 44
in the export policy chain is satisfied."; in the export policy chain is satisfied.";
} }
} }
grouping apply-policy { grouping apply-policy {
description description
"Configuration data for routing policies"; "Configuration data for routing policies";
uses apply-policy-import; uses apply-policy-import;
uses apply-policy-export; uses apply-policy-export;
container apply-policy-state {
description
"Operational state associated with routing policy";
//TODO: identify additional state data beyond the intended
//policy configuration.
}
} }
grouping apply-policy-group { grouping apply-policy-group {
description description
"Top level container for routing policy applications. This "Top level container for routing policy applications. This
grouping is intended to be used in routing models where grouping is intended to be used in routing models where
needed."; needed.";
container apply-policy { container apply-policy {
description description
skipping to change at page 30, line 20 skipping to change at page 33, line 27
container routing-policy { container routing-policy {
description description
"Top-level container for all routing policy"; "Top-level container for all routing policy";
container defined-sets { container defined-sets {
description description
"Predefined sets of attributes used in policy match "Predefined sets of attributes used in policy match
statements"; statements";
uses prefix-set-top; container prefix-sets {
uses neighbor-set-top; description
uses tag-set-top; "Data definitions for a list of IPv4 or IPv6
prefixes which are matched as part of a policy";
list prefix-set {
key "name";
description
"List of the defined prefix sets";
uses prefix-set;
container prefixes {
description
"Container for the list of prefixes in a policy
prefix list";
list prefix-list {
key "ip-prefix masklength-lower masklength-upper";
description
"List of prefixes in the prefix set";
uses prefix;
}
}
}
}
container neighbor-sets {
description
"Data definition for a list of IPv4 or IPv6
neighbors which can be matched in a routing policy";
list neighbor-set {
key "name";
description
"List of defined neighbor sets for use in policies.";
uses neighbor-set;
}
}
container tag-sets {
description
"Data definitions for a list of tags which can
be matched in policies";
list tag-set {
key "name";
description
"List of tag set definitions.";
uses tag-set;
}
}
} }
container policy-definitions { container policy-definitions {
description description
"Enclosing container for the list of top-level policy "Enclosing container for the list of top-level policy
definitions"; definitions";
list policy-definition { list policy-definition {
key "name"; key "name";
description description
"List of top-level policy definitions, keyed by unique "List of top-level policy definitions, keyed by unique
name. These policy definitions are expected to be name. These policy definitions are expected to be
referenced (by name) in policy chains specified in import referenced (by name) in policy chains specified in import
or export configuration statements."; or export configuration statements.";
uses policy-definitions; uses policy-definitions;
uses policy-statements-top; uses policy-statements;
} }
} }
} }
} }
<CODE ENDS> <CODE ENDS>
11. Policy examples 11. Policy examples
Below we show an example of XML-encoded configuration data using the Below we show an example of XML-encoded configuration data using the
routing policy and BGP models to illustrate both how policies are routing policy and BGP models to illustrate both how policies are
defined, and also how they can be applied. Note that the XML has defined, and also how they can be applied. Note that the XML has
been simplified for readability. been simplified for readability.
skipping to change at page 32, line 36 skipping to change at page 36, line 45
[RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for [RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for
Routing Management (NMDA Version)", RFC 8349, Routing Management (NMDA Version)", RFC 8349,
DOI 10.17487/RFC8349, March 2018, DOI 10.17487/RFC8349, March 2018,
<https://www.rfc-editor.org/info/rfc8349>. <https://www.rfc-editor.org/info/rfc8349>.
12.2. Informative references 12.2. Informative references
[I-D.ietf-idr-bgp-model] [I-D.ietf-idr-bgp-model]
Jethanandani, M., Patel, K., Hares, S., and J. Haas, "BGP Jethanandani, M., Patel, K., Hares, S., and J. Haas, "BGP
YANG Model for Service Provider Networks", draft-ietf-idr- YANG Model for Service Provider Networks", draft-ietf-idr-
bgp-model-07 (work in progress), October 2019. bgp-model-08 (work in progress), February 2020.
Appendix A. Acknowledgements Appendix A. Acknowledgements
The routing policy module defined in this draft is based on the The routing policy module defined in this draft is based on the
OpenConfig route policy model. The authors would like to thank to OpenConfig route policy model. The authors would like to thank to
OpenConfig for their contributions, especially Anees Shaikh, Rob OpenConfig for their contributions, especially Anees Shaikh, Rob
Shakir, Kevin D'Souza, and Chris Chase. Shakir, Kevin D'Souza, and Chris Chase.
The authors are grateful for valuable contributions to this document The authors are grateful for valuable contributions to this document
and the associated models from: Ebben Aires, Luyuan Fang, Josh and the associated models from: Ebben Aires, Luyuan Fang, Josh
 End of changes. 43 change blocks. 
163 lines changed or deleted 374 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/