1 module ietf-network-instance {
3 namespace "urn:ietf:params:xml:ns:yang:ietf-network-instance";
6 // import some basic types
8 import ietf-interfaces {
11 "RFC 8343: A YANG Data Model for Interface Management";
16 "RFC 8344: A YANG Data Model for IP Management";
18 import ietf-yang-schema-mount {
21 "RFC 8528: YANG Schema Mount";
25 "IETF Routing Area (rtgwg) Working Group";
27 "WG Web: <https://datatracker.ietf.org/wg/rtgwg>
28 WG List: <mailto:rtgwg@ietf.org>
31 <mailto:lberger@labn.net>
32 Author: Christian Hopps
33 <mailto:chopps@chopps.org>
35 <mailto:acee@cisco.com>
36 Author: Dean Bogdanovic
37 <mailto:ivandean@gmail.com>";
39 "This module is used to support multiple network instances
40 within a single physical or virtual device. Network
41 instances are commonly known as VRFs (VPN Routing and
42 Forwarding) and VSIs (Virtual Switching Instances).
43 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
44 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
45 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
46 are to be interpreted as described in BCP 14 (RFC 2119)
47 (RFC 8174) when, and only when, they appear in all capitals,
50 Copyright (c) 2019 IETF Trust and the persons identified as
51 authors of the code. All rights reserved.
53 Redistribution and use in source and binary forms, with or
54 without modification, is permitted pursuant to, and subject
55 to the license terms contained in, the Simplified BSD
56 License set forth in Section 4.c of the IETF Trust's Legal
57 Provisions Relating to IETF Documents
58 (https://trustee.ietf.org/license-info).
60 This version of this YANG module is part of RFC 8529; see
61 the RFC itself for full legal notices.";
70 // top-level device definition statements
72 container network-instances {
74 "Network instances, each of which consists of
77 "RFC 8349: A YANG Data Model for Routing Management";
78 list network-instance {
81 "List of network instances.";
86 "device-scoped identifier for the network
93 "Flag indicating whether or not the network
94 instance is enabled.";
99 "Description of the network instance
100 and its intended purpose.";
104 "This node serves as an anchor point for different types
105 of network instances. Each 'case' is expected to
106 differ in terms of the information needed in the
107 parent/core to support the NI and may differ in their
108 mounted-schema definition. When the mounted schema is
109 not expected to be the same for a specific type of NI,
110 a mount point should be defined.";
115 "Well-known mount points.";
118 "Container for mount point.";
119 yangmnt:mount-point "vrf-root" {
121 "Root for L3VPN-type models. This will typically
122 not be an inline-type mount point.";
127 "Container for mount point.";
128 yangmnt:mount-point "vsi-root" {
130 "Root for L2VPN-type models. This will typically
131 not be an inline-type mount point.";
136 "Container for mount point.";
137 yangmnt:mount-point "vv-root" {
139 "Root models that support both L2VPN-type bridging
140 and L3VPN-type routing. This will typically
141 not be an inline-type mount point.";
148 // augment statements
150 augment "/if:interfaces/if:interface" {
152 "Add a node for the identification of the network
153 instance associated with the information configured
156 Note that a standard error will be returned if the
157 identified leafref isn't present. If an interface cannot
158 be assigned for any other reason, the operation SHALL fail
159 with an error-tag of 'operation-failed' and an
160 error-app-tag of 'ni-assignment-failed'. A meaningful
161 error-info that indicates the source of the assignment
162 failure SHOULD also be provided.";
165 path "/network-instances/network-instance/name";
168 "Network instance to which an interface is bound.";
171 augment "/if:interfaces/if:interface/ip:ipv4" {
173 "Add a node for the identification of the network
174 instance associated with the information configured
175 on an IPv4 interface.
177 Note that a standard error will be returned if the
178 identified leafref isn't present. If an interface cannot
179 be assigned for any other reason, the operation SHALL fail
180 with an error-tag of 'operation-failed' and an
181 error-app-tag of 'ni-assignment-failed'. A meaningful
182 error-info that indicates the source of the assignment
183 failure SHOULD also be provided.";
186 path "/network-instances/network-instance/name";
189 "Network instance to which IPv4 interface is bound.";
192 augment "/if:interfaces/if:interface/ip:ipv6" {
194 "Add a node for the identification of the network
195 instance associated with the information configured
196 on an IPv6 interface.
198 Note that a standard error will be returned if the
199 identified leafref isn't present. If an interface cannot
200 be assigned for any other reason, the operation SHALL fail
201 with an error-tag of 'operation-failed' and an
202 error-app-tag of 'ni-assignment-failed'. A meaningful
203 error-info that indicates the source of the assignment
204 failure SHOULD also be provided.";
207 path "/network-instances/network-instance/name";
210 "Network instance to which IPv6 interface is bound.";
214 // notification statements
216 notification bind-ni-name-failed {
218 "Indicates an error in the association of an interface to an
219 NI. Only generated after success is initially returned when
222 Note: Some errors may need to be reported for multiple
223 associations, e.g., a single error may need to be reported
224 for an IPv4 and an IPv6 bind-ni-name.
226 At least one container with a bind-ni-name leaf MUST be
227 included in this notification.";
230 path "/if:interfaces/if:interface/if:name";
234 "Contains the interface name associated with the
237 container interface {
239 "Generic interface type.";
242 path "/if:interfaces/if:interface"
243 + "/ni:bind-ni-name";
246 "Contains the bind-ni-name associated with the
252 "IPv4 interface type.";
255 path "/if:interfaces/if:interface/ip:ipv4/ni:bind-ni-name";
258 "Contains the bind-ni-name associated with the
264 "IPv6 interface type.";
267 path "/if:interfaces/if:interface/ip:ipv6"
268 + "/ni:bind-ni-name";
271 "Contains the bind-ni-name associated with the
278 "Optionally, indicates the source of the assignment