2 namespace "urn:huawei:params:xml:ns:yang:l3vpn";
3 // replace with IANA namespace when assigned
8 //draft-zhdankin-netmod-bgp-cfg
10 import ietf-interfaces {
12 //rfc7223-YANG Interface Management
15 import ietf-inet-types {
17 revision-date "2013-07-15";
21 import ietf-yang-types {
28 revision-date "2015-06-02";
32 "This YANG module defines the generic configuration data for L3VPN service.
36 BGP (bgp): Border Gateway Protocol
37 IPv4 (ipv4):Internet Protocol Version 4
38 IPv6 (ipv6): Internet Protocol Version 6
45 reference "RFC4271, RFC4364, RFC4760";
48 grouping augment-bgp-af-vpn-config {
50 "A set of configuration parameters that is applicable to both BGP-VPNv4
51 and BGP-VPNv6 address family.";
53 leaf apply-label-per-nexthop {
55 "The apply-label per-nexthop command enables the ASBR to allocate
56 labels for IPv4 VPN routes or IPv6 VPN routes based on the next hop.";
67 "Specify peer as UPE.";
77 grouping bgp-af-vpn-instance-config {
81 "The router-id command configures router ID for BGP VPN instance IPv4
82 or IPv6 address family.
83 By default, no router ID is configured for BGP VPN instance IPv4 or
84 IPv6 address family, and the BGP router ID is used as the router ID.";
94 "Specifies the router ID of a BGP VPN instance IPv4 address
95 family. The router ID is expressed in the IPv4 address format.
103 leaf enable-auto-select {
105 "Configures automatic route ID selection for the current BGP VPN
106 instance address family.";
118 "The auto-frr command enables BGP Auto FRR.";
128 max-elements "unbounded";
131 "BGP Peer configure class";
135 "The nerighbor address";
137 type inet:ip-address;
142 description "peerGroupName";
149 description "Specifies the AS number of the peer.";
159 "specifies the description. The description is a string of letters
160 or figures. The value ranges from 1 to 80 characters without
171 "The peer soo command configures the Site of Origin (SoO)
172 attribute for an EBGP peer in a BGP VPN instance. Format is ASN:nn
181 leaf substituteAsEnable {
183 "Using the peer substitute-as command, you can substitute the AS
184 number of the specified peer in the as-path with the local AS
200 * Binding Interfaces to a VPN Instance.
203 container vpn-interfaces {
205 "VPN is enabled on interfaces.";
209 max-elements "unbounded";
213 path "/if:interfaces/if:interface/if:name";
216 list vpn-instance-names {
223 leaf associated-subnet-type {
227 description "V4 Router Internal VPN";
231 description "V6 Router Internal VPN";
235 description "BGPVPN Internet";
237 enum V4AndV6Subnets {
239 description "BGPVPN dual stack or V6/V4 Router or undefined";
247 leaf router-interface {
250 uses nvpn:network-attributes;
256 "Display the information of the vrf.
259 It is intended that this container may be augmented by vendors to
260 reflect the vendor-specific operational state parameters.";
264 "CreateTime of the vrf.";
271 "UpTime period of the vrf.";
292 description "vrf up.";
296 description "vrf down.";
304 * augment some bgp vpn functions in bgp module.
306 augment "/bgp:bgp-router/bgp:vpnv4/bgp:unicast" {
308 uses augment-bgp-af-vpn-config;
312 augment "/bgp:bgp-router/bgp:vpnv6/bgp:unicast" {
313 uses augment-bgp-af-vpn-config;
317 augment "/bgp:bgp-router" {
319 container bgp-af-ipv4-vpn-instances {
321 "vpn-instances ipv4 address family.";
322 list bgp-af-ipv4-vpn-instance {
323 key "vpn-instance-name";
324 max-elements "unbounded";
326 leaf vpn-instance-name {
329 uses bgp-af-vpn-instance-config;
333 container bgp-af-ipv6-vpn-instances {
335 "vpn-instances ipv6 address family.";
336 list bgp-af-ipv6-vpn-instance {
337 key "vpn-instance-name";
338 max-elements "unbounded";
340 leaf vpn-instance-name {
343 uses bgp-af-vpn-instance-config;