This has been adapted from l3vpn.yang";
}
- grouping vpn-af-config {
- description "A set of configuration parameters that is applicable to both IPv4 and
- IPv6 address family for a VPN instance .";
+ /*
+ * VPN instance view.
+ */
+ container vpn-instances {
+ list vpn-instance {
+ max-elements "unbounded";
+ min-elements "0";
+ key "vpn-instance-name";
+
+ leaf vpn-instance-name {
+ mandatory "true";
+ type string;
+ description
+ "The name of the vpn-instance.";
+ }
+
+ leaf-list route-distinguisher {
- leaf-list route-distinguisher {
- description "The route-distinguisher command configures a route distinguisher (RD)
- for the IPv4 or IPv6 address family of a VPN instance. Format is ASN:nn or IP-address:nn.";
+ description
+ "A set of configuration parameters that is applicable to both IPv4 and
+ IPv6 address family for a VPN instance.
- config "true";
- type string {
+ Format is ASN:nn or IP-address:nn.";
+
+ config "true";
+ type string {
length "3..21";
- }
- }
+ }
+ }
- container vpnTargets {
- description "The vpn-target command configures the export or import VPN target
- extended community attribute for the VPN instance IPv4/IPv6 address family.
+ container vpnTargets {
+
+ description
+ "The vpn-target command configures the export or import VPN target
+ extended community attribute for the VPN instance IPv4/IPv6 address
+ family.
Format is ASN:nn or IP-address:nn.";
- list vpnTarget {
+ list vpnTarget {
key "vrfRTValue";
max-elements "unbounded";
min-elements "0";
- description "L3vpn vpntarget configure class";
+
+ description
+ "L3vpn vpntarget configure class";
leaf vrfRTValue {
- description "Vpn-target: adds VPN target extended community attribute to the
- export or import VPN target extended community list. The
- vpn-target can be expressed in either of the following formats:
- (1)16-bit AS number:32-bit user-defined number
- For example, 1:3. The AS number ranges from 0 to 65535. The
- user-defined number ranges from 0 to 4294967295. The AS number
- and the user-defined number cannot be 0s at the same time.
- That is, a VPN target cannot be 0:0.
- (2)32-bit IP address:16-bit user-defined number
- For example, 192.168.122.15:1. The IP address ranges from
- 0.0.0.0 to 255.255.255.255. The user-defined number ranges from 0 to 65535.
- (3)32-bit IP address:16-bit user-defined number
- For example, 192.168.122.15:1. An IP address ranges from
- 0.0.0.0 to 255.255.255.255. A user-defined number ranges from 0 to 65535.";
-
- config "true";
- mandatory "true";
- type string {
- length "3..21";
- }
+ description
+ "Vpn-target: adds VPN target extended community attribute to the
+ export or import VPN target extended community list. The
+ vpn-target can be expressed in either of the following formats:
+ (1)16-bit AS number:32-bit user-defined number
+ For example, 1:3. The AS number ranges from 0 to 65535. The
+ user-defined number ranges from 0 to 4294967295. The AS number
+ and the user-defined number cannot be 0s at the same time.
+ That is, a VPN target cannot be 0:0.
+ (2)32-bit IP address:16-bit user-defined number
+ For example, 192.168.122.15:1. The IP address ranges from
+ 0.0.0.0 to 255.255.255.255. The user-defined number ranges from
+ 0 to 65535.
+ (3)32-bit IP address:16-bit user-defined number
+ For example, 192.168.122.15:1. An IP address ranges from
+ 0.0.0.0 to 255.255.255.255. A user-defined number ranges from 0
+ to 65535.";
+
+ config "true";
+ mandatory "true";
+ type string {
+ length "3..21";
+ }
}
leaf vrfRTType {
- description "Specifies the vpn target type, export-extcommunity:
- specifies the extended community attributes carried in routing
- information to be sent. import-extcommunity: receives routing
- information carrying specified extended community attributes.";
-
- mandatory "true";
- type enumeration {
- enum export_extcommunity {
- value "0";
- description "export-extcommunity:";
- }
- enum import_extcommunity {
- value "1";
- description "import-extcommunity:";
- }
- enum both {
- value "2";
- description "export-extcommunity & import-extcommunity:";
- }
- }
- }
- }
- }
-
- container apply-label {
- description "Apply one label mode for the VPN instance route.";
-
- choice apply-label-mode {
- case per-route {
- description "The apply-label per-route command enables the one-label-per-route
- mode. The VPN instance IPv4/IPv6 address family assigns a unique
- label to each route to be sent to the peer PE.";
-
- leaf apply-label-per-route {
- type boolean;
- default "true";
- }
- }
- case per-instance {
- description "The apply-label per-instance command applies one label to all VPN
- instance IPv4 address family or IPv6 address family routes to a peer PE.";
-
- leaf apply-label-per-instance {
- type boolean;
- default "false";
- }
- }
- }
- }//End of "container apply-label"
-
- leaf import-route-policy {
- description "The import route-policy command associates a VPN instance enabled
- with the IPv4 or IPv6 address family with an import routing policy.
- Only one import routing policy can be associated with a VPN instance
- enabled with the IPv4 or IPv6 address family. If the import route-policy
- command is run more than once, the latest configuration overrides the previous ones.";
-
- config "true";
- type string {
- length "1..40";
- }
- }
-
- leaf export-route-policy {
- description "The export route-policy command associates a VPN instance enabled
- with the IPv4 or IPv6 address family with an export routing policy.
- Only one export routing policy can be associated with a VPN instance enabled with
- the IPv4 or IPv6 address family. If the export route-policy command is run more than once,
- the latest configuration overrides the previous ones.";
-
- config "true";
- type string {
- length "1..40";
- }
- }
-
- container prefix-limit {
- description "The prefix limit command sets a limit on the maximum number of
- prefixes supported in the existing VPN instance, preventing the
- PE from importing excessive VPN route prefixes.";
- leaf prefix-limit-number {
- description "Specifies the maximum number of prefixes supported in the VPN
- instance IPv4 or IPv6 address family.";
-
- type uint32 {
- range "1..4294967295";
+ description
+ "Specifies the vpn target type, export-extcommunity:
+ specifies the extended community attributes carried in routing
+ information to be sent. import-extcommunity: receives routing
+ information carrying specified extended community attributes.";
+
+ mandatory "true";
+ type enumeration {
+ enum export_extcommunity {
+ value "0";
+ description "export-extcommunity:";
+ }
+ enum import_extcommunity {
+ value "1";
+ description "import-extcommunity:";
+ }
+ enum both {
+ value "2";
+ description "export-extcommunity & import-extcommunity:";
+ }
+ }
}
- }
-
- choice prefix-limit-action {
- case enable-alert-percent {
- leaf alert-percent-value {
- description "Specifies the proportion of the alarm threshold to the maximum
- number of prefixes.";
- type uint8 {
- range "1..100";
- }
- }
- leaf route-unchanged {
- description "Indicates that the routing table remains unchanged. By default,
- route-unchanged is not configured. When the number of prefixes
- in the routing table is greater than the value of the parameter number,
- routes are processed as follows:
- (1)If route-unchanged is configured, routes in the routing table remain unchanged.
- (2)If route-unchanged is not configured, all routes in the
- routing table are deleted and then re-added.";
-
- config "true";
- type boolean;
- default "false";
- }
+ }
+ }
+
+ leaf l2vpn {
+ type boolean;
+ default false;
+ description
+ "The type of the VPN Instance.
+ false indicates it is an L3VPN.
+ true indicates it is an EVPN";
+ }
+
+ leaf bgpvpn-type {
+ type enumeration {
+ enum InternetBGPVPN {
+ value "0";
+ description "Internet BGPVPN";
}
- case enable-simple-alert {
- leaf simple-alert {
- description "Indicates that when the number of VPN route prefixes exceeds
- number, prefixes can still join the VPN routing table and alarms are displayed.";
-
- config "true";
- type boolean;
- default "false";
- }
+ enum BGPVPN {
+ value "1";
+ description "BGPVPN";
}
- }
- }
-
- container routing-table-limit {
- description "The routing-table limit command sets a limit on the maximum number of
- routes that the IPv4 or IPv6 address family of a VPN instance can support.
- By default, there is no limit on the maximum number of routes that the
- IPv4 or IPv6 address family of a VPN instance can support, but the
- total number of private network and public network routes on a device
- cannot exceed the allowed maximum number of unicast routes.";
-
- leaf routing-table-limit-number {
- description "Specifies the maximum number of routes supported by a VPN instance. ";
- config "true";
- type uint32 {
- range "1..4294967295";
+ enum InternalVPN {
+ value "2";
+ description "InternalVPN";
}
- }
- choice routing-table-limit-action {
- case enable-alert-percent {
- leaf alert-percent-value {
- description "Specifies the percentage of the maximum number of routes. When
- the maximum number of routes that join the VPN instance is up
- to the value (number*alert-percent)/100, the system prompts alarms.
- The VPN routes can be still added to the routing table,
- but after the number of routes reaches number, the subsequent routes are dropped.";
-
- config "true";
- type uint8 {
- range "1..100";
- }
- }
+ }
+ default BGPVPN;
+ }
+
+ leaf ip-address-family-configured {
+ type enumeration {
+ enum "undefined" {
+ value "0";
}
- case enable-simple-alert {
- leaf simple-alert {
- description "Indicates that when VPN routes exceed number, routes can still
- be added into the routing table, but the system prompts alarms.
- However, after the total number of VPN routes and network public
- routes reaches the unicast route limit specified in the License,
- the subsequent VPN routes are dropped.";
- config "true";
- type boolean;
- }
+ enum "ipv4" {
+ value "4";
}
- }
- }
-
- leaf vpn-frr {
- description "Enable VPN FRR in the VPN instance address family view.
- If a PE is connected to two other PEs, running the vpn frr command in
- the VPN instance address family view of the PE enables VPN FRR and
- improves network reliability. After VPN FRR is configured, traffic can
- switch to the secondary LSP immediately after the primary LSP becomes faulty.";
-
- type boolean;
- default "false";
- }
-
-
- /*
- * VPN QoS.
- */
- container l3vpnVrfPipe {
- description "The diffserv-mode command configures the mode of the MPLS
- differentiated service (Diff-Serv) for ensuring end-to-end QoS.";
-
- leaf pipeMode {
- description "Pipe mode";
-
- type enumeration {
- enum pipe {
- value "0";
- description "pipe: Indicates that the Pipe MPLS Diff-Serv mode is adopted.";
- }
- enum shortPipe {
- value "1";
- description "shortPipe: Indicates that the Short-pipe MPLS Diff-Serv mode is adopted.";
- }
- enum uniform {
- value "2";
- description "uniform: Indicates that the Uniform MPLS Diff-Serv mode is adopted.";
- }
+ enum "ipv6" {
+ value "6";
}
- default "uniform";
- }
-
- leaf serviceClass {
- description "Service Class, Specifies the service type when the packet enters the
- public network from the private network. The values are cs7, cs6, ef, af4, af3, af2, af1, be.";
-
- type enumeration {
- enum be {
- value "0";
- description "be:";
- }
- enum af1 {
- value "1";
- description "af1:";
- }
- enum af2 {
- value "2";
- description "af2:";
- }
- enum af3 {
- value "3";
- description "af3:";
- }
- enum af4 {
- value "4";
- description "af4:";
- }
- enum ef {
- value "5";
- description "ef:";
- }
- enum cs6 {
- value "6";
- description "cs6:";
- }
- enum cs7 {
- value "7";
- description "cs7:";
- }
+ enum "ipv4-and-ipv6" {
+ value "10";
}
- default "be";
- }
+ }
+ default "undefined";
+ }
- leaf color {
- description "Specifies a color for marking the discard priority of a packet
- transferred from a private network to a public network. The values
- are green, yellow, and red.";
+ leaf l3vni {
+ type uint32;
+ }
- type enumeration {
- enum green {
- value "0";
- description "green:";
- }
- enum yellow {
- value "1";
- description "yellow:";
- }
- enum red {
- value "2";
- description "red:";
- }
- }
- default "green";
- }
-
- leaf dsName {
- description "Specifies the DS domain name of the specified Per-Hop Behavior (PHB)
- applied to the egress in Short pipe mode. It is a string of 1 to 31 characters.";
-
- type string;
- default "default";
- }
- }
-
- container l3vpnTtlMode {
- description "The ttl-mode command enables MPLS to process the TTL in a specified
- mode. By default, MPLS processes the TTL in pipe mode.";
-
- leaf ttlMode {
- description "TTL mode";
- default "pipe";
- type enumeration {
- enum pipe {
- value "0";
- description "pipe: Enables MPLS to process the TTL in pipe mode.";
- }
-
- enum uniform {
- value "1";
- description "uniform: Enables MPLS to process the TTL in uniform mode.";
- }
- }
- }
- }
-
- leaf tunnel-policy {
- description "The tnl-policy command associates the IPv4 or IPv6 address family of
- a VPN instance with a tunnel policy.";
-
- type string {
- length "1..39";
- }
- }
-
- container importRibs {
- description "Import route class";
-
- leaf protocol {
- description "Specifies the protocol from which routes are imported.
- At present, In the IPv4 unicast address family view, the protocol
- can be IS-IS,static, direct and BGP.";
-
- type enumeration {
- enum ALL {
- value "0";
- description "ALL:";
- }
- enum Direct {
- value "1";
- description "Direct:";
- }
- enum OSPF {
- value "2";
- description "OSPF:";
- }
- enum ISIS {
- value "3";
- description "ISIS:";
- }
- enum Static {
- value "4";
- description "Static:";
- }
- enum RIP {
- value "5";
- description "RIP:";
- }
- enum BGP {
- value "6";
- description "BGP:";
- }
- enum OSPFV3 {
- value "7";
- description "OSPFV3:";
- }
- enum RIPNG {
- value "8";
- description "RIPNG:";
- }
- enum INVALID {
- value "9";
- description "INVALID:";
- }
- }
- }
-
- leaf processId {
- description "Specifies the process ID if the protocol from routes are imported is IS-IS.";
-
- default "0";
- type uint32 {
- range "0..4294967295";
- }
- }
-
- leaf bgp-valid-route {
- type boolean;
- }
-
- leaf policyName {
- description "Policy Id for import routes";
- type string {}
- }
- }
-
- leaf traffic-statistics {
- description "The traffic-statistics enable command enables traffic statistics
- for a VPN instance.";
-
- type boolean;
- default "false";
- }
- }
-
-
- /*
- * VPN instance view.
- */
- container vpn-instances {
- description "VPN instances configuration parameters. VPN instances support both the
- IPv4 and IPv6 address families.";
-
- list vpn-instance {
- max-elements "unbounded";
- min-elements "0";
- key "vpn-instance-name";
- description "Specifies the name of the VPN instance. It is a string of 1 to 31
- case-sensitive characters.";
-
- leaf vpn-instance-name {
- mandatory "true";
- type string;
- description "The name of the vpn-instance.";
- }
- leaf type {
- description "The type of the VPN Instance.
- L3 indicates it is an L3VPN.
- L2 indicates it is an EVPN";
-
- type enumeration {
- enum l3 {
- value "0";
- description "L3VPN";
- }
- enum l2 {
- value "1";
- description "EVPN";
- }
- }
- default "l3";
- }
-
- leaf l3vni {
- type uint32;
- }
-
- leaf description {
- description "A textual description of VPN instance, the VPN instance description
- helps users memorize the VPN instance.";
-
- type string {
- length "1..242";
- pattern "([^?]*)";
- }
- }
-
- container ipv4-family {
- description "The IPv4 address family is enabled for the VPN instance.";
- uses vpn-af-config;
- }
-
- container ipv6-family {
- description "The IPv6 address family is enabled for the VPN instance.";
- uses vpn-af-config;
- }
- }
+ }
}
augment "/vpn-interfaces/vpn-interface" {