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: <http://tools.ietf.org/wg/rtgwg/>
28 WG List: <mailto:rtgwg@ietf.org>
30 <mailto:lberger@labn.net>
31 Author: Christian Hopps
32 <mailto:chopps@chopps.org>
34 <mailto:acee@cisco.com>
35 Author: Dean Bogdanovic
36 <mailto:ivandean@gmail.com>";
38 "This module is used to support multiple network instances
39 within a single physical or virtual device. Network
40 instances are commonly known as VRFs (VPN Routing and
41 Forwarding) and VSIs (Virtual Switching Instances).
42 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
43 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
44 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
45 are to be interpreted as described in BCP 14 (RFC 2119)
46 (RFC 8174) when, and only when, they appear in all capitals,
48 Copyright (c) 2019 IETF Trust and the persons identified as
49 authors of the code. All rights reserved.
50 Redistribution and use in source and binary forms, with or
51 without modification, is permitted pursuant to, and subject
52 to the license terms contained in, the Simplified BSD
53 License set forth in Section 4.c of the IETF Trust's Legal
54 Provisions Relating to IETF Documents
55 (https://trustee.ietf.org/license-info).
56 This version of this YANG module is part of RFC 8529; see
57 the RFC itself for full legal notices.";
66 // top-level device definition statements
68 container network-instances {
70 "Network instances, each of which consists of
73 "RFC 8349: A YANG Data Model for Routing Management";
74 list network-instance {
77 "List of network instances.";
82 "device-scoped identifier for the network
89 "Flag indicating whether or not the network
90 instance is enabled.";
95 "Description of the network instance
96 and its intended purpose.";
100 "This node serves as an anchor point for different types
101 of network instances. Each 'case' is expected to
102 differ in terms of the information needed in the
103 parent/core to support the NI and may differ in their
104 mounted-schema definition. When the mounted schema is
105 not expected to be the same for a specific type of NI,
106 a mount point should be defined.";
111 "Well-known mount points.";
114 "Container for mount point.";
115 yangmnt:mount-point "vrf-root" {
117 "Root for L3VPN-type models. This will typically
118 not be an inline-type mount point.";
123 "Container for mount point.";
124 yangmnt:mount-point "vsi-root" {
126 "Root for L2VPN-type models. This will typically
127 not be an inline-type mount point.";
132 "Container for mount point.";
133 yangmnt:mount-point "vv-root" {
135 "Root models that support both L2VPN-type bridging
136 and L3VPN-type routing. This will typically
137 not be an inline-type mount point.";
144 // augment statements
146 augment "/if:interfaces/if:interface" {
148 "Add a node for the identification of the network
149 instance associated with the information configured
151 Note that a standard error will be returned if the
152 identified leafref isn't present. If an interface cannot
153 be assigned for any other reason, the operation SHALL fail
154 with an error-tag of 'operation-failed' and an
155 error-app-tag of 'ni-assignment-failed'. A meaningful
156 error-info that indicates the source of the assignment
157 failure SHOULD also be provided.";
160 path "/network-instances/network-instance/name";
163 "Network instance to which an interface is bound.";
166 augment "/if:interfaces/if:interface/ip:ipv4" {
168 "Add a node for the identification of the network
169 instance associated with the information configured
170 on an IPv4 interface.
171 Note that a standard error will be returned if the
172 identified leafref isn't present. If an interface cannot
173 be assigned for any other reason, the operation SHALL fail
174 with an error-tag of 'operation-failed' and an
175 error-app-tag of 'ni-assignment-failed'. A meaningful
176 error-info that indicates the source of the assignment
177 failure SHOULD also be provided.";
180 path "/network-instances/network-instance/name";
183 "Network instance to which IPv4 interface is bound.";
186 augment "/if:interfaces/if:interface/ip:ipv6" {
188 "Add a node for the identification of the network
189 instance associated with the information configured
190 on an IPv6 interface.
191 Note that a standard error will be returned if the
192 identified leafref isn't present. If an interface cannot
193 be assigned for any other reason, the operation SHALL fail
194 with an error-tag of 'operation-failed' and an
195 error-app-tag of 'ni-assignment-failed'. A meaningful
196 error-info that indicates the source of the assignment
197 failure SHOULD also be provided.";
200 path "/network-instances/network-instance/name";
203 "Network instance to which IPv6 interface is bound.";
207 // notification statements
209 notification bind-ni-name-failed {
211 "Indicates an error in the association of an interface to an
212 NI. Only generated after success is initially returned when
214 Note: Some errors may need to be reported for multiple
215 associations, e.g., a single error may need to be reported
216 for an IPv4 and an IPv6 bind-ni-name.
217 At least one container with a bind-ni-name leaf MUST be
218 included in this notification.";
221 path "/if:interfaces/if:interface/if:name";
225 "Contains the interface name associated with the
228 container interface {
230 "Generic interface type.";
233 path "/if:interfaces/if:interface"
234 + "/ni:bind-ni-name";
237 "Contains the bind-ni-name associated with the
243 "IPv4 interface type.";
246 path "/if:interfaces/if:interface/ip:ipv4/ni:bind-ni-name";
249 "Contains the bind-ni-name associated with the
255 "IPv6 interface type.";
258 path "/if:interfaces/if:interface/ip:ipv6"
259 + "/ni:bind-ni-name";
262 "Contains the bind-ni-name associated with the
269 "Optionally, indicates the source of the assignment