Sub-interface VLAN YANG Data Models
draft-ietf-netmod-sub-intf-vlan-model-19
| Document | Type | Active Internet-Draft (netmod WG) | |
|---|---|---|---|
| Authors | Robert Wilton , Scott Mansfield | ||
| Last updated | 2026-11-10 (Latest revision 2026-11-02) | ||
| Replaces | draft-wilton-netmod-intf-vlan-yang | ||
| RFC stream | Internet Engineering Task Force (IETF) | ||
| Intended RFC status | Proposed Standard | ||
| Formats | |||
| Yang Validation | 0 errors, 0 warnings | ||
| Reviews |
INTDIR Early review
(of
-17)
by Darren Dukes
Ready w/issues
GENART IETF Last Call review
(of
-17)
by Sue Hares
Ready w/issues
YANGDOCTORS Early review
(of
-14)
by Per Andersson
Ready w/nits
|
||
| Additional resources |
Yang catalog entry for ietf-if-flexible-encapsulation@2026-07-06.yang
Yang catalog entry for ietf-if-vlan-encapsulation@2026-07-06.yang Yang impact analysis for draft-ietf-netmod-sub-intf-vlan-model Mailing list discussion |
||
| Stream | WG state | Submitted to IESG for Publication | |
| Document shepherd | Lou Berger | ||
| Shepherd write-up | Show Last changed 2025-06-09 | ||
| IESG | IESG state | IESG Evaluation | |
| Action Holder | |||
| Consensus boilerplate | Yes | ||
| Telechat date |
(None)
Needs 9 more YES or NO OBJECTION positions to pass. |
||
| Responsible AD | Mahesh Jethanandani | ||
| Send notices to | Lou Berger <lberger@labn.net> | ||
| IANA | IANA review state | Version Changed - Review Needed | |
| IANA expert review state | Expert Reviews OK |
draft-ietf-netmod-sub-intf-vlan-model-19
Internet Engineering Task Force R.G. Wilton, Ed.
Internet-Draft Cisco Systems
Intended status: Standards Track S. Mansfield, Ed.
Expires: 6 May 2027 Ericsson
2 November 2026
Sub-interface VLAN YANG Data Models
draft-ietf-netmod-sub-intf-vlan-model-19
Abstract
This document defines YANG modules to add support for classifying
traffic received on interfaces as Ethernet/VLAN framed packets to
sub-interfaces based on the fields available in the Ethernet/VLAN
frame headers. These modules allow configuration of Layer 3 (L3) and
Layer 2 (L2) sub-interfaces (e.g., L2VPN attachment circuits) that
can interoperate with IETF based forwarding protocols, such as IP and
L3VPN services, or L2VPN services like Virtual Private Wire Service
(VPWS), Virtual Private LAN Service (VPLS), and EVPN. The sub-
interfaces also interoperate with VLAN tagged traffic originating
from an IEEE 802.1Q compliant bridge.
The model differs from an IEEE 802.1Q bridge model in that the
configuration is interface/sub-interface based as opposed to being
based on membership of an 802.1Q VLAN bridge.
The YANG data models in this document conforms to the Network
Management Datastore Architecture (NMDA) defined in RFC 8342.
Status of This Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
This Internet-Draft will expire on 6 May 2027.
Wilton & Mansfield Expires 6 May 2027 [Page 1]
Internet-Draft Sub-interface VLAN YANG November 2026
Copyright Notice
Copyright (c) 2026 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents (https://trustee.ietf.org/
license-info) in effect on the date of publication of this document.
Please review these documents carefully, as they describe your rights
and restrictions with respect to this document. Code Components
extracted from this document must include Revised BSD License text as
described in Section 4.e of the Trust Legal Provisions and are
provided without warranty as described in the Revised BSD License.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.1. Note to RFC Editor . . . . . . . . . . . . . . . . . 4
1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 4
1.3. Prefixes in Data Node Names . . . . . . . . . . . . . . . 4
2. Objectives . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1. Interoperability with IEEE 802.1Q compliant bridges . . . 5
3. Interface VLAN Encapsulation Model . . . . . . . . . . . . . 5
4. Interface Flexible Encapsulation Model . . . . . . . . . . . 6
5. VLAN Encapsulation YANG Module . . . . . . . . . . . . . . . 9
6. Flexible Encapsulation YANG Module . . . . . . . . . . . . . 12
7. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 22
7.1. Layer 3 sub-interfaces with IPv6 . . . . . . . . . . . . 22
7.2. Layer 2 sub-interfaces with L2VPN . . . . . . . . . . . . 23
8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 25
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 25
9.1. YANG Module Registrations . . . . . . . . . . . . . . . . 25
10. Operational Considerations . . . . . . . . . . . . . . . . . 26
11. Security Considerations . . . . . . . . . . . . . . . . . . . 27
12. References . . . . . . . . . . . . . . . . . . . . . . . . . 27
12.1. Normative References . . . . . . . . . . . . . . . . . . 28
12.2. Informative References . . . . . . . . . . . . . . . . . 29
Appendix A. Comparison with the IEEE 802.1Q Configuration
Model . . . . . . . . . . . . . . . . . . . . . . . . . . 30
A.1. Sub-interface based configuration model overview . . . . 30
A.2. IEEE 802.1Q Bridge Configuration Model Overview . . . . . 31
A.3. Possible Overlap Between the Two Models . . . . . . . . . 31
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 32
Wilton & Mansfield Expires 6 May 2027 [Page 2]
Internet-Draft Sub-interface VLAN YANG November 2026
1. Introduction
This document defines two YANG 1.1 modules [RFC7950] that augment the
encapsulation choice YANG element defined in Interface Extensions
YANG [I-D.ietf-netmod-intf-ext-yang] and the generic interfaces data
model defined in [RFC8343]. The two modules provide configuration
nodes to support classification of Ethernet/VLAN traffic to sub-
interfaces, that can have interface based feature and service
configuration applied to them.
The purpose of these models is to allow IETF defined forwarding
protocols, for example, IPv6 [RFC8200], Ethernet Pseudo Wires
[RFC4448] and VPLS [RFC4761] [RFC4762], when configured via
appropriate YANG data models [RFC8344], to interoperate with VLAN
tagged traffic received from an IEEE 802.1Q compliant bridge.
In the case of layer 2 Ethernet services, the flexible encapsulation
module also supports flexible rewriting of the VLAN tags contained in
the frame header.
For reference, a comparison between the sub-interface based YANG
model documented in this draft and an IEEE 802.1Q bridge model is
described in Appendix A.
In summary, the YANG modules defined in this internet draft are:
ietf-if-vlan-encapsulation.yang - Defines the model for basic
classification of VLAN tagged traffic, normally to L3 packet
forwarding services
ietf-if-flexible-encapsulation.yang - Defines the model for
flexible classification of Ethernet/VLAN traffic, normally to L2
frame forwarding services
1.1. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
The term 'sub-interface' is defined in section 2.6 of Interface
Extensions YANG [I-D.ietf-netmod-intf-ext-yang].
Wilton & Mansfield Expires 6 May 2027 [Page 3]
Internet-Draft Sub-interface VLAN YANG November 2026
1.1.1. Note to RFC Editor
This document uses two placeholder values throughout the document.
Please replace them as follows and remove this note before
publication.
RFC AAAA, where AAAA is the number assigned to I-D.ietf-netmod-intf-
ext-yang at the time of its publication.
RFC BBBB, where BBBB is the number assigned to this document at the
time of publication.
1.2. Tree Diagrams
Tree diagrams used in this document follow the notation defined in
[RFC8340].
1.3. Prefixes in Data Node Names
In this document, names of data nodes and other data model objects
are prefixed using the standard prefix associated with the
corresponding YANG imported modules, as shown in Table 1.
+=========+===================+=================================+
| Prefix | YANG Module | Reference |
+=========+===================+=================================+
| if-vlan | ietf-if-vlan- | This document |
| | encapsulation | |
+---------+-------------------+---------------------------------+
| if-flex | ietf-if-flexible- | This document |
| | encapsulation | |
+---------+-------------------+---------------------------------+
| if-ext | ietf-if- | [I-D.ietf-netmod-intf-ext-yang] |
| | extensions | |
+---------+-------------------+---------------------------------+
| if | ietf-interfaces | [RFC8343] |
+---------+-------------------+---------------------------------+
| ianaift | iana-if-type | [RFC7224] |
+---------+-------------------+---------------------------------+
| dot1q- | ieee802-dot1q- | [IEEE_802.1Q_2022] |
| types | types | |
+---------+-------------------+---------------------------------+
Table 1: Prefixes for imported YANG modules
Wilton & Mansfield Expires 6 May 2027 [Page 4]
Internet-Draft Sub-interface VLAN YANG November 2026
2. Objectives
The primary aim of the YANG modules contained in this draft is to
provide the core model that is required to implement VLAN transport
services on router based devices that is fully compatible with IEEE
802.1Q compliant bridges.
A secondary aim is for the modules to be structured in such a way
that they can be cleanly extended in the future.
2.1. Interoperability with IEEE 802.1Q compliant bridges
The modules defined in this document are designed to fully
interoperate with IEEE 802.1Q compliant bridges. In particular, the
models are restricted to only matching, adding, or rewriting the
802.1Q VLAN tags in frames in ways that are compatible with IEEE
802.1Q compliant bridges.
3. Interface VLAN Encapsulation Model
The Interface VLAN encapsulation model provides appropriate leaves
for termination of an 802.1Q VLAN tagged segment to a sub-interface
(or interface) based L3 service, such as IP. It allows for
termination of traffic with one or two 802.1Q VLAN tags.
The L3 service is configured via a separate YANG data model, e.g.,
[RFC8344]. A short example of configuring 802.1Q VLAN sub-interfaces
with IP using YANG is provided in Section 7.1.
The "ietf-if-vlan-encapsulation" YANG module has the following
structure:
module: ietf-if-vlan-encapsulation
augment /if:interfaces/if:interface/if-ext:encapsulation
/if-ext:encaps-type:
+--:(dot1q-vlan)
+--rw dot1q-vlan
+--rw outer-tag
| +--rw tag-type dot1q-tag-type
| +--rw vlan-id vlanid
+--rw second-tag!
+--rw tag-type dot1q-tag-type
+--rw vlan-id vlanid
Wilton & Mansfield Expires 6 May 2027 [Page 5]
Internet-Draft Sub-interface VLAN YANG November 2026
4. Interface Flexible Encapsulation Model
The Interface Flexible Encapsulation model is designed to allow for
the flexible provisioning of layer 2 services. It provides the
capability to classify and demultiplex Ethernet/VLAN frames received
on an Ethernet trunk interface to sub-interfaces based on the fields
available in the layer 2 headers. Once classified to sub-interfaces,
it provides the capability to selectively modify fields within the
layer 2 frame header before the frame is handed off to the
appropriate forwarding code for further handling. The forwarding
instance, e.g., L2VPN, VPLS, etc., is configured using a separate
YANG configuration model defined elsewhere.
+-----------+------------+-----------+------------+---------+
|Destination|Source MAC |S-Tag |C-Tag |EtherType|
|MAC (6B) |Address (6B)|- Outer Tag|- Second Tag|or Length|
+-----------+------------+-----------+------------+---------+
|Payload (46-1500B) |
+-----------------------------------------------------------+
The model supports a common core set of layer 2 header matches based
on the 802.1Q tag type and VLAN Ids contained within the header up to
a tag stack depth of two tags. When there are two tags, there is an
outer tag and a second-tag (inner).
For flexible matching, the device MUST NOT allow match configurations
on different sub-interfaces that give rise to ambiguous
classification of ingress traffic to different sub-interfaces. Where
more than one sub-interface match could apply, frames MUST be
classified using the following order, from most specific to least
specific:
1. Two explicit tag matches or tag range matches.
2. An explicit outer tag or tag range match with an inner tag match
of "any", or an outer tag match of "any" with an explicit inner
tag or tag range match.
3. A single explicit tag match or tag range match (which matches the
outermost tag).
4. Priority tagged.
5. Untagged.
6. Default.
Wilton & Mansfield Expires 6 May 2027 [Page 6]
Internet-Draft Sub-interface VLAN YANG November 2026
The device MUST NOT allow match configurations at the same level of
this ordering that can match the same frame, including overlapping
two-tag or tag-range matches, or one sub-interface matching an outer
tag or tag range with an inner tag match of "any" and another sub-
interface matching an outer tag match of "any" with the same inner
tag or tag range.
The "match-exact-tags" leaf does not affect this precedence ordering.
Instead, "match-exact-tags" is used to indicate whether the
classification should be strict in the number of 802.1Q VLAN tags on
the frame, or allow frames that have additional 802.1Q VLAN tags. In
the case that additional 802.1Q VLAN tags are allowed, then for this
model's purposes, the additional tags are treated as part of the
opaque payload of the frame, and have no bearing on any other
operations.
If other YANG modules augment additional matching capabilities into
this model, then they MUST specify how their precedence ordering
refines the classification rules above, and they MUST NOT change the
precedence ordering for S-VLAN or C-VLAN tag matches defined in this
document.
The model supports flexible rewrites of the layer 2 frame header for
data frames as they are processed on the interface. It defines a set
of standard tag manipulations that allow for the insertion, removal,
or rewrite of one or two 802.1Q VLAN tags. The expectation is that
tag manipulations are generally implemented in a symmetrical fashion
between the ingress and egress direction of the same interface.
I.e., if a particular manipulation is performed on ingress traffic on
an interface then the equivalent reverse manipulation is always
performed on egress traffic out of the same interface, so that
ingress/egress traffic on the same interface is always encapsulated
on the wire in the same way. However, the model does also allow for
asymmetrical rewrites, which may be required to implement some
forwarding models (such as E-Tree).
The model also allows a flexible encapsulation and rewrite to be
configured directly on an Ethernet or Link Aggregation Group (LAG)
interface without configuring separate child sub-interfaces. Ingress
frames that do not match the encapsulation MUST be dropped and
counted against the "in-discard-unknown-encaps" counter specified in
[I-D.ietf-netmod-intf-ext-yang]. Egress frames MUST conform to the
encapsulation.
The final aim for the model design is for it to be cleanly extensible
to add in additional match and rewrite criteria of the layer 2
header, such as matching on the source or destination Media Access
Control (MAC) address, Priority Code Point (PCP), or Drop Eligibility
Wilton & Mansfield Expires 6 May 2027 [Page 7]
Internet-Draft Sub-interface VLAN YANG November 2026
Indicator (DEI) fields in the 802.1Q tags, or the EtherType of the
frame payload. Rewrites can also be extended to allow for
modification of other fields within the layer 2 frame header.
In summary, the model provides a binding that defines how services
are bound to an interface or sub-interface providing a mechanism to
pass traffic to/from interface/sub-interface to a service.
A short example of configuring 802.1Q VLAN sub-interfaces with L2VPN
using YANG is provided in Section 7.2.
The "ietf-if-flexible-encapsulation" YANG module has the following
structure:
module: ietf-if-flexible-encapsulation
augment /if:interfaces/if:interface/if-ext:encapsulation
/if-ext:encaps-type:
+--:(flexible)
+--rw flexible
+--rw match
| +--rw (match-type)
| +--:(default)
| | +--rw default? empty
| +--:(untagged)
| | +--rw untagged? empty
| +--:(dot1q-priority-tagged)
| | +--rw dot1q-priority-tagged
| | +--rw tag-type dot1q-types:dot1q-tag-type
| +--:(dot1q-vlan-tagged)
| +--rw dot1q-vlan-tagged
| +--rw outer-tag
| | +--rw tag-type dot1q-tag-type
| | +--rw vlan-id union
| +--rw second-tag!
| | +--rw tag-type dot1q-tag-type
| | +--rw vlan-id union
| +--rw match-exact-tags? empty
+--rw rewrite {flexible-rewrites}?
| +--rw (direction)?
| +--:(symmetrical)
| | +--rw symmetrical
| | +--rw dot1q-tag-rewrite {dot1q-tag-rewrites}?
| | +--rw pop-tags? uint8
| | +--rw push-tags!
| | +--rw outer-tag
| | | +--rw tag-type dot1q-tag-type
| | | +--rw vlan-id vlanid
Wilton & Mansfield Expires 6 May 2027 [Page 8]
Internet-Draft Sub-interface VLAN YANG November 2026
| | +--rw second-tag!
| | +--rw tag-type dot1q-tag-type
| | +--rw vlan-id vlanid
| +--:(asymmetrical) {asymmetric-rewrites}?
| +--rw ingress
| | +--rw dot1q-tag-rewrite {dot1q-tag-rewrites}?
| | +--rw pop-tags? uint8
| | +--rw push-tags!
| | +--rw outer-tag
| | | +--rw tag-type dot1q-tag-type
| | | +--rw vlan-id vlanid
| | +--rw second-tag!
| | +--rw tag-type dot1q-tag-type
| | +--rw vlan-id vlanid
| +--rw egress
| +--rw dot1q-tag-rewrite {dot1q-tag-rewrites}?
| +--rw pop-tags? uint8
| +--rw push-tags!
| +--rw outer-tag
| | +--rw tag-type dot1q-tag-type
| | +--rw vlan-id vlanid
| +--rw second-tag!
| +--rw tag-type dot1q-tag-type
| +--rw vlan-id vlanid
+--rw local-traffic-default-encaps!
+--rw outer-tag
| +--rw tag-type dot1q-tag-type
| +--rw vlan-id vlanid
+--rw second-tag!
+--rw tag-type dot1q-tag-type
+--rw vlan-id vlanid
5. VLAN Encapsulation YANG Module
This YANG module augments the 'encapsulation' container defined in
ietf-if-extensions.yang [I-D.ietf-netmod-intf-ext-yang]. It also
contains references to [RFC8343], [RFC7224], and [IEEE_802.1Q_2022].
<CODE BEGINS> file "ietf-if-vlan-encapsulation@2026-11-02.yang"
module ietf-if-vlan-encapsulation {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-if-vlan-encapsulation";
prefix if-vlan;
import ietf-interfaces {
prefix if;
reference
"RFC 8343: A YANG Data Model For Interface Management";
Wilton & Mansfield Expires 6 May 2027 [Page 9]
Internet-Draft Sub-interface VLAN YANG November 2026
}
import iana-if-type {
prefix ianaift;
reference
"RFC 7224: IANA Interface Type YANG Module";
}
import ieee802-dot1q-types {
prefix dot1q-types;
reference
"IEEE Std 802.1Q Bridges and Bridged Networks:
IEEE Std 802.1Q-2022, IEEE Std 802.1Qcz-2023,
IEEE Std 802.1Qcw-2023, IEEE Std 802.1Qcj-2023";
}
import ietf-if-extensions {
prefix if-ext;
reference
"RFC AAAA: Common Interface Extension YANG Data Models";
}
organization
"IETF NETMOD (NETCONF Data Modeling Language) Working Group";
contact
"WG Web: <https://datatracker.ietf.org/wg/netmod/>
WG List: <mailto:netmod@ietf.org>
Editors:
Robert Wilton <mailto:rwilton@cisco.com>
Scott Mansfield <mailto:scott.mansfield@ericsson.com>";
description
"This YANG module models configuration to classify IEEE 802.1Q
VLAN tagged Ethernet traffic by exactly matching the tag type
and VLAN identifier of one or two 802.1Q VLAN tags in the frame.
Copyright (c) 2026 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 BBBB
(https://www.rfc-editor.org/info/rfcBBBB); see the RFC itself
for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
Wilton & Mansfield Expires 6 May 2027 [Page 10]
Internet-Draft Sub-interface VLAN YANG November 2026
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
revision 2026-11-02 {
description
"Initial version of the module";
reference
"RFC BBBB: Sub-interface VLAN YANG Data Models";
}
augment "/if:interfaces/if:interface/if-ext:encapsulation/"
+ "if-ext:encaps-type" {
when "derived-from-or-self(../if:type,
'ianaift:ethernetCsmacd') or
derived-from-or-self(../if:type,
'ianaift:ieee8023adLag') or
derived-from-or-self(../if:type, 'ianaift:l2vlan')" {
description
"Applies only to Ethernet-like interfaces and
sub-interfaces.";
}
description
"Augment the generic interface encapsulation with basic 802.1Q
VLAN tag classifications";
case dot1q-vlan {
container dot1q-vlan {
description
"Classifies 802.1Q VLAN tagged Ethernet frames to a
sub-interface (or interface) by exactly matching the
number of tags, tag type(s) and VLAN identifier(s).
Only frames matching the classification configured on a
sub-interface/interface are processed on that
sub-interface/interface.
Frames that do not match any sub-interface are processed
directly on the parent interface, if it is associated with
a forwarding instance, otherwise they are dropped.";
container outer-tag {
must 'tag-type = "dot1q-types:s-vlan" or '
+ 'tag-type = "dot1q-types:c-vlan"' {
error-message
"Only Customer VLAN (C-VLAN) and Service VLAN (S-VLAN)
tags can be matched.";
description
"For IEEE 802.1Q interoperability, only C-VLAN and
Wilton & Mansfield Expires 6 May 2027 [Page 11]
Internet-Draft Sub-interface VLAN YANG November 2026
S-VLAN tags are matched.";
}
description
"Specifies the VLAN tag values to match against the
outermost (first) 802.1Q VLAN tag in the frame.";
uses dot1q-types:dot1q-tag-classifier-grouping;
}
container second-tag {
must '../outer-tag/tag-type = "dot1q-types:s-vlan" and '
+ 'tag-type = "dot1q-types:c-vlan"' {
error-message
"When matching two 802.1Q VLAN tags, the outermost
(first) tag in the frame must be specified and be of
S-VLAN type and the second tag in the frame must be of
C-VLAN tag type.";
description
"For IEEE 802.1Q interoperability, when matching two
802.1Q VLAN tags, it is REQUIRED that the outermost
tag exists and is an S-VLAN, and the second tag is a
C-VLAN.";
}
presence "Classify frames that have two 802.1Q VLAN tags.";
description
"Specifies the VLAN tag values to match against the
second outermost 802.1Q VLAN tag in the frame.";
uses dot1q-types:dot1q-tag-classifier-grouping;
}
}
}
}
}
<CODE ENDS>
6. Flexible Encapsulation YANG Module
This YANG module augments the 'encapsulation' container defined in
ietf-if-extensions.yang [I-D.ietf-netmod-intf-ext-yang]. This YANG
module also augments the 'interface' list entry defined in [RFC8343].
It also contains references to [RFC7224], and [IEEE_802.1Q_2022].
<CODE BEGINS> file "ietf-if-flexible-encapsulation@2026-11-02.yang"
module ietf-if-flexible-encapsulation {
yang-version 1.1;
namespace
"urn:ietf:params:xml:ns:yang:ietf-if-flexible-encapsulation";
prefix if-flex;
import ietf-interfaces {
Wilton & Mansfield Expires 6 May 2027 [Page 12]
Internet-Draft Sub-interface VLAN YANG November 2026
prefix if;
reference
"RFC 8343: A YANG Data Model For Interface Management";
}
import iana-if-type {
prefix ianaift;
reference
"RFC 7224: IANA Interface Type YANG Module";
}
import ieee802-dot1q-types {
prefix dot1q-types;
reference
"IEEE Std 802.1Q Bridges and Bridged Networks:
IEEE Std 802.1Q-2022, IEEE Std 802.1Qcz-2023,
IEEE Std 802.1Qcw-2023, IEEE Std 802.1Qcj-2023";
}
import ietf-if-extensions {
prefix if-ext;
reference
"RFC AAAA: Common Interface Extension YANG Data Models";
}
organization
"IETF NETMOD (NETCONF Data Modeling Language) Working Group";
contact
"WG Web: <https://datatracker.ietf.org/wg/netmod/>
WG List: <mailto:netmod@ietf.org>
Editors:
Robert Wilton <mailto:rwilton@cisco.com>
Scott Mansfield <mailto:scott.mansfield@ericsson.com>";
description
"This YANG module describes interface configuration for flexible
classification and rewrites of IEEE 802.1Q VLAN tagged Ethernet
traffic.
Copyright (c) 2026 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 BBBB
(https://www.rfc-editor.org/info/rfcBBBB); see the RFC itself
Wilton & Mansfield Expires 6 May 2027 [Page 13]
Internet-Draft Sub-interface VLAN YANG November 2026
for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
revision 2026-11-02 {
description
"Initial version of the module";
reference
"RFC BBBB: Sub-interface VLAN YANG Data Models";
}
feature flexible-rewrites {
description
"This feature indicates that the network element supports
specifying flexible rewrite operations including tag push
and pop operations on the L2 frame header.";
}
feature asymmetric-rewrites {
description
"This feature indicates that the network element supports
specifying different rewrite operations for the ingress
rewrite operation and egress rewrite operation.";
}
grouping flexible-match {
description
"Represents a flexible frame classification:
A flexible match is a default, untagged, priority-tagged, or
tag-stack match. The device MUST NOT allow match
configurations on different sub-interfaces that give rise to
ambiguous classifications of traffic to sub-interfaces. The
precedence rules for resolving non-ambiguous overlapping
matches are specified in RFC BBBB.";
choice match-type {
mandatory true;
description
"Provides a choice of how the frames may be matched.";
case default {
description
"Default match.";
leaf default {
type empty;
Wilton & Mansfield Expires 6 May 2027 [Page 14]
Internet-Draft Sub-interface VLAN YANG November 2026
description
"Default match. Matches all traffic not matched to any
other peer sub-interface by a more specific
encapsulation.";
}
}
case untagged {
description
"Match untagged Ethernet frames only.";
leaf untagged {
type empty;
description
"Untagged match. Matches all untagged traffic.";
}
}
case dot1q-priority-tagged {
description
"Match 802.1Q priority tagged Ethernet frames only.";
container dot1q-priority-tagged {
description
"Matches Ethernet frames with exactly one 802.1Q
priority tag, with VID 0 and the specified tag type.
The EtherType following the matched tag MUST NOT be
an 802.1Q tag EtherType.";
leaf tag-type {
type dot1q-types:dot1q-tag-type;
mandatory true;
description
"The 802.1Q tag type of matched priority
tagged packets.";
}
}
}
case dot1q-vlan-tagged {
container dot1q-vlan-tagged {
description
"Matches VLAN tagged frames.";
container outer-tag {
must 'tag-type = "dot1q-types:s-vlan" or '
+ 'tag-type = "dot1q-types:c-vlan"' {
error-message
"Only C-VLAN and S-VLAN tags can be matched.";
description
"For IEEE 802.1Q interoperability, only C-VLAN and
S-VLAN tags can be matched.";
}
description
"Classifies traffic using the outermost (first) VLAN
Wilton & Mansfield Expires 6 May 2027 [Page 15]
Internet-Draft Sub-interface VLAN YANG November 2026
tag on the frame.";
uses "dot1q-types:"
+ "dot1q-tag-ranges-or-any-classifier-grouping";
}
container second-tag {
must
'../outer-tag/tag-type = "dot1q-types:s-vlan" and '
+ 'tag-type = "dot1q-types:c-vlan"' {
error-message
"When matching two tags, the outermost (first) tag
must be specified and of S-VLAN type and the second
outermost tag must be of C-VLAN tag type.";
description
"For IEEE 802.1Q interoperability, when matching two
tags, it is required that the outermost (first) tag
exists and is an S-VLAN, and the second outermost
tag is a C-VLAN.";
}
presence "Also classify on the second VLAN tag.";
description
"Classifies traffic using the second outermost VLAN tag
on the frame.";
uses "dot1q-types:"
+ "dot1q-tag-ranges-or-any-classifier-grouping";
}
leaf match-exact-tags {
type empty;
description
"If set, indicates that all 802.1Q VLAN tags in the
Ethernet frame header MUST be explicitly matched,
i.e., the EtherType following the matched tags MUST
NOT be an 802.1Q tag EtherType. If unset then any
extra 802.1Q VLAN tags are allowed but are not
considered for classification, or rewrite operations,
but instead are treated as part of the opaque payload
of the frame.";
}
}
}
}
}
grouping dot1q-tag-rewrite {
description
"Flexible rewrite grouping. Can be either be expressed
symmetrically, or independently in the ingress and/or egress
directions.";
leaf pop-tags {
Wilton & Mansfield Expires 6 May 2027 [Page 16]
Internet-Draft Sub-interface VLAN YANG November 2026
type uint8 {
range "1..2";
}
description
"The number of 802.1Q VLAN tags to pop, or translate if used
in conjunction with push-tags.
Popped tags are the outermost tags on the frame. Only tags
that are matched may be popped. For example, it is not
allowed to match 1 tag and pop 2 tags.";
}
container push-tags {
presence "802.1Q tags are pushed or translated";
description
"The 802.1Q tags to push on the front of the frame, or
translate if configured in conjunction with pop-tags.";
container outer-tag {
must 'tag-type = "dot1q-types:s-vlan" or '
+ 'tag-type = "dot1q-types:c-vlan"' {
error-message "Only C-VLAN and S-VLAN tags can be pushed.";
description
"For IEEE 802.1Q interoperability, only C-VLAN and S-VLAN
tags can be pushed.";
}
description
"The outermost (first) VLAN tag to push onto the frame.";
uses dot1q-types:dot1q-tag-classifier-grouping;
}
container second-tag {
must '../outer-tag/tag-type = "dot1q-types:s-vlan" and '
+ 'tag-type = "dot1q-types:c-vlan"' {
error-message
"When pushing/rewriting two tags, the outermost tag must
be specified and of S-VLAN type and the second outermost
tag must be of C-VLAN tag type.";
description
"For IEEE 802.1Q interoperability, when pushing two tags,
it is required that the outermost tag exists and is an
S-VLAN, and the second outermost tag is a C-VLAN.";
}
presence
"In addition to the first tag, also push/rewrite a second
VLAN tag.";
description
"The second outermost VLAN tag to push onto the frame.";
uses dot1q-types:dot1q-tag-classifier-grouping;
}
}
Wilton & Mansfield Expires 6 May 2027 [Page 17]
Internet-Draft Sub-interface VLAN YANG November 2026
}
grouping flexible-rewrite {
description
"Grouping for flexible rewrites of fields in the L2 header.
Restricted to flexible 802.1Q VLAN tag rewrites, but could be
extended to cover rewrites of other fields in the L2 header in
future.";
container dot1q-tag-rewrite {
description
"802.1Q VLAN tag rewrite.
Translate operations are expressed as a combination of tag
push and pop operations. For example, translating the outer
tag is expressed as popping a single tag, and pushing a
single tag. 802.1Q tags that are translated SHOULD preserve
the PCP and DEI fields unless a different QoS behavior has
been specified.";
uses dot1q-tag-rewrite;
}
}
augment "/if:interfaces/if:interface/if-ext:encapsulation/"
+ "if-ext:encaps-type" {
when "derived-from-or-self(../if:type,
'ianaift:ethernetCsmacd') or
derived-from-or-self(../if:type,
'ianaift:ieee8023adLag') or
derived-from-or-self(../if:type, 'ianaift:l2vlan')" {
description
"Applies only to Ethernet-like interfaces and
sub-interfaces.";
}
description
"Augment the generic interface encapsulation with flexible
match and rewrite for VLAN sub-interfaces.";
case flexible {
description
"Flexible encapsulation and rewrite";
container flexible {
description
"Flexible encapsulation allows for the matching of ranges
and sets of 802.1Q VLAN Tags and performing rewrite
operations on the VLAN tags.
The structure is also designed to be extended to allow for
matching/rewriting other fields within the L2 frame header
if required.";
Wilton & Mansfield Expires 6 May 2027 [Page 18]
Internet-Draft Sub-interface VLAN YANG November 2026
container match {
description
"Flexibly classifies Ethernet frames to a sub-interface
(or interface) based on the L2 header fields.
Only frames matching the classification configured on a
sub-interface/interface are processed on that
sub-interface/interface.
Frames that do not match any sub-interface are processed
directly on the parent interface, if it is associated
with a forwarding instance, otherwise they are dropped.
If a frame could be classified to multiple sub-
interfaces then they get classified to the sub-interface
with the most specific match. For example, matching two
VLAN tags in the frame is more specific than matching
the outermost VLAN tag, which is more specific than the
catch-all 'default' match.";
uses flexible-match;
}
container rewrite {
if-feature "flexible-rewrites";
description
"L2 frame rewrite operations.
Rewrites allows for modifications to the L2 frame header
as it transits the interface/sub-interface. Examples
include adding a VLAN tag, removing a VLAN tag, or
rewriting the VLAN Id carried in a VLAN tag.";
choice direction {
description
"Whether the rewrite policy is symmetrical or
asymmetrical.";
case symmetrical {
container symmetrical {
uses flexible-rewrite;
description
"Symmetrical rewrite. Expressed in the ingress
direction, but the reverse operation is
applied to egress traffic.
A tag can only be popped if its tag type and VLAN
identifier are uniquely determined by the match,
so that the tag can be restored on egress.
For example, if a tag is pushed on ingress
traffic, then the reverse operation is a 'pop 1',
Wilton & Mansfield Expires 6 May 2027 [Page 19]
Internet-Draft Sub-interface VLAN YANG November 2026
that is performed on traffic egressing the same
interface, so a peer device sees a consistent L2
encapsulation for both ingress and egress
traffic.";
}
}
case asymmetrical {
if-feature "asymmetric-rewrites";
description
"Asymmetrical rewrite.
Rewrite operations MAY be specified in only a single
direction, or different rewrite operations MAY be
specified in each direction.";
container ingress {
uses flexible-rewrite;
description
"A rewrite operation that only applies to ingress
traffic.
Ingress rewrite operations are performed before
the frame is subsequently processed by the
forwarding operation.";
}
container egress {
uses flexible-rewrite;
description
"A rewrite operation that only applies to egress
traffic.";
}
}
}
}
container local-traffic-default-encaps {
presence "A local traffic default encapsulation has been
specified.";
description
"Specifies the 802.1Q VLAN tags to use by default for
locally sourced traffic from the interface.
Used for encapsulations that match a range of VLANs (or
'any'), where the source VLAN Ids are otherwise
ambiguous.
The default encapsulation can only be specified for
802.1Q VLAN tags that are matched by the encapsulation.
I.e., they cannot be specified for 802.1Q VLAN tags
that may be present in the frames but are not matched
Wilton & Mansfield Expires 6 May 2027 [Page 20]
Internet-Draft Sub-interface VLAN YANG November 2026
by the encapsulation.
If not specified for an encapsulation that matches
a list of VLAN Ids or ranges, the default is to use the
lowest matched VLAN identifier.
If not specified for an encapsulation that matches
'any' VLAN Id, no default is set and locally sourced
traffic cannot be sourced without further indication as
to which VLAN tags should be used (e.g., perhaps in
reply to a frame received on a particular VLAN).
";
container outer-tag {
must 'tag-type = "dot1q-types:s-vlan" or '
+ 'tag-type = "dot1q-types:c-vlan"' {
error-message
"Only C-VLAN and S-VLAN tags can be matched.";
description
"For IEEE 802.1Q interoperability, only C-VLAN and
S-VLAN tags can be matched.";
}
description
"The outermost (first) VLAN tag for locally sourced
traffic.";
uses dot1q-types:dot1q-tag-classifier-grouping;
}
container second-tag {
must
'../outer-tag/tag-type = "dot1q-types:s-vlan" and '
+ 'tag-type = "dot1q-types:c-vlan"' {
error-message
"When specifying two tags, the outermost (first) tag
must be specified and of S-VLAN type and the second
outermost tag must be of C-VLAN tag type.";
description
"For IEEE 802.1Q interoperability, when specifying
two tags, it is required that the outermost (first)
tag exists and is an S-VLAN, and the second
outermost tag is a C-VLAN.";
}
presence
"Indicates existence of a second outermost VLAN tag.";
description
"The second outermost VLAN tag for locally sourced
traffic.";
uses dot1q-types:dot1q-tag-classifier-grouping;
}
}
Wilton & Mansfield Expires 6 May 2027 [Page 21]
Internet-Draft Sub-interface VLAN YANG November 2026
}
}
}
}
<CODE ENDS>
7. Examples
The following sections give examples of configuring a sub-interface
supporting L3 forwarding, and a sub-interface being used in
conjunction with an L2VPN.
7.1. Layer 3 sub-interfaces with IPv6
This example illustrates two layer sub-interfaces, 'eth0.1' and
'eth0.2', both are child interfaces of the Ethernet interface 'eth0'.
'eth0.1' is configured to match traffic with two VLAN tags: an outer
S-VLAN of 10 and an inner C-VLAN of 20.
'eth0.2' is configured to match traffic with a single S-VLAN tag,
with VLAN Id 11.
{
"ietf-interfaces:interfaces": {
"interface": [
{
"name": "eth0",
"type": "iana-if-type:ethernetCsmacd"
},
{
"name": "eth0.1",
"type": "iana-if-type:l2vlan",
"ietf-if-extensions:encapsulation": {
"ietf-if-vlan-encapsulation:dot1q-vlan": {
"outer-tag": {
"tag-type": "ieee802-dot1q-types:s-vlan",
"vlan-id": 10
},
"second-tag": {
"tag-type": "ieee802-dot1q-types:c-vlan",
"vlan-id": 20
}
}
},
"ietf-if-extensions:parent-interface": "eth0",
"ietf-ip:ipv6": {
"enabled": true,
Wilton & Mansfield Expires 6 May 2027 [Page 22]
Internet-Draft Sub-interface VLAN YANG November 2026
"forwarding": true,
"address": [
{
"ip": "2001:db8:11::1",
"prefix-length": 48
}
]
}
},
{
"name": "eth0.2",
"type": "iana-if-type:l2vlan",
"ietf-if-extensions:encapsulation": {
"ietf-if-vlan-encapsulation:dot1q-vlan": {
"outer-tag": {
"tag-type": "ieee802-dot1q-types:s-vlan",
"vlan-id": 11
}
}
},
"ietf-if-extensions:parent-interface": "eth0",
"ietf-ip:ipv6": {
"enabled": true,
"forwarding": true,
"address": [
{
"ip": "2001:db8:11::1",
"prefix-length": 48
}
]
}
}
]
}
}
7.2. Layer 2 sub-interfaces with L2VPN
This example illustrates a layer 2 sub-interface 'eth0.3' configured
to match traffic with an S-VLAN tag of 10, and a C-VLAN tag of 21;
and remove the outer tag (S-VLAN 10) before the traffic is passed off
to the L2VPN service.
It also illustrates another sub-interface 'eth1.0' under a separate
physical interface configured to match traffic with a C-VLAN of 50,
with the tag removed before traffic is given to any service. Sub-
interface 'eth1.0' is not currently bound to any service and hence
traffic classified to that sub-interface is dropped.
Wilton & Mansfield Expires 6 May 2027 [Page 23]
Internet-Draft Sub-interface VLAN YANG November 2026
{
"ietf-interfaces:interfaces": {
"interface": [
{
"name": "eth0",
"type": "iana-if-type:ethernetCsmacd"
},
{
"name": "eth0.3",
"type": "iana-if-type:l2vlan",
"ietf-if-extensions:parent-interface": "eth0",
"ietf-if-extensions:encapsulation": {
"ietf-if-flexible-encapsulation:flexible": {
"match": {
"dot1q-vlan-tagged": {
"outer-tag": {
"tag-type": "ieee802-dot1q-types:s-vlan",
"vlan-id": "10"
},
"second-tag": {
"tag-type": "ieee802-dot1q-types:c-vlan",
"vlan-id": "21"
}
}
},
"rewrite":{
"symmetrical": {
"dot1q-tag-rewrite": {
"pop-tags": 1
}
}
}
}
}
},
{
"name": "eth1.0",
"type": "iana-if-type:l2vlan",
"ietf-if-extensions:parent-interface": "eth0",
"ietf-if-extensions:encapsulation": {
"ietf-if-flexible-encapsulation:flexible": {
"match": {
"dot1q-vlan-tagged": {
"outer-tag": {
"tag-type": "ieee802-dot1q-types:c-vlan",
"vlan-id": "50"
}
}
Wilton & Mansfield Expires 6 May 2027 [Page 24]
Internet-Draft Sub-interface VLAN YANG November 2026
},
"rewrite":{
"symmetrical": {
"dot1q-tag-rewrite": {
"pop-tags": 1
}
}
}
}
}
}
]
}
}
8. Acknowledgements
The authors would particularly like to thank Benoit Claise, John
Messenger, Glenn Parsons, and Dan Romascanu for their help
progressing this draft.
The authors would also like to thank Martin Bjorklund, Alex Campbell,
Linda Dunbar, Darren Dukes, Don Fedyk, Eric Gray, Sue Hares, Giles
Heron, Marc Holness, Iftekhar Hussain, Neil Ketley, William Lupton,
John Messenger, Glenn Parsons, Ludwig Pauwels, Dave Thaler, Joseph
White, Vladimir Vassilev, David Ball and members of the IEEE 802.1 WG
for their helpful reviews and feedback on this draft.
9. IANA Considerations
9.1. YANG Module Registrations
The following YANG modules are requested to be registered in the IANA
"YANG Module Names" [RFC6020] registry:
The ietf-if-vlan-encapsulation module:
Name: ietf-if-vlan-encapsulation
XML Namespace: urn:ietf:params:xml:ns:yang:ietf-if-vlan-
encapsulation
Prefix: if-vlan
Reference: RFCXXXX
The ietf-if-flexible-encapsulation module:
Wilton & Mansfield Expires 6 May 2027 [Page 25]
Internet-Draft Sub-interface VLAN YANG November 2026
Name: ietf-if-flexible-encapsulation
XML Namespace: urn:ietf:params:xml:ns:yang:ietf-if-flexible-
encapsulation
Prefix: if-flex
Reference: RFCXXXX
This document registers two URIs in the "IETF XML Registry"
[RFC3688]. Following the format in RFC 3688, the following
registrations have been made.
URI: urn:ietf:params:xml:ns:yang:ietf-if-vlan-encapsulation
Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace.
URI: urn:ietf:params:xml:ns:yang:ietf-if-flexible-encapsulation
Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace.
10. Operational Considerations
The modules defined in this document provide a standardized YANG
interface for management systems to configure sub-interface VLAN
classification and tag rewrites. Implementations map this
configuration to their device capabilities and configuration
mechanisms, while providing the classification and rewrite behavior
specified in this document. The modules do not prescribe the
device's CLI syntax or internal implementation. Operators and
management systems need to account for the features and configuration
combinations supported by each device.
Devices may implement the sub-interface based model, the IEEE 802.1Q
bridge model, or both, depending on their deployment requirements.
If both models are implemented on the same device, they can be used
at the same time, for example, on different physical or Link
Aggregation Group (LAG) interfaces. It may be possible to use both
models on the same interface at the same time, but the resulting
expectations and behavior are beyond the scope of this specification.
A comparison of the models and their deployment scenarios is provided
in Appendix A.
Wilton & Mansfield Expires 6 May 2027 [Page 26]
Internet-Draft Sub-interface VLAN YANG November 2026
The VLAN identifier values that can be explicitly configured in these
modules are restricted to the range 1 to 4094, consistent with the
imported IEEE 802.1Q types. The flexible encapsulation module's VLAN
identifier ranges and "any" VLAN identifier match also cover only
this range. Priority-tagged traffic, with a VID field of zero, is
covered separately by the "dot1q-priority-tagged" match in the
flexible encapsulation module; this match cannot be combined with a
VLAN identifier range. The value 4095 is reserved in the IEEE 802.1Q
definition of VLAN identifiers [IEEE_802.1Q_2022] and cannot be
configured as a VLAN identifier by these modules. Handling received
frames containing this reserved VID is outside the scope of this
specification.
11. Security Considerations
The "ietf-if-flexible-encapsulation" and "ietf-if-vlan-encapsulation"
YANG modules define data models that are designed to be accessed via
YANG-based management protocols, such as Network Configuration
Protocol (NETCONF) [RFC6241] and RESTCONF [RFC8040]. These YANG-
based management protocols (1) MUST use a secure transport layer
(e.g., Secure Shell (SSH) [RFC4252], TLS [RFC9846], and QUIC
[RFC9000]) and (2) have to use mutual authentication.
The Network Configuration Access Control Model (NACM) [RFC8341]
provides the means to restrict access for particular NETCONF or
RESTCONF users to a preconfigured subset of all available NETCONF or
RESTCONF protocol operations and content.
There are a number of data nodes defined in these YANG modules that
are writable/creatable/deletable (i.e., "config true", which is the
default). All writable data nodes are likely to be reasonably
sensitive or vulnerable in some network environments. Write
operations (e.g., edit-config) and delete operations to these data
nodes without proper protection or authentication can have a negative
effect on network operations. There are no particularly sensitive
writable data nodes, e.g., ones that are protected by a
"nacm:default-deny-write" or a "nacm:default-deny-all" extensions
statement.
Some of the readable data nodes in these YANG modules may be
considered sensitive or vulnerable in some network environments. It
is thus important to control read access (e.g., via get, get-config,
or notification) to these data nodes. There are no particularly
sensitive readable data nodes, e.g., ones that are protected by a
"nacm:default-deny-all" extensions statement.
12. References
Wilton & Mansfield Expires 6 May 2027 [Page 27]
Internet-Draft Sub-interface VLAN YANG November 2026
12.1. Normative References
[I-D.ietf-netmod-intf-ext-yang]
Wilton, R. and S. Mansfield, "Common Interface Extension
YANG Data Models", Work in Progress, Internet-Draft,
draft-ietf-netmod-intf-ext-yang-17, 3 September 2025,
<https://datatracker.ietf.org/doc/html/draft-ietf-netmod-
intf-ext-yang-17>.
[IEEE_802.1Q_2022]
IEEE, "IEEE Standard for Local and Metropolitan Area
Networks--Bridges and Bridged Networks", IEEE 802-1q-2022,
DOI 10.1109/IEEESTD.2022.10004498, 30 December 2022,
<https://ieeexplore.ieee.org/document/10004498>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
DOI 10.17487/RFC3688, January 2004,
<https://www.rfc-editor.org/info/rfc3688>.
[RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for
the Network Configuration Protocol (NETCONF)", RFC 6020,
DOI 10.17487/RFC6020, October 2010,
<https://www.rfc-editor.org/info/rfc6020>.
[RFC7224] Bjorklund, M., "IANA Interface Type YANG Module",
RFC 7224, DOI 10.17487/RFC7224, May 2014,
<https://www.rfc-editor.org/info/rfc7224>.
[RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
RFC 7950, DOI 10.17487/RFC7950, August 2016,
<https://www.rfc-editor.org/info/rfc7950>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration
Access Control Model", STD 91, RFC 8341,
DOI 10.17487/RFC8341, March 2018,
<https://www.rfc-editor.org/info/rfc8341>.
Wilton & Mansfield Expires 6 May 2027 [Page 28]
Internet-Draft Sub-interface VLAN YANG November 2026
[RFC8343] Bjorklund, M., "A YANG Data Model for Interface
Management", RFC 8343, DOI 10.17487/RFC8343, March 2018,
<https://www.rfc-editor.org/info/rfc8343>.
[RFC8344] Bjorklund, M., "A YANG Data Model for IP Management",
RFC 8344, DOI 10.17487/RFC8344, March 2018,
<https://www.rfc-editor.org/info/rfc8344>.
12.2. Informative References
[RFC4252] Ylonen, T. and C. Lonvick, Ed., "The Secure Shell (SSH)
Authentication Protocol", RFC 4252, DOI 10.17487/RFC4252,
January 2006, <https://www.rfc-editor.org/info/rfc4252>.
[RFC4448] Martini, L., Ed., Rosen, E., El-Aawar, N., and G. Heron,
"Encapsulation Methods for Transport of Ethernet over MPLS
Networks", RFC 4448, DOI 10.17487/RFC4448, April 2006,
<https://www.rfc-editor.org/info/rfc4448>.
[RFC4761] Kompella, K., Ed. and Y. Rekhter, Ed., "Virtual Private
LAN Service (VPLS) Using BGP for Auto-Discovery and
Signaling", RFC 4761, DOI 10.17487/RFC4761, January 2007,
<https://www.rfc-editor.org/info/rfc4761>.
[RFC4762] Lasserre, M., Ed. and V. Kompella, Ed., "Virtual Private
LAN Service (VPLS) Using Label Distribution Protocol (LDP)
Signaling", RFC 4762, DOI 10.17487/RFC4762, January 2007,
<https://www.rfc-editor.org/info/rfc4762>.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<https://www.rfc-editor.org/info/rfc6241>.
[RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
<https://www.rfc-editor.org/info/rfc8040>.
[RFC8200] Deering, S. and R. Hinden, "Internet Protocol, Version 6
(IPv6) Specification", STD 86, RFC 8200,
DOI 10.17487/RFC8200, July 2017,
<https://www.rfc-editor.org/info/rfc8200>.
[RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams",
BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018,
<https://www.rfc-editor.org/info/rfc8340>.
Wilton & Mansfield Expires 6 May 2027 [Page 29]
Internet-Draft Sub-interface VLAN YANG November 2026
[RFC9000] Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based
Multiplexed and Secure Transport", RFC 9000,
DOI 10.17487/RFC9000, May 2021,
<https://www.rfc-editor.org/info/rfc9000>.
[RFC9846] Rescorla, E., "The Transport Layer Security (TLS) Protocol
Version 1.3", RFC 9846, DOI 10.17487/RFC9846, July 2026,
<https://www.rfc-editor.org/info/rfc9846>.
Appendix A. Comparison with the IEEE 802.1Q Configuration Model
In addition to the sub-interface based YANG model proposed here, the
IEEE 802.1Q working group has developed a YANG model for the
configuration of 802.1Q VLANs. This raises the valid question as to
whether the models overlap and whether it is necessary or beneficial
to have two different models for superficially similar constructs.
This section aims to answer that question by summarizing and
comparing the two models.
A.1. Sub-interface based configuration model overview
The key features of the sub-interface based configuration model can
be summarized as:
* The model is primarily designed to enable layer 2 and layer 3
services on Ethernet interfaces that can be defined in a very
flexible way to meet the varied requirements of service providers.
* Traffic is classified from an Ethernet-like interface to sub-
interfaces based on fields in the layer 2 header. This is often
based on VLAN Ids contained in the frame, but the model is
extensible to other arbitrary fields in the frame header.
* Sub-interfaces are just a type of if:interface and hence support
any feature configuration YANG models that can be applied
generally to interfaces. For example, QoS or Access Control List
(ACL) models that reference if:interface can be applied to the
sub-interfaces, or the sub-interface can be used as an Access
Circuit in L2VPN or L3VPN models that reference if:interface.
Wilton & Mansfield Expires 6 May 2027 [Page 30]
Internet-Draft Sub-interface VLAN YANG November 2026
* In the sub-interface based configuration model, the classification
of traffic arriving on an interface to a given sub-interface,
based on fields in the layer 2 header, is completely independent
of how the traffic is forwarded. The sub-interface can be
referenced (via references to if:interface) by other models that
specify how traffic is forwarded; thus sub-interfaces can support
multiple different forwarding paradigms, including but not limited
to: layer 3 (IPv4/IPv6), layer 2 pseudowires (over MPLS or IP),
VPLS instances, EVPN instance.
* The model is flexible in the scope of the VLAN Identifier space.
I.e., by default VLAN Ids can be scoped locally to a single
Ethernet-like trunk interface, but the scope is determined by the
forwarding paradigm that is used.
A.2. IEEE 802.1Q Bridge Configuration Model Overview
The key features of the IEEE 802.1Q bridge configuration model can be
summarized as:
* Each VLAN bridge component has a set of Ethernet interfaces that
are members of that bridge. Sub-interfaces are not used, nor
required in the 802.1Q bridge model.
* Within a VLAN bridge component, the VLAN tag in the packet is
used, along with the destination MAC address, to determine how to
forward the packet. Other forwarding paradigms are not supported
by the 802.1Q model.
* Classification of traffic to a VLAN bridge component is based only
on the Ethernet interface that it arrived on.
* VLAN Identifiers are scoped to a VLAN bridge component. Often
devices only support a single bridge component and hence VLANs are
scoped globally within the device.
* Feature configuration is specified in the context of the bridge,
or particular VLANs on a bridge.
A.3. Possible Overlap Between the Two Models
Both models can be used for configuring similar basic layer 2
forwarding topologies. The 802.1Q bridge configuration model is
optimized for configuring Virtual LANs that span across enterprises
and data centers.
Wilton & Mansfield Expires 6 May 2027 [Page 31]
Internet-Draft Sub-interface VLAN YANG November 2026
The sub-interface model can also be used for configuring equivalent
Virtual LAN networks that span across enterprises and data centers,
but often requires more configuration to be able to configure the
equivalent constructs to the 802.1Q bridge model.
The sub-interface model really excels when implementing flexible L2
and L3 services, where those services may be handled on the same
physical interface, and where the VLAN Identifier is being solely
used to identify the customer or service that is being provided
rather than a Virtual LAN. The sub-interface model provides more
flexibility as to how traffic can be classified, how features can be
applied to traffic streams, and how the traffic is to be forwarded.
Conversely, the 802.1Q bridge model can also be used to implement L2
services in some scenarios, but only if the forwarding paradigm being
used to implement the service is the native Ethernet forwarding
specified in 802.1Q - other forwarding paradigms such as pseudowires
or VPLS are not supported. The 802.1Q bridge model does not
implement L3 services at all, although this can be partly mitigated
by using a virtual L3 interface construct that is a separate logical
Ethernet-like interface which is a member of the bridge.
In conclusion, it is valid for both of these models to exist since
they have different deployment scenarios for which they are
optimized. Devices may choose which of the models (or both) to
implement depending on what functionality the device is being
designed for. Operational considerations for devices that implement
both models are described in Section 10.
Authors' Addresses
Robert Wilton (editor)
Cisco Systems
Email: rwilton@cisco.com
Scott Mansfield (editor)
Ericsson
Email: scott.mansfield@ericsson.com
Wilton & Mansfield Expires 6 May 2027 [Page 32]