blob: bcbe8cac7e8022c8f62079355e84138986aa205d [file] [log] [blame]
Thomas Vachuska6655bee2017-08-24 16:12:59 -07001module openconfig-network-instance-types {
2
3 yang-version "1";
4
5 // namespace
6 namespace "http://openconfig.net/yang/network-instance-types";
7
8 prefix "oc-ni-types";
9
10 import openconfig-extensions { prefix "oc-ext"; }
11
12 // meta
13 organization "OpenConfig working group";
14
15 contact
16 "OpenConfig working group
17 www.openconfig.net";
18
19 description
20 "Types associated with a network instance";
21
22 oc-ext:openconfig-version "0.8.0";
23
24 revision "2017-02-28" {
25 description
26 "Add OSPFv2 to network instance";
27 reference "0.8.0";
28 }
29
30 revision "2017-01-26" {
31 description
32 "Add policy forwarding to network instance";
33 reference "0.7.0";
34 }
35
36 revision "2017-01-13" {
37 description
38 "Add AFT to the network instance";
39 reference "0.6.0";
40 }
41
42 revision "2016-12-15" {
43 description
44 "Add segment routing to network instance";
45 reference "0.5.0";
46 }
47
48 revision "2016-11-10" {
49 description
50 "Update model to include IS-IS.";
51 reference "0.4.1";
52 }
53
54 revision "2016-10-12" {
55 description
56 "Update table connections";
57 reference "0.4.0";
58 }
59
60 revision "2016-09-28" {
61 description
62 "Change L2 instance to submodule; add MAC table";
63 reference "0.3.0";
64 }
65
66 revision "2016-08-11" {
67 description
68 "Resolve repeated container names in routing protocols";
69 reference "0.2.3";
70 }
71
72 revision "2016-07-08" {
73 description
74 "Updated with refactored routing protocol models";
75 reference "0.2.1";
76 }
77
78 revision "2016-03-29" {
79 description
80 "Initial revision";
81 reference "0.2.0";
82 }
83
84 revision "2015-10-18" {
85 description
86 "Initial revision";
87 reference "0.1.0";
88 }
89
90 // identity statements
91 identity NETWORK_INSTANCE_TYPE {
92 description
93 "A base identity which can be extended to indicate different
94 types of network instance supported by a device.";
95 }
96
97 identity DEFAULT_INSTANCE {
98 base NETWORK_INSTANCE_TYPE;
99 description
100 "A special routing instance which acts as the 'default' or
101 'global' routing instance for a network device.";
102 }
103
104 identity L3VRF {
105 base NETWORK_INSTANCE_TYPE;
106 description
107 "A private Layer 3 only routing instance which is formed of
108 one or more RIBs";
109 }
110
111 identity L2VSI {
112 base NETWORK_INSTANCE_TYPE;
113 description
114 "A private Layer 2 only switch instance which is formed of
115 one or more L2 forwarding tables";
116 }
117
118 identity L2P2P {
119 base NETWORK_INSTANCE_TYPE;
120 description
121 "A private Layer 2 only forwarding instance which acts as
122 a point to point connection between two endpoints";
123 }
124
125 identity L2L3 {
126 base NETWORK_INSTANCE_TYPE;
127 description
128 "A private Layer 2 and Layer 2 forwarding instance";
129 }
130
131 identity ENDPOINT_TYPE {
132 description
133 "Specification of the type of endpoint that is being associated
134 with a network instance";
135 }
136
137 identity LOCAL {
138 base ENDPOINT_TYPE;
139 description
140 "A local interface which is being associated with the endpoint";
141 }
142
143 identity REMOTE {
144 base ENDPOINT_TYPE;
145 description
146 "A remote interface which is being associated with the
147 endpoint";
148 }
149
150 identity LABEL_ALLOCATION_MODE {
151 description
152 "Base identity to be used to express types of label allocation
153 strategies to be used within a network instance";
154 }
155
156 identity PER_PREFIX {
157 base LABEL_ALLOCATION_MODE;
158 description
159 "A label is to be allocated per prefix entry in the RIB for the
160 network instance";
161 }
162
163 identity PER_NEXTHOP {
164 base LABEL_ALLOCATION_MODE;
165 description
166 "A label is to be allocated per nexthop entry in the RIB for
167 the network instance";
168 }
169
170 identity INSTANCE_LABEL {
171 base LABEL_ALLOCATION_MODE;
172 description
173 "A single label is to be used for the instance";
174 }
175
176 identity ENCAPSULATION {
177 description
178 "On the wire encapsulations that can be used when
179 differentiating network instances";
180 }
181
182 identity MPLS {
183 base ENCAPSULATION;
184 description
185 "Use MPLS labels to distinguish network instances on the wire";
186 }
187
188 identity VXLAN {
189 base ENCAPSULATION;
190 description
191 "Use VXLAN (RFC7348) VNIs to distinguish network instances on
192 the wire";
193 }
194
195 identity SIGNALLING_PROTOCOL {
196 description
197 "The signalling protocol that should be used to diseminate
198 entries within a forwarding instance";
199 }
200
201 identity LDP {
202 base SIGNALLING_PROTOCOL;
203 description
204 "Use LDP-based setup for signalling. Where the instance is
205 a point-to-point service this refers to RFC4447 ('Martini')
206 setup. Where the service is an L2VSI, or L2L3 instance it
207 refers to RFC4762 LDP-signalled VPLS instances";
208 }
209
210 identity BGP_VPLS {
211 base SIGNALLING_PROTOCOL;
212 description
213 "Use BGP-based signalling and autodiscovery for VPLS instances
214 as per RFC4761";
215 }
216
217 identity BGP_EVPN {
218 base SIGNALLING_PROTOCOL;
219 description
220 "Use BGP-based Ethernet VPN (RFC7432) based signalling for
221 the network instance";
222 }
223
224 // rjs note:
225 // this should move to openconfig-types when merged
226 typedef route-distinguisher {
227 type union {
228 // type 0: <2-byte administrator>:<4-byte assigned number>
229 type string {
230 pattern '^(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|'
231 + '[1-9]?[1-9]?[0-9][0-9]|[1-9]):'
232 + '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|'
233 + '[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9])$';
234 }
235 // type 1: <ip-address>:<2-byte assigned number>
236 type string {
237 pattern
238 '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}'
239 + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):'
240 + '(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|'
241 + '[1-9]?[1-9]?[0-9][0-9]|[1-9])$';
242 }
243 // type 2: <4-byte as-number>:<2-byte assigned number>
244 type string {
245 pattern
246 '^(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|'
247 + '[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9]):'
248 + '(65[0-5][0-3][0-5]|[1-5]{2}[0-9]{3}|'
249 + '[1-9]{0,2}[0-9][0-9]|[1-9])$';
250 }
251 }
252 description "A route distinguisher value";
253 reference "RFC4364";
254 }
255}