module ietf-ac-ntw {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-ac-ntw";
prefix ac-ntw;
import ietf-vpn-common {
prefix vpn-common;
reference
"RFC 9181: A Common YANG Data Model for Layer 2 and Layer 3
VPNs";
}
import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Data Types, Section 4";
}
import ietf-key-chain {
prefix key-chain;
reference
"RFC 8177: YANG Data Model for Key Chains";
}
import ietf-routing-types {
prefix rt-types;
reference
"RFC 8294: Common YANG Data Types for the Routing Area";
}
import ietf-routing-policy {
prefix rt-pol;
reference
"RFC 9067: A YANG Data Model for Routing Policy";
}
import ietf-interfaces {
prefix if;
reference
"RFC 8343: A YANG Data Model for Interface Management";
}
import ieee802-dot1q-types {
prefix dot1q-types;
reference
"IEEE Std 802.1Qcp: Bridges and Bridged Networks--
Amendment 30: YANG Data Model";
}
import ietf-network {
prefix nw;
reference
"RFC 8345: A YANG Data Model for Network Topologies,
Section 6.1";
}
import ietf-sap-ntw {
prefix sap;
reference
"RFC 9408: A YANG Network Data Model for Service Attachment
Points (SAPs)";
}
import ietf-ac-common {
prefix ac-common;
reference
"RFC 9833: A Common YANG Data Model for Attachment Circuits";
}
import ietf-ac-svc {
prefix ac-svc;
reference
"RFC 9834: YANG Data Models for Bearers and Attachment
Circuits as a Service (ACaaS)";
}
organization
"IETF OPSAWG (Operations and Management Area Working Group)";
contact
"WG Web:
WG List:
Editor: Mohamed Boucadair
Author: Richard Roberts
Author: Oscar Gonzalez de Dios
Author: Samier Barguil
Author: Bo Wu
";
description
"This YANG module defines a YANG network model for the management
of attachment circuits (ACs).
Copyright (c) 2025 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Revised BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 9835; see the
RFC itself for full legal notices.";
revision 2025-09-29 {
description
"Initial revision.";
reference
"RFC 9835: A YANG Network Data Model for Attachment Circuits";
}
// References
/* A set of groupings to ease referencing cross-modules */
grouping attachment-circuit-reference {
description
"This grouping can be used to reference an AC in a specific
node.";
leaf ac-ref {
type leafref {
path "/nw:networks/nw:network[nw:network-id=current()/../"
+ "network-ref]/nw:node[nw:node-id=current()/../"
+ "node-ref]/ac-ntw:ac/ac-ntw:name";
require-instance false;
}
description
"An absolute reference to an AC.";
}
uses nw:node-ref;
}
grouping attachment-circuit-references {
description
"This grouping can be used to reference a list of ACs in a
specific node.";
leaf-list ac-ref {
type leafref {
path "/nw:networks/nw:network[nw:network-id=current()/../"
+ "network-ref]/nw:node[nw:node-id=current()/../"
+ "node-ref]/ac-ntw:ac/ac-ntw:name";
require-instance false;
}
description
"An absolute reference to an AC.";
}
uses nw:node-ref;
}
grouping ac-profile-reference {
description
"This grouping can be used to reference an AC profile.";
leaf ac-profile-ref {
type leafref {
path "/nw:networks/nw:network[nw:network-id=current()/../"
+ "network-ref]/ac-ntw:ac-profile/ac-ntw:name";
require-instance false;
}
description
"An absolute reference to an AC.";
}
uses nw:network-ref;
}
grouping encryption-profile-reference {
description
"This grouping can be used to reference an encryption
profile.";
leaf encryption-profile-ref {
type leafref {
path "/nw:networks/nw:network[nw:network-id=current()/../"
+ "network-ref]"
+ "/ac-ntw:specific-provisioning-profiles"
+ "/ac-ntw:valid-provider-identifiers"
+ "/ac-ntw:encryption-profile-identifier/ac-ntw:id";
require-instance false;
}
description
"An absolute reference to an encryption profile.";
}
uses nw:network-ref;
}
grouping qos-profile-reference {
description
"This grouping can be used to reference a QoS profile.";
leaf qos-profile-ref {
type leafref {
path "/nw:networks/nw:network[nw:network-id=current()/../"
+ "network-ref]"
+ "/ac-ntw:specific-provisioning-profiles"
+ "/ac-ntw:valid-provider-identifiers"
+ "/ac-ntw:qos-profile-identifier/ac-ntw:id";
require-instance false;
}
description
"An absolute reference to a QoS profile.";
}
uses nw:network-ref;
}
grouping failure-detection-profile-reference {
description
"This grouping can be used to reference a failure detection
profile.";
leaf failure-detection-profile-ref {
type leafref {
path "/nw:networks/nw:network[nw:network-id=current()/../"
+ "network-ref]"
+ "/ac-ntw:specific-provisioning-profiles"
+ "/ac-ntw:valid-provider-identifiers"
+ "/ac-ntw:failure-detection-profile-identifier/ac-ntw:id";
require-instance false;
}
description
"An absolute reference to a failure detection profile.";
}
uses nw:network-ref;
}
grouping forwarding-profile-reference {
description
"This grouping can be used to reference a forwarding profile.";
leaf forwarding-profile-ref {
type leafref {
path "/nw:networks/nw:network[nw:network-id=current()/../"
+ "network-ref]"
+ "/ac-ntw:specific-provisioning-profiles"
+ "/ac-ntw:valid-provider-identifiers"
+ "/ac-ntw:forwarding-profile-identifier/ac-ntw:id";
require-instance false;
}
description
"An absolute reference to a forwarding profile.";
}
uses nw:network-ref;
}
grouping routing-profile-reference {
description
"This grouping can be used to reference a routing profile.";
leaf routing-profile-ref {
type leafref {
path "/nw:networks/nw:network[nw:network-id=current()/../"
+ "network-ref]"
+ "/ac-ntw:specific-provisioning-profiles"
+ "/ac-ntw:valid-provider-identifiers"
+ "/ac-ntw:routing-profile-identifier/ac-ntw:id";
require-instance false;
}
description
"An absolute reference to a routing profile.";
}
uses nw:network-ref;
}
// Layer 2 connection
grouping l2-connection {
description
"Defines Layer 2 protocols and parameters that are required to
enable AC connectivity on the network side.";
container encapsulation {
description
"Container for Layer 2 encapsulation.";
leaf encap-type {
type identityref {
base vpn-common:encapsulation-type;
}
description
"Tagged interface type.";
}
container dot1q {
when "derived-from-or-self(../encap-type, "
+ "'vpn-common:dot1q')" {
description
"Only applies when the type of the tagged interface is
'dot1q'.";
}
description
"Tagged interface.";
uses ac-common:dot1q;
container tag-operations {
description
"Sets the tag manipulation policy for this AC. It
defines a set of tag manipulations that allow for the
insertion, removal, or rewriting of 802.1Q VLAN tags.
These operations are indicated for the CE-PE direction.
By default, tag operations are symmetric. As such, the
reverse tag operation is assumed on the PE-CE
direction.";
choice op-choice {
description
"Selects the tag rewriting policy for an AC.";
leaf pop {
type empty;
description
"Pop the outer tag.";
}
leaf push {
type empty;
description
"Pushes one or two tags defined by the tag-1 and
tag-2 leaves. It is assumed that, absent any
policy, the default value of 0 will be used for
the Priority Code Point (PCP) setting.";
}
leaf translate {
type empty;
description
"Translates the outer tag to one or two tags. PCP
bits are preserved.";
}
}
leaf tag-1 {
when 'not(../pop)';
type dot1q-types:vlanid;
description
"A first tag to be used for push or translate
operations. This tag will be used as the outermost
tag as a result of the tag operation.";
}
leaf tag-1-type {
type dot1q-types:dot1q-tag-type;
default "dot1q-types:s-vlan";
description
"Specifies a specific 802.1Q tag type of tag-1.";
}
leaf tag-2 {
when '(../translate)';
type dot1q-types:vlanid;
description
"A second tag to be used for translation.";
}
leaf tag-2-type {
type dot1q-types:dot1q-tag-type;
default "dot1q-types:c-vlan";
description
"Specifies a specific 802.1Q tag type of tag-2.";
}
}
}
container priority-tagged {
when "derived-from-or-self(../encap-type, "
+ "'vpn-common:priority-tagged')" {
description
"Only applies when the type of the tagged interface is
'priority-tagged'.";
}
description
"Priority tagged container.";
uses ac-common:priority-tagged;
}
container qinq {
when "derived-from-or-self(../encap-type, "
+ "'vpn-common:qinq')" {
description
"Only applies when the type of the tagged interface is
'QinQ'.";
}
description
"Includes QinQ parameters.";
uses ac-common:qinq;
container tag-operations {
description
"Sets the tag manipulation policy for this AC. It
defines a set of tag manipulations that allow for the
insertion, removal, or rewriting of 802.1Q VLAN tags.
These operations are indicated for the CE-PE direction.
By default, tag operations are symmetric. As such, the
reverse tag operation is assumed on the PE-CE
direction.";
choice op-choice {
description
"Selects the tag rewriting policy for an AC.";
leaf pop {
type uint8 {
range "1|2";
}
description
"Pops one or two tags as a function of the indicated
pop value.";
}
leaf push {
type empty;
description
"Pushes one or two tags defined by the tag-1 and
tag-2 leaves. It is assumed that, absent any
policy, the default value of 0 will be used for
PCP setting.";
}
leaf translate {
type uint8 {
range "1|2";
}
description
"Translates one or two outer tags. PCP bits are
preserved. The following operations are supported:
- translate 1 with tag-1 leaf is provided: only the
outermost tag is translated to the value in tag-1.
- translate 2 with both tag-1 and tag-2 leaves are
provided: both outer and inner tags are translated
to the values in tag-1 and tag-2, respectively.
- translate 2 with tag-1 leaf is provided: the
outer tag is popped while the inner tag is
translated to the value in tag-1.";
}
}
leaf tag-1 {
when 'not(../pop)';
type dot1q-types:vlanid;
description
"A first tag to be used for push or translate
operations. This tag will be used as the outermost
tag as a result of the tag operation.";
}
leaf tag-1-type {
type dot1q-types:dot1q-tag-type;
default "dot1q-types:s-vlan";
description
"Specifies a specific 802.1Q tag type of tag-1.";
}
leaf tag-2 {
when 'not(../pop)';
type dot1q-types:vlanid;
description
"A second tag to be used for push or translate
operations.";
}
leaf tag-2-type {
type dot1q-types:dot1q-tag-type;
default "dot1q-types:c-vlan";
description
"Specifies a specific 802.1Q tag type of tag-2.";
}
}
}
}
choice l2-service {
description
"The Layer 2 connectivity service can be provided by
indicating a pointer to an L2VPN or by specifying a Layer 2
tunnel service.";
container l2-tunnel-service {
description
"Defines a Layer 2 tunnel termination.";
uses ac-common:l2-tunnel-service;
}
case l2vpn {
leaf l2vpn-id {
type vpn-common:vpn-id;
description
"Indicates the L2VPN service associated with an
Integrated Routing and Bridging (IRB) interface.";
}
}
}
}
grouping l2-connection-if-ref {
description
"Specifies Layer 2 connection parameters with interface
references.";
uses l2-connection;
leaf l2-termination-point {
type string;
description
"Specifies a reference to a local Layer 2 termination point,
such as a Layer 2 sub-interface.";
}
leaf local-bridge-reference {
type string;
description
"Specifies a local bridge reference to accommodate, e.g.,
implementations that require internal bridging.
A reference may be a local bridge domain.";
}
leaf bearer-reference {
if-feature "ac-common:server-assigned-reference";
type string;
description
"This is an internal reference for the service provider to
identify the bearer associated with this AC.";
}
container lag-interface {
if-feature "vpn-common:lag-interface";
description
"Container for configuration of Link Aggregation Group (LAG)
interface attributes.";
leaf lag-interface-id {
type string;
description
"LAG interface identifier.";
}
container member-link-list {
description
"Container for the member link list.";
list member-link {
key "name";
description
"Member link.";
leaf name {
type string;
description
"Member link name.";
}
}
}
}
}
// IPv4 connection
grouping ipv4-connection {
description
"IPv4-specific connection parameters.";
leaf local-address {
type inet:ipv4-address;
description
"The IPv4 address used at the provider's interface.";
}
uses ac-common:ipv4-allocation-type;
choice allocation-type {
description
"Choice of the IPv4 address allocation.";
case dynamic {
description
"When the addresses are allocated by DHCP or other
dynamic means local to the infrastructure.";
choice address-assign {
description
"A choice for how IPv4 addresses are assigned.";
case number {
leaf number-of-dynamic-address {
type uint16;
description
"Specifies the number of IP addresses to be
assigned to the customer on this access.";
}
}
case explicit {
container customer-addresses {
description
"Container for customer addresses to be allocated
using DHCP.";
list address-pool {
key "pool-id";
description
"Describes IP addresses to be dynamically
allocated.
When only 'start-address' is present, it
represents a single address.
When both 'start-address' and 'end-address' are
specified, it implies a range inclusive of both
addresses.";
leaf pool-id {
type string;
description
"A pool identifier for the address range from
'start-address' to 'end-address'.";
}
leaf start-address {
type inet:ipv4-address;
mandatory true;
description
"Indicates the first address in the pool.";
}
leaf end-address {
type inet:ipv4-address;
description
"Indicates the last address in the pool.";
}
}
}
}
}
choice provider-dhcp {
description
"Parameters related to DHCP-allocated addresses.
IP addresses are allocated by DHCP, which is provided
by the operator.";
leaf dhcp-service-type {
type enumeration {
enum server {
description
"Local DHCP server.";
}
enum relay {
description
"Local DHCP relay. DHCP requests are relayed to a
provider's server.";
}
}
description
"Indicates the type of DHCP service to be enabled on
this access.";
}
choice service-type {
description
"Choice based on the DHCP service type.";
case relay {
description
"Container for a list of the provider's DHCP servers
(i.e., 'dhcp-service-type' is set to 'relay').";
leaf-list server-ip-address {
type inet:ipv4-address;
description
"IPv4 addresses of the provider's DHCP server, for
use by the local DHCP relay.";
}
}
}
}
choice dhcp-relay {
description
"The DHCP relay is provided by the operator.";
container customer-dhcp-servers {
description
"Container for a list of the customer's DHCP servers.";
leaf-list server-ip-address {
type inet:ipv4-address;
description
"IPv4 addresses of the customer's DHCP server.";
}
}
}
}
case static-addresses {
description
"Lists the static IPv4 addresses that are used.";
list address {
key "address-id";
ordered-by user;
description
"Lists the IPv4 addresses that are used. The first
address of the list is the primary address of the
connection.";
leaf address-id {
type string;
description
"An identifier of the static IPv4 address.";
}
leaf customer-address {
type inet:ipv4-address;
description
"An IPv4 address of the customer side.";
}
uses failure-detection-profile-reference;
}
}
}
}
grouping ipv6-connection {
description
"IPv6-specific connection parameters.";
leaf local-address {
type inet:ipv6-address;
description
"IPv6 address of the provider side.";
}
uses ac-common:ipv6-allocation-type;
choice allocation-type {
description
"Choice of the IPv6 address allocation.";
case dynamic {
description
"When the addresses are allocated by DHCP or other
dynamic means local to the infrastructure.";
choice address-assign {
description
"A choice for how IPv6 addresses are assigned.";
case number {
leaf number-of-dynamic-address {
type uint16;
description
"Specifies the number of IP addresses to be
assigned to the customer on this access.";
}
}
case explicit {
container customer-addresses {
description
"Container for customer addresses to be allocated
using DHCP.";
list address-pool {
key "pool-id";
description
"Describes IPv6 addresses to be dynamically
allocated.
When only 'start-address' is present, it
represents a single address.
When both 'start-address' and 'end-address' are
specified, it implies a range inclusive of both
addresses.";
leaf pool-id {
type string;
description
"A pool identifier for the address range from
'start-address' to 'end-address'.";
}
leaf start-address {
type inet:ipv6-address;
mandatory true;
description
"Indicates the first address in the pool.";
}
leaf end-address {
type inet:ipv6-address;
description
"Indicates the last address in the pool.";
}
}
}
}
}
choice provider-dhcp {
description
"Parameters related to DHCP-allocated addresses.
IP addresses are allocated by DHCP, which is provided
by the operator.";
leaf dhcp-service-type {
type enumeration {
enum server {
description
"Local DHCP server.";
}
enum relay {
description
"Local DHCP relay. DHCP requests are relayed to
a provider's server.";
}
}
description
"Indicates the type of DHCP service to be enabled on
this access.";
}
choice service-type {
description
"Choice based on the DHCP service type.";
case relay {
description
"Container for a list of the provider's DHCP servers
(i.e., 'dhcp-service-type' is set to 'relay').";
leaf-list server-ip-address {
type inet:ipv6-address;
description
"IPv6 addresses of the provider's DHCP server, for
use by the local DHCP relay.";
}
}
}
}
choice dhcp-relay {
description
"The DHCP relay is provided by the operator.";
container customer-dhcp-servers {
description
"Container for a list of the customer's DHCP servers.";
leaf-list server-ip-address {
type inet:ipv6-address;
description
"IPv6 addresses of the customer's DHCP servers.";
}
}
}
}
case static-addresses {
description
"Lists the static IPv6 addresses that are used.";
list address {
key "address-id";
ordered-by user;
description
"Lists the IPv6 addresses that are used. The first
address of the list is the primary address of
the connection.";
leaf address-id {
type string;
description
"An identifier of the static IPv6 address.";
}
leaf customer-address {
type inet:ipv6-address;
description
"An IPv6 address of the customer side.";
}
uses failure-detection-profile-reference;
}
}
}
}
grouping ip-connection {
description
"Defines IP connection parameters.";
leaf l3-termination-point {
type string;
description
"Specifies a reference to a local Layer 3 termination point,
such as a bridge domain interface.";
}
container ipv4 {
if-feature "vpn-common:ipv4";
description
"IPv4-specific connection parameters.";
uses ipv4-connection;
}
container ipv6 {
if-feature "vpn-common:ipv6";
description
"IPv6-specific connection parameters.";
uses ipv6-connection;
}
}
/* Routing */
//BGP base parameters
grouping bgp-base {
description
"Configuration specific to BGP.";
leaf description {
type string;
description
"Includes a description of the BGP session. This description
is meant to be used for diagnostic purposes. The semantics
of the description are local to an implementation.";
}
uses rt-pol:apply-policy-group;
leaf local-as {
type inet:as-number;
description
"Indicates a local Autonomous System Number (ASN), if an ASN
distinct from the ASN configured at the AC level is
needed.";
}
leaf peer-as {
type inet:as-number;
mandatory true;
description
"Indicates the customer's ASN when the customer requests BGP
routing.";
}
leaf address-family {
type identityref {
base vpn-common:address-family;
}
description
"This node contains the address families to be activated.
'dual-stack' means that both IPv4 and IPv6 will be
activated.";
}
leaf role {
type identityref {
base ac-common:bgp-role;
}
description
"Specifies the BGP role (provider, customer, peer, etc.).";
}
leaf multihop {
type uint8;
description
"Describes the number of IP hops allowed between a given BGP
neighbor and the PE.";
}
leaf as-override {
type boolean;
description
"Defines whether ASN override is enabled, i.e., replacing the
ASN of the customer specified in the AS_PATH attribute with
the local ASN.";
}
leaf allow-own-as {
type uint8;
description
"If set, specifies the maximum number of occurrences of the
provider's ASN that are permitted within the AS_PATH
before it is rejected.";
}
leaf prepend-global-as {
type boolean;
description
"In some situations, the ASN that is provided at the node
level may be distinct from the ASN configured at the AC.
When such ASNs are provided, they are both prepended to the
BGP route updates for this AC. To disable that behavior,
'prepend-global-as' must be set to 'false'. In such a
case, the ASN that is provided at the node level is not
prepended to the BGP route updates for this access.";
}
leaf send-default-route {
type boolean;
description
"Defines whether default routes can be advertised to a peer.
If set to 'true', the default routes are advertised to
a peer.";
}
leaf site-of-origin {
when "derived-from-or-self(../address-family, "
+ "'vpn-common:ipv4' or 'vpn-common:dual-stack')" {
description
"Only applies if IPv4 is activated.";
}
type rt-types:route-origin;
description
"The Site of Origin attribute is encoded as a Route Origin
Extended Community. It is meant to uniquely identify the
set of routes learned from a site via a particular AC and
is used to prevent routing loops.";
reference
"RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs),
Section 7";
}
leaf ipv6-site-of-origin {
when "derived-from-or-self(../address-family, "
+ "'vpn-common:ipv6' or 'vpn-common:dual-stack')" {
description
"Only applies if IPv6 is activated.";
}
type rt-types:ipv6-route-origin;
description
"The IPv6 Site of Origin attribute is encoded as an IPv6
Route Origin Extended Community. It is meant to uniquely
identify the set of routes learned from a site.";
reference
"RFC 5701: IPv6 Address Specific BGP Extended Community
Attribute";
}
list redistribute-connected {
key "address-family";
description
"Indicates, per address family, the policy to follow for
connected routes.";
leaf address-family {
type identityref {
base vpn-common:address-family;
}
description
"Indicates the address family.";
}
leaf enabled {
type boolean;
description
"Enables, when set to 'true', the redistribution of
connected routes.";
}
}
container bgp-max-prefix {
description
"Controls the behavior when a prefix maximum is reached.";
leaf max-prefix {
type uint32;
description
"Indicates the maximum number of BGP prefixes allowed in
the BGP session.
It allows control of how many prefixes can be received
from a neighbor.
If the limit is exceeded, the action indicated in
'violate-action' will be followed.";
reference
"RFC 4271: A Border Gateway Protocol 4 (BGP-4),
Section 8.2.2";
}
leaf warning-threshold {
type decimal64 {
fraction-digits 5;
range "0..100";
}
units "percent";
description
"When this value is reached, a warning notification will be
triggered.";
}
leaf violate-action {
type enumeration {
enum warning {
description
"Only a warning message is sent to the peer when the
limit is exceeded.";
}
enum discard-extra-paths {
description
"Discards extra paths when the limit is exceeded.";
}
enum restart {
description
"The BGP session restarts after the indicated time
interval.";
}
}
description
"If the BGP neighbor 'max-prefix' limit is reached, the
action indicated in 'violate-action' will be followed.";
}
leaf restart-timer {
type uint32;
units "seconds";
description
"Time interval after which the BGP session will be
reestablished.";
}
}
container bgp-timers {
description
"Includes two BGP timers.";
leaf keepalive {
type uint16 {
range "0..21845";
}
units "seconds";
description
"This timer indicates the KEEPALIVE messages' frequency
between a PE and a BGP peer.
If set to '0', it indicates that KEEPALIVE messages are
disabled.
It is suggested that the maximum time between KEEPALIVE
messages be one-third of the Hold Time interval.";
reference
"RFC 4271: A Border Gateway Protocol 4 (BGP-4),
Section 4.4";
}
leaf hold-time {
type uint16 {
range "0 | 3..65535";
}
units "seconds";
description
"Indicates the maximum number of seconds that may elapse
between the receipt of successive KEEPALIVE and/or UPDATE
messages from the peer.
The Hold Time must be either zero or at least three
seconds.";
reference
"RFC 4271: A Border Gateway Protocol 4 (BGP-4),
Section 4.2";
}
}
}
grouping bgp-base-peer-group {
description
"Grouping for a basic BGP peer group.";
leaf name {
type string;
description
"Name of the BGP peer group.";
}
uses bgp-base;
}
grouping bgp-base-peer-group-list {
description
"Grouping for a list of basic BGP peer groups.";
list peer-group {
key "name";
description
"List of BGP peer groups uniquely identified by a name.";
uses bgp-base-peer-group;
}
}
grouping bgp-peer-group {
description
"Grouping for BGP peer group.";
leaf name {
type string;
description
"Name of the BGP peer group";
}
leaf local-address {
type union {
type inet:ip-address;
type if:interface-ref;
}
description
"Sets the local IP address to use for the BGP transport
session. This may be expressed as either an IP
address or a reference to an interface.";
}
uses bgp-base;
uses ac-common:bgp-authentication;
}
grouping bgp-peer-group-list {
description
"Grouping for a list of BGP peer groups.";
list peer-group {
key "name";
description
"List of BGP peer groups uniquely identified by a name.";
uses bgp-peer-group;
}
}
// RIP base parameters
grouping rip-base {
description
"Configuration specific to RIP routing.";
leaf address-family {
type identityref {
base vpn-common:address-family;
}
description
"Indicates whether IPv4, IPv6, or both address families are
to be activated.";
}
container timers {
description
"Indicates the RIP timers.";
reference
"RFC 2080: RIPng for IPv6
RFC 2453: RIP Version 2";
leaf update-interval {
type uint16 {
range "1..32767";
}
units "seconds";
description
"Indicates the RIP update time, i.e., the amount of time
for which RIP updates are sent.";
}
leaf invalid-interval {
type uint16 {
range "1..32767";
}
units "seconds";
description
"The interval before a route is declared invalid after no
updates are received. This value is at least three times
the value for the 'update-interval' argument.";
}
leaf holddown-interval {
type uint16 {
range "1..32767";
}
units "seconds";
description
"Specifies the interval before better routes are
released.";
}
leaf flush-interval {
type uint16 {
range "1..32767";
}
units "seconds";
description
"Indicates the RIP flush timer, i.e., the amount of time
that must elapse before a route is removed from the
routing table.";
}
}
leaf default-metric {
type uint8 {
range "0..16";
}
description
"Sets the default metric.";
}
}
// Routing profile
grouping routing-profile {
description
"Defines profiles for routing protocols.";
list routing-protocol {
key "id";
description
"List of routing protocols used on the AC.";
leaf id {
type string;
description
"Unique identifier for the routing protocol.";
}
leaf type {
type identityref {
base vpn-common:routing-protocol-type;
}
description
"Type of routing protocol.";
}
container bgp {
when "derived-from-or-self(../type, "
+ "'vpn-common:bgp-routing')" {
description
"Only applies when the protocol is BGP.";
}
if-feature "vpn-common:rtg-bgp";
description
"Configuration specific to BGP.";
container peer-groups {
description
"Lists a set of BGP peer groups.";
uses bgp-base-peer-group-list;
}
}
container ospf {
when "derived-from-or-self(../type, "
+ "'vpn-common:ospf-routing')" {
description
"Only applies when the protocol is OSPF.";
}
if-feature "vpn-common:rtg-ospf";
description
"Configuration specific to OSPF.";
uses ac-common:ospf-basic;
leaf max-lsa {
type uint32 {
range "1..4294967294";
}
description
"Maximum number of allowed Link State Advertisements
(LSAs) that the OSPF instance will accept.";
}
leaf passive {
type boolean;
description
"When set to 'true', enables a passive interface. It is
active when set to 'false'. A passive interface's
prefix will be advertised, but no neighbor adjacencies
will be formed on the interface.";
}
}
container isis {
when "derived-from-or-self(../type, "
+ "'vpn-common:isis-routing')" {
description
"Only applies when the protocol is IS-IS.";
}
if-feature "vpn-common:rtg-isis";
description
"Configuration specific to IS-IS.";
uses ac-common:isis-basic;
leaf level {
type identityref {
base vpn-common:isis-level;
}
description
"Can be 'level-1', 'level-2', or 'level-1-2'.";
reference
"RFC 9181: A Common YANG Data Model for Layer 2
and Layer 3 VPNs";
}
leaf metric {
type uint32 {
range "0 .. 16777215";
}
description
"Metric of the AC. It is used in the routing state
calculation and path selection.";
}
leaf passive {
type boolean;
description
"When set to 'false', the interface is active. In such
mode, the interface sends or receives IS-IS protocol
control packets.
When set to 'true', the interface is passive. That
is, it suppresses the sending of IS-IS updates through
the specified interface.";
}
}
container rip {
when "derived-from-or-self(../type, "
+ "'vpn-common:rip-routing')" {
description
"Only applies when the protocol is RIP.";
}
if-feature "vpn-common:rtg-rip";
description
"Configuration specific to RIP routing.";
uses rip-base;
}
container vrrp {
when "derived-from-or-self(../type, "
+ "'vpn-common:vrrp-routing')" {
description
"Only applies when the protocol is the Virtual Router
Redundancy Protocol (VRRP).";
}
if-feature "vpn-common:rtg-vrrp";
description
"Configuration specific to VRRP.";
reference
"RFC 9568: Virtual Router Redundancy Protocol (VRRP)
Version 3 for IPv4 and IPv6";
leaf address-family {
type identityref {
base vpn-common:address-family;
}
description
"Indicates whether IPv4, IPv6, or both address families
are to be enabled.";
}
leaf ping-reply {
type boolean;
description
"Controls whether the VRRP speaker should reply to ping
requests. Such behavior is enabled, if set to 'true'.";
}
}
}
}
grouping routing {
description
"Defines routing protocols.";
list routing-protocol {
key "id";
description
"List of routing protocols used on the AC.";
leaf id {
type string;
description
"Unique identifier for the routing protocol.";
}
leaf type {
type identityref {
base vpn-common:routing-protocol-type;
}
description
"Type of routing protocol.";
}
list routing-profile {
key "routing-profile-ref";
description
"Routing profiles.";
uses routing-profile-reference;
leaf type {
type identityref {
base vpn-common:ie-type;
}
description
"Import, export, or both.";
}
}
container static {
when "derived-from-or-self(../type, "
+ "'vpn-common:static-routing')" {
description
"Only applies when the protocol is static routing.";
}
description
"Configuration specific to static routing.";
container cascaded-lan-prefixes {
description
"LAN prefixes from the customer.";
list ipv4-lan-prefix {
if-feature "vpn-common:ipv4";
key "lan next-hop";
description
"List of LAN prefixes for the site.";
uses ac-common:ipv4-static-rtg-entry;
uses bfd-routing;
leaf preference {
type uint32;
description
"Indicates the preference associated with the static
route.";
}
uses ac-common:service-status;
}
list ipv6-lan-prefix {
if-feature "vpn-common:ipv6";
key "lan next-hop";
description
"List of LAN prefixes for the site.";
uses ac-common:ipv6-static-rtg-entry;
uses bfd-routing;
leaf preference {
type uint32;
description
"Indicates the preference associated with the static
route.";
}
uses ac-common:service-status;
}
}
}
container bgp {
when "derived-from-or-self(../type, "
+ "'vpn-common:bgp-routing')" {
description
"Only applies when the protocol is BGP.";
}
if-feature "vpn-common:rtg-bgp";
description
"Configuration specific to BGP.";
container peer-groups {
description
"Configuration for BGP peer groups";
uses bgp-peer-group-list;
}
list neighbor {
key "remote-address";
description
"List of BGP neighbors.";
leaf remote-address {
type inet:ip-address;
description
"The remote IP address of this entry's BGP peer.";
}
leaf local-address {
type union {
type inet:ip-address;
type if:interface-ref;
}
description
"Sets the local IP address to use for the BGP transport
session. This may be expressed as either an IP
address or a reference to an interface.";
}
leaf peer-group {
type leafref {
path "../../peer-groups/peer-group/name";
}
description
"The peer group with which this neighbor is
associated.";
}
uses bgp-base;
uses bfd-routing;
uses ac-common:bgp-authentication;
uses ac-common:service-status;
}
}
container ospf {
when "derived-from-or-self(../type, "
+ "'vpn-common:ospf-routing')" {
description
"Only applies when the protocol is OSPF.";
}
if-feature "vpn-common:rtg-ospf";
description
"Configuration specific to OSPF.";
uses ac-common:ospf-basic;
container sham-links {
if-feature "vpn-common:rtg-ospf-sham-link";
description
"List of sham links.";
reference
"RFC 4577: OSPF as the Provider/Customer Edge Protocol
for BGP/MPLS IP Virtual Private Networks
(VPNs), Section 4.2.7
RFC 6565: OSPFv3 as a Provider Edge to Customer Edge
(PE-CE) Routing Protocol, Section 5";
list sham-link {
key "target-site";
description
"Creates a sham link with another site.";
leaf target-site {
type string;
description
"Target site for the sham link connection. The site
is referred to by its identifier.";
}
leaf metric {
type uint16;
description
"Metric of the sham link. It is used in the routing
state calculation and path selection.";
reference
"RFC 4577: OSPF as the Provider/Customer Edge
Protocol for BGP/MPLS IP Virtual Private
Networks (VPNs), Section 4.2.7.3
RFC 6565: OSPFv3 as a Provider Edge to Customer Edge
(PE-CE) Routing Protocol, Section 5.2";
}
}
}
leaf max-lsa {
type uint32 {
range "1..4294967294";
}
description
"Maximum number of allowed Link State Advertisements
(LSAs) that the OSPF instance will accept.";
}
leaf passive {
type boolean;
description
"When set to 'true', enables a passive interface. It is
active when set to 'false'. A passive interface's
prefix will be advertised, but no neighbor adjacencies
will be formed on the interface.";
}
uses ac-common:ospf-authentication;
uses ac-common:service-status;
}
container isis {
when "derived-from-or-self(../type, "
+ "'vpn-common:isis-routing')" {
description
"Only applies when the protocol is IS-IS.";
}
if-feature "vpn-common:rtg-isis";
description
"Configuration specific to IS-IS.";
uses ac-common:isis-basic;
leaf level {
type identityref {
base vpn-common:isis-level;
}
description
"Can be 'level-1', 'level-2', or 'level-1-2'.";
reference
"RFC 9181: A Common YANG Data Model for Layer 2 and
Layer 3 VPNs";
}
leaf metric {
type uint32 {
range "0 .. 16777215";
}
description
"Metric of the AC. It is used in the routing state
calculation and path selection.";
}
leaf passive {
type boolean;
description
"When set to 'false', the interface is active. In such
mode, the interface sends or receives IS-IS protocol
control packets.
When set to 'true', the interface is passive. That
is, it suppresses the sending of IS-IS updates through
the specified interface.";
}
uses ac-common:isis-authentication;
uses ac-common:service-status;
}
container rip {
when "derived-from-or-self(../type, "
+ "'vpn-common:rip-routing')" {
description
"Only applies when the protocol is RIP.
For IPv4, the model assumes that RIP version 2
is used.";
}
if-feature "vpn-common:rtg-rip";
description
"Configuration specific to RIP routing.";
uses rip-base;
uses ac-common:rip-authentication;
uses ac-common:service-status;
}
container vrrp {
when "derived-from-or-self(../type, "
+ "'vpn-common:vrrp-routing')" {
description
"Only applies when the protocol is VRRP.";
}
if-feature "vpn-common:rtg-vrrp";
description
"Configuration specific to VRRP.";
reference
"RFC 9568: Virtual Router Redundancy Protocol (VRRP)
Version 3 for IPv4 and IPv6";
leaf address-family {
type identityref {
base vpn-common:address-family;
}
description
"Indicates whether IPv4, IPv6, or both address families
are to be enabled.";
}
leaf vrrp-group {
type uint8 {
range "1..255";
}
description
"Includes the VRRP group identifier.";
}
leaf backup-peer {
type inet:ip-address;
description
"Indicates the IP address of the peer.";
}
leaf-list virtual-ip-address {
type inet:ip-address;
description
"Virtual IP addresses for a single VRRP group.";
reference
"RFC 9568: Virtual Router Redundancy Protocol (VRRP)
Version 3 for IPv4 and IPv6, Sections 1.2
and 1.3";
}
leaf priority {
type uint8 {
range "1..254";
}
description
"Sets the local priority of the VRRP speaker.";
}
leaf ping-reply {
type boolean;
description
"Controls whether the VRRP speaker should reply to ping
requests.";
}
uses ac-common:service-status;
}
}
}
// OAM
grouping bfd {
description
"Grouping for BFD.";
leaf session-type {
type identityref {
base vpn-common:bfd-session-type;
}
description
"Specifies the BFD session type.";
}
leaf desired-min-tx-interval {
type uint32;
units "microseconds";
description
"The minimum interval between transmissions of BFD Control
packets, as desired by the operator.";
reference
"RFC 5880: Bidirectional Forwarding Detection (BFD),
Section 6.8.7";
}
leaf required-min-rx-interval {
type uint32;
units "microseconds";
description
"The minimum interval between received BFD Control packets
that the PE should support.";
reference
"RFC 5880: Bidirectional Forwarding Detection (BFD),
Section 6.8.7";
}
leaf local-multiplier {
type uint8 {
range "1..255";
}
description
"Specifies the detection multiplier that is transmitted to a
BFD peer.
The detection interval for the receiving BFD peer is
calculated by multiplying the value of the negotiated
transmission interval by the received detection multiplier
value.";
reference
"RFC 5880: Bidirectional Forwarding Detection (BFD),
Section 6.8.7";
}
leaf holdtime {
type uint32;
units "milliseconds";
description
"Expected BFD holdtime.
The customer may impose some fixed values for the holdtime
period if the provider allows the customer to use this
function.";
reference
"RFC 5880: Bidirectional Forwarding Detection (BFD),
Section 6.8.18";
}
}
grouping bfd-routing {
description
"Defines a basic BFD grouping for routing configuration.";
container bfd {
if-feature "vpn-common:bfd";
description
"BFD control for this neighbor.";
leaf enabled {
type boolean;
description
"Enables BFD if set to 'true'. BFD is disabled if set to
'false'.";
}
uses failure-detection-profile-reference;
}
}
grouping oam {
description
"Defines the Operations, Administration, and Maintenance
(OAM) mechanisms used.";
container bfd {
if-feature "vpn-common:bfd";
description
"Container for BFD.";
list session {
key "dest-addr";
description
"List of IP sessions.";
leaf dest-addr {
type inet:ip-address;
description
"IP address of the peer.";
}
leaf source-address {
type union {
type inet:ip-address;
type if:interface-ref;
}
description
"Sets the local IP address to use for the BFD session.
This may be expressed as either an IP address or
a reference to an interface.";
}
uses failure-detection-profile-reference;
uses bfd;
container authentication {
presence "Enables BFD authentication";
description
"Parameters for BFD authentication.";
leaf key-chain {
type key-chain:key-chain-ref;
description
"Name of the key chain.";
}
leaf meticulous {
type boolean;
description
"Enables meticulous mode, if set to 'true'.";
reference
"RFC 5880: Bidirectional Forwarding Detection (BFD),
Section 6.7";
}
}
uses ac-common:service-status;
}
}
}
// Security
grouping security {
description
"Security parameters for an AC.";
container encryption {
if-feature "vpn-common:encryption";
description
"Container for AC encryption.";
leaf enabled {
type boolean;
description
"If set to 'true', traffic encryption on the connection is
required. Otherwise, it is disabled.";
}
leaf layer {
when "../enabled = 'true'" {
description
"Included only when encryption is enabled.";
}
type enumeration {
enum layer2 {
description
"Encryption occurs at Layer 2.";
}
enum layer3 {
description
"Encryption occurs at Layer 3. For example, IPsec
may be used when a customer requests Layer 3
encryption.";
}
}
description
"Indicates the layer on which encryption is applied.";
}
}
container encryption-profile {
when "../encryption/enabled = 'true'" {
description
"Indicates the layer on which encryption is enabled.";
}
description
"Container for the encryption profile.";
choice profile {
description
"Choice for the encryption profile.";
case provider-profile {
uses encryption-profile-reference;
}
case customer-profile {
leaf customer-key-chain {
type key-chain:key-chain-ref;
description
"Customer-supplied key chain.";
}
}
}
}
}
// AC profile
grouping ac-profile {
description
"Grouping for AC profiles.";
container routing-protocols {
description
"Defines routing protocols.";
uses routing-profile;
}
container oam {
description
"Defines the OAM mechanisms used for the AC profile.";
container bfd {
if-feature "vpn-common:bfd";
description
"Container for BFD.";
uses bfd;
}
}
}
// Parent and Child ACs
grouping ac-hierarchy {
description
"Container for Parent and Child AC references.";
container parent-ref {
description
"Specifies the Parent AC that is inherited by an AC.
Parent ACs are used, e.g., in contexts where multiple
CEs are terminating the same AC, but some specific
information is required for each peer SAP.";
uses ac-ntw:attachment-circuit-reference;
}
container child-ref {
config false;
description
"Specifies a Child AC that relies upon a Parent AC.";
uses ac-ntw:attachment-circuit-references;
}
}
// AC network provisioning
grouping ac {
description
"Grouping for ACs.";
leaf description {
type string;
description
"Associates a description with an AC.";
}
container l2-connection {
if-feature "ac-common:layer2-ac";
description
"Defines Layer 2 protocols and parameters that are required
to enable AC connectivity.";
uses l2-connection-if-ref;
}
container ip-connection {
if-feature "ac-common:layer3-ac";
description
"Defines IP connection parameters.";
uses ip-connection;
}
container routing-protocols {
description
"Defines routing protocols.";
uses routing;
}
container oam {
description
"Defines the OAM mechanisms used for the AC.";
uses oam;
}
container security {
description
"AC-specific security parameters.";
uses security;
}
container service {
description
"AC-specific bandwidth parameters.";
leaf mtu {
type uint32;
units "bytes";
description
"Layer 2 MTU.";
}
uses ac-svc:bandwidth;
container qos {
if-feature "vpn-common:qos";
description
"QoS configuration.";
container qos-profiles {
description
"QoS profile configuration.";
list qos-profile {
key "qos-profile-ref";
description
"Points to a QoS profile.";
uses qos-profile-reference;
leaf direction {
type identityref {
base vpn-common:qos-profile-direction;
}
description
"The direction to which the QoS profile is applied.";
}
}
}
}
container access-control-list {
description
"Container for the Access Control List (ACL).";
container acl-profiles {
description
"ACL profile configuration.";
list acl-profile {
key "forwarding-profile-ref";
description
"Points to an ACL profile.";
uses forwarding-profile-reference;
}
}
}
}
}
augment "/nw:networks/nw:network" {
description
"Add a list of profiles.";
container specific-provisioning-profiles {
description
"Contains a set of valid profiles to reference in the AC
activation.";
uses ac-common:ac-profile-cfg;
}
list ac-profile {
key "name";
description
"Specifies a list of AC profiles.";
leaf name {
type string;
description
"Name of the AC.";
}
uses ac-ntw:ac-profile;
}
}
augment "/nw:networks/nw:network/nw:node" {
when '../nw:network-types/sap:sap-network' {
description
"Augmentation parameters apply only for SAP networks.";
}
description
"Augments nodes with AC provisioning details.";
list ac {
key "name";
description
"List of ACs.";
leaf name {
type string;
description
"A name that identifies the AC locally.";
}
leaf svc-ref {
type ac-svc:attachment-circuit-reference;
description
"A reference to the AC as exposed at the service level.";
}
list profile {
key "ac-profile-ref";
description
"List of AC profiles.";
uses ac-profile-reference;
}
uses ac-hierarchy;
leaf-list peer-sap-id {
type string;
description
"One or more peer SAPs can be indicated.";
}
uses ac-common:redundancy-group;
uses ac-common:service-status;
uses ac-ntw:ac;
}
}
augment "/nw:networks/nw:network/nw:node"
+ "/sap:service/sap:sap" {
when '../../../nw:network-types/sap:sap-network' {
description
"Augmentation parameters apply only for SAP networks.";
}
description
"Augments SAPs with AC provisioning details.";
list ac {
key "ac-ref";
description
"Specifies the ACs that are terminated by the SAP.";
uses ac-ntw:attachment-circuit-reference;
}
}
}