2 module l3vpn-instances-interfaces {
4 namespace "urn:opendaylight:netvirt:neutronvpn:l3vpn";
5 prefix l3vpn-instances-interfaces;
7 import ietf-yang-types { prefix yang; revision-date "2013-07-15";}
9 import ietf-interfaces {
11 //rfc7223-YANG Interface Management
13 import yang-ext {prefix ext; revision-date "2013-07-09";}
16 revision-date "2015-06-02";
18 revision "2020-02-04" {
19 description "This YANG module defines the generic configuration data for L3VPN service.
20 This has been adapted from l3vpn.yang";
23 grouping vpn-af-config {
24 description "A set of configuration parameters that is applicable to both IPv4 and
25 IPv6 address family for a VPN instance .";
27 leaf-list route-distinguisher {
28 description "The route-distinguisher command configures a route distinguisher (RD)
29 for the IPv4 or IPv6 address family of a VPN instance. Format is ASN:nn or IP-address:nn.";
37 container vpnTargets {
38 description "The vpn-target command configures the export or import VPN target
39 extended community attribute for the VPN instance IPv4/IPv6 address family.
40 Format is ASN:nn or IP-address:nn.";
44 max-elements "unbounded";
46 description "L3vpn vpntarget configure class";
50 description "Vpn-target: adds VPN target extended community attribute to the
51 export or import VPN target extended community list. The
52 vpn-target can be expressed in either of the following formats:
53 (1)16-bit AS number:32-bit user-defined number
54 For example, 1:3. The AS number ranges from 0 to 65535. The
55 user-defined number ranges from 0 to 4294967295. The AS number
56 and the user-defined number cannot be 0s at the same time.
57 That is, a VPN target cannot be 0:0.
58 (2)32-bit IP address:16-bit user-defined number
59 For example, 192.168.122.15:1. The IP address ranges from
60 0.0.0.0 to 255.255.255.255. The user-defined number ranges from 0 to 65535.
61 (3)32-bit IP address:16-bit user-defined number
62 For example, 192.168.122.15:1. An IP address ranges from
63 0.0.0.0 to 255.255.255.255. A user-defined number ranges from 0 to 65535.";
73 description "Specifies the vpn target type, export-extcommunity:
74 specifies the extended community attributes carried in routing
75 information to be sent. import-extcommunity: receives routing
76 information carrying specified extended community attributes.";
80 enum export_extcommunity {
82 description "export-extcommunity:";
84 enum import_extcommunity {
86 description "import-extcommunity:";
90 description "export-extcommunity & import-extcommunity:";
97 container apply-label {
98 description "Apply one label mode for the VPN instance route.";
100 choice apply-label-mode {
102 description "The apply-label per-route command enables the one-label-per-route
103 mode. The VPN instance IPv4/IPv6 address family assigns a unique
104 label to each route to be sent to the peer PE.";
106 leaf apply-label-per-route {
112 description "The apply-label per-instance command applies one label to all VPN
113 instance IPv4 address family or IPv6 address family routes to a peer PE.";
115 leaf apply-label-per-instance {
121 }//End of "container apply-label"
123 leaf import-route-policy {
124 description "The import route-policy command associates a VPN instance enabled
125 with the IPv4 or IPv6 address family with an import routing policy.
126 Only one import routing policy can be associated with a VPN instance
127 enabled with the IPv4 or IPv6 address family. If the import route-policy
128 command is run more than once, the latest configuration overrides the previous ones.";
136 leaf export-route-policy {
137 description "The export route-policy command associates a VPN instance enabled
138 with the IPv4 or IPv6 address family with an export routing policy.
139 Only one export routing policy can be associated with a VPN instance enabled with
140 the IPv4 or IPv6 address family. If the export route-policy command is run more than once,
141 the latest configuration overrides the previous ones.";
149 container prefix-limit {
150 description "The prefix limit command sets a limit on the maximum number of
151 prefixes supported in the existing VPN instance, preventing the
152 PE from importing excessive VPN route prefixes.";
154 leaf prefix-limit-number {
155 description "Specifies the maximum number of prefixes supported in the VPN
156 instance IPv4 or IPv6 address family.";
159 range "1..4294967295";
163 choice prefix-limit-action {
164 case enable-alert-percent {
165 leaf alert-percent-value {
166 description "Specifies the proportion of the alarm threshold to the maximum
167 number of prefixes.";
172 leaf route-unchanged {
173 description "Indicates that the routing table remains unchanged. By default,
174 route-unchanged is not configured. When the number of prefixes
175 in the routing table is greater than the value of the parameter number,
176 routes are processed as follows:
177 (1)If route-unchanged is configured, routes in the routing table remain unchanged.
178 (2)If route-unchanged is not configured, all routes in the
179 routing table are deleted and then re-added.";
186 case enable-simple-alert {
188 description "Indicates that when the number of VPN route prefixes exceeds
189 number, prefixes can still join the VPN routing table and alarms are displayed.";
199 container routing-table-limit {
200 description "The routing-table limit command sets a limit on the maximum number of
201 routes that the IPv4 or IPv6 address family of a VPN instance can support.
202 By default, there is no limit on the maximum number of routes that the
203 IPv4 or IPv6 address family of a VPN instance can support, but the
204 total number of private network and public network routes on a device
205 cannot exceed the allowed maximum number of unicast routes.";
207 leaf routing-table-limit-number {
208 description "Specifies the maximum number of routes supported by a VPN instance. ";
211 range "1..4294967295";
214 choice routing-table-limit-action {
215 case enable-alert-percent {
216 leaf alert-percent-value {
217 description "Specifies the percentage of the maximum number of routes. When
218 the maximum number of routes that join the VPN instance is up
219 to the value (number*alert-percent)/100, the system prompts alarms.
220 The VPN routes can be still added to the routing table,
221 but after the number of routes reaches number, the subsequent routes are dropped.";
229 case enable-simple-alert {
231 description "Indicates that when VPN routes exceed number, routes can still
232 be added into the routing table, but the system prompts alarms.
233 However, after the total number of VPN routes and network public
234 routes reaches the unicast route limit specified in the License,
235 the subsequent VPN routes are dropped.";
244 description "Enable VPN FRR in the VPN instance address family view.
245 If a PE is connected to two other PEs, running the vpn frr command in
246 the VPN instance address family view of the PE enables VPN FRR and
247 improves network reliability. After VPN FRR is configured, traffic can
248 switch to the secondary LSP immediately after the primary LSP becomes faulty.";
258 container l3vpnVrfPipe {
259 description "The diffserv-mode command configures the mode of the MPLS
260 differentiated service (Diff-Serv) for ensuring end-to-end QoS.";
263 description "Pipe mode";
268 description "pipe: Indicates that the Pipe MPLS Diff-Serv mode is adopted.";
272 description "shortPipe: Indicates that the Short-pipe MPLS Diff-Serv mode is adopted.";
276 description "uniform: Indicates that the Uniform MPLS Diff-Serv mode is adopted.";
283 description "Service Class, Specifies the service type when the packet enters the
284 public network from the private network. The values are cs7, cs6, ef, af4, af3, af2, af1, be.";
324 description "Specifies a color for marking the discard priority of a packet
325 transferred from a private network to a public network. The values
326 are green, yellow, and red.";
331 description "green:";
335 description "yellow:";
346 description "Specifies the DS domain name of the specified Per-Hop Behavior (PHB)
347 applied to the egress in Short pipe mode. It is a string of 1 to 31 characters.";
354 container l3vpnTtlMode {
355 description "The ttl-mode command enables MPLS to process the TTL in a specified
356 mode. By default, MPLS processes the TTL in pipe mode.";
359 description "TTL mode";
364 description "pipe: Enables MPLS to process the TTL in pipe mode.";
369 description "uniform: Enables MPLS to process the TTL in uniform mode.";
376 description "The tnl-policy command associates the IPv4 or IPv6 address family of
377 a VPN instance with a tunnel policy.";
384 container importRibs {
385 description "Import route class";
388 description "Specifies the protocol from which routes are imported.
389 At present, In the IPv4 unicast address family view, the protocol
390 can be IS-IS,static, direct and BGP.";
399 description "Direct:";
411 description "Static:";
423 description "OSPFV3:";
427 description "RIPNG:";
431 description "INVALID:";
437 description "Specifies the process ID if the protocol from routes are imported is IS-IS.";
441 range "0..4294967295";
445 leaf bgp-valid-route {
450 description "Policy Id for import routes";
455 leaf traffic-statistics {
456 description "The traffic-statistics enable command enables traffic statistics
457 for a VPN instance.";
468 container vpn-instances {
469 description "VPN instances configuration parameters. VPN instances support both the
470 IPv4 and IPv6 address families.";
473 max-elements "unbounded";
475 key "vpn-instance-name";
476 description "Specifies the name of the VPN instance. It is a string of 1 to 31
477 case-sensitive characters.";
479 leaf vpn-instance-name {
482 description "The name of the vpn-instance.";
485 description "The type of the VPN Instance.
486 L3 indicates it is an L3VPN.
487 L2 indicates it is an EVPN";
507 description "A textual description of VPN instance, the VPN instance description
508 helps users memorize the VPN instance.";
516 container ipv4-family {
517 description "The IPv4 address family is enabled for the VPN instance.";
521 container ipv6-family {
522 description "The IPv6 address family is enabled for the VPN instance.";