blob: 63dbf7843570ddebf1bd7145c0a628c30491791e [file] [log] [blame]
Thomas Vachuska6655bee2017-08-24 16:12:59 -07001module openconfig-policy-forwarding {
2 yang-version "1";
3
4 namespace "http://openconfig.net/yang/policy-forwarding";
5
6 prefix "oc-pf";
7
8 import openconfig-extensions { prefix "oc-ext"; }
9
10 // Include submodules.
11 include openconfig-pf-forwarding-policies;
12 include openconfig-pf-path-groups;
13 include openconfig-pf-interfaces;
14
15 organization
16 "OpenConfig working group";
17
18 contact
19 "OpenConfig working group
20 www.openconfig.net";
21
22 description
23 "This module defines configuration and operational state data
24 relating to policy-based forwarding. Policy-based forwarding is
25 utilised when a system chooses how to forward packets (including
26 applying data-plane operations such as encapsulation or
27 decapsulation) based on policies other than destination L2 or L3
28 header. Typically, systems may implement:
29
30 - IP policy-based routing, where routing may be done based on the
31 source plus destination of an IP packet; information within the
32 L4 header; or some combination of both.
33 - Encapsulation or decapsulation based on certain policy
34 information - for example, matching particular IP destinations
35 and decapsulating GRE headers.
36 - Class-based selection of egress routes - such as class-based
37 selection of an egress MPLS path.
38
39 The policies that are defined in this model are applied to a
40 particular ingress context of a network element (e.g., interface)
41 and are defined to apply following other interface policy such as
42 QoS classification and access control lists.
43
44 This module defines:
45
46 - policy-forwarding
47 |
48 |--- policies
49 | |-- policy
50 | |-- [match criteria] How packets are defined to
51 | | match policy.
52 | |-- [forwarding-action] How packets matching should
53 | be forwarded.
54 |--- interfaces
55 | |-- interfaces
56 | | -- apply-forwarding-policy Forwarding policy to
57 | used on the interface.
58 |--- path-selection-groups
59 |-- path-selection-group A group of forwarding resources
60 that are grouped for purposes
61 of next-hop selection.
62
63 A forwarding-policy specifies the match criteria that it intends
64 to use to determine the packets that it reroutes - this may
65 consist of a number of criteria, such as DSCP. The action of the
66 policy results in a forwarding action being applied to matching
67 packets. For example, decapsulating the packet from a GRE header.
68 In order to enact the policy based on particular interfaces - the
69 forwarding-policy is applied to an interface via referencing it
70 within an 'apply-forwarding-policy' statement associated with an
71 interface.
72
73 In some cases (e.g., Class-Based Tunnel Selection) the forwarding
74 action does not resolve to a single egress action, and rather
75 normal forwarding rules are to be applied but considering a subset
76 of forwarding resources. In these cases, a path-selection-group
77 can be created, referencing the subset of forwarding paths that
78 should be used for the egress selection. In the case that a subset
79 of MPLS LSPs are eligible for, say, DSCP 46 marked packets, a
80 path-selection-group is created, referencing the subset of LSPs.
81 The forwarding action of the corresponding policy is set to
82 PATH_GROUP and references the configured group of LSPs.";
83
84 oc-ext:openconfig-version "0.2.0";
85
86 revision "2017-06-21" {
87 description
88 "Amend policy forwarding model based on ACL changes.";
89 reference "0.2.0";
90 }
91
92 revision "2017-02-28" {
93 description
94 "Initial public release of policy forwarding.";
95 reference "0.1.0";
96 }
97
98 revision "2016-11-08" {
99 description
100 "Initial revision.";
101 reference "0.0.1";
102 }
103
104
105 grouping policy-forwarding-top {
106 description
107 "Top-level grouping for Policy Forwarding";
108
109 container policy-forwarding {
110 description
111 "Configuration and operational state relating to policy-forwarding within
112 a network instance.";
113
114 uses pf-forwarding-policy-structural;
115 uses pf-interfaces-structural;
116 uses pf-path-groups-structural;
117 }
118 }
119}