draft-ietf-netmod-sub-intf-vlan-model-00.txt   draft-ietf-netmod-sub-intf-vlan-model-01.txt 
Internet Engineering Task Force R. Wilton, Ed. Internet Engineering Task Force R. Wilton, Ed.
Internet-Draft D. Ball Internet-Draft D. Ball
Intended status: Informational T. Singh Intended status: Informational T. Singh
Expires: July 24, 2017 Cisco Systems Expires: September 14, 2017 Cisco Systems
S. Sivaraj S. Sivaraj
Juniper Networks Juniper Networks
January 20, 2017 March 13, 2017
Sub-interface VLAN YANG Data Models Sub-interface VLAN YANG Data Models
draft-ietf-netmod-sub-intf-vlan-model-00 draft-ietf-netmod-sub-intf-vlan-model-01
Abstract Abstract
This document defines YANG modules to add support for classifying This document defines YANG modules to add support for classifying
traffic received on interfaces as Ethernet/VLAN framed packets to traffic received on interfaces as Ethernet/VLAN framed packets to
sub-interfaces based on the fields available in the Ethernet/VLAN sub-interfaces based on the fields available in the Ethernet/VLAN
frame headers. These modules allow IETF forwarding protocols (such frame headers. These modules allow configuration of Layer 3 and
as IPv6 and VPLS) to interoperate with VLAN tagged traffic orginated Layer 2 sub-interfaces (e.g. attachment circuits) that can
interoperate with IETF based forwarding protocols; such as IP and
L3VPN services; or L2VPN services like VPWS, VPLS, and EVPN. The
sub-interfaces also interoperate with VLAN tagged traffic orginating
from an IEEE 802.1Q compliant bridge. Primarily the classification from an IEEE 802.1Q compliant bridge. Primarily the classification
is based on VLAN identifiers in the 802.1Q VLAN tags, but the model is based on VLAN identifiers in the 802.1Q VLAN tags, but the model
also has support for matching on some other layer 2 frame header also has support for matching on some other layer 2 frame header
fields and is designed to be extensible to match on other arbitrary fields and is designed to be extensible to match on other arbitrary
header fields. header fields.
The model differs from an IEEE 802.1Q bridge model in that the The model differs from an IEEE 802.1Q bridge model in that the
configuration is interface/sub-interface based as opposed to being configuration is interface/sub-interface based as opposed to being
based on membership of an 802.1Q VLAN bridge. based on membership of an 802.1Q VLAN bridge.
skipping to change at page 1, line 46 skipping to change at page 1, line 49
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on July 24, 2017. This Internet-Draft will expire on September 14, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 34 skipping to change at page 2, line 34
1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 4 1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 4
2. Objectives . . . . . . . . . . . . . . . . . . . . . . . . . 4 2. Objectives . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1. Interoperability with IEEE 802.1Q compliant bridges . . . 4 2.1. Interoperability with IEEE 802.1Q compliant bridges . . . 4
2.2. Extensibility . . . . . . . . . . . . . . . . . . . . . . 4 2.2. Extensibility . . . . . . . . . . . . . . . . . . . . . . 4
3. L3 Interface VLAN Model . . . . . . . . . . . . . . . . . . . 5 3. L3 Interface VLAN Model . . . . . . . . . . . . . . . . . . . 5
4. Flexible Encapsulation Model . . . . . . . . . . . . . . . . 5 4. Flexible Encapsulation Model . . . . . . . . . . . . . . . . 5
5. L3 Interface VLAN YANG Module . . . . . . . . . . . . . . . . 7 5. L3 Interface VLAN YANG Module . . . . . . . . . . . . . . . . 7
6. Flexible Encapsulation YANG Module . . . . . . . . . . . . . 10 6. Flexible Encapsulation YANG Module . . . . . . . . . . . . . 10
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 19 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 19
8. ChangeLog . . . . . . . . . . . . . . . . . . . . . . . . . . 19 8. ChangeLog . . . . . . . . . . . . . . . . . . . . . . . . . . 19
8.1. Version -04 . . . . . . . . . . . . . . . . . . . . . . . 19 8.1. WG version -01 . . . . . . . . . . . . . . . . . . . . . 19
8.2. Version -03 . . . . . . . . . . . . . . . . . . . . . . . 20 8.2. Version -04 . . . . . . . . . . . . . . . . . . . . . . . 20
8.3. Version -03 . . . . . . . . . . . . . . . . . . . . . . . 20
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20
10. Security Considerations . . . . . . . . . . . . . . . . . . . 20 10. Security Considerations . . . . . . . . . . . . . . . . . . . 20
10.1. if-l3-vlan.yang . . . . . . . . . . . . . . . . . . . . 20 10.1. if-l3-vlan.yang . . . . . . . . . . . . . . . . . . . . 21
10.2. flexible-encapsulation.yang . . . . . . . . . . . . . . 21 10.2. flexible-encapsulation.yang . . . . . . . . . . . . . . 21
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 23 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 23
11.1. Normative References . . . . . . . . . . . . . . . . . . 23 11.1. Normative References . . . . . . . . . . . . . . . . . . 23
11.2. Informative References . . . . . . . . . . . . . . . . . 23 11.2. Informative References . . . . . . . . . . . . . . . . . 23
Appendix A. Comparison with the IEEE 802.1Q Configuration Model 24 Appendix A. Comparison with the IEEE 802.1Q Configuration Model 24
A.1. Sub-interface based configuration model overview . . . . 24 A.1. Sub-interface based configuration model overview . . . . 24
A.2. IEEE 802.1Q Bridge Configuration Model Overview . . . . . 25 A.2. IEEE 802.1Q Bridge Configuration Model Overview . . . . . 25
A.3. Possible Overlap Between the Two Models . . . . . . . . . 25 A.3. Possible Overlap Between the Two Models . . . . . . . . . 26
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 26 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 26
1. Introduction 1. Introduction
This document defines two YANG [RFC6020] modules that augment the This document defines two YANG [RFC7950] modules that augment the
encapsulation choice YANG element defined in Interface Extensions encapsulation choice YANG element defined in Interface Extensions
YANG [I-D.ietf-netmod-intf-ext-yang] and the generic interfaces data YANG [I-D.ietf-netmod-intf-ext-yang] and the generic interfaces data
model defined in [RFC7223]. The two modules provide configuration model defined in [RFC7223]. The two modules provide configuration
nodes to support classification of Ethernet/VLAN traffic to sub- nodes to support classification of Ethernet/VLAN traffic to sub-
interfaces, that can have interface based feature and service interfaces, that can have interface based feature and service
configuration applied to them. configuration applied to them.
The purpose of these models is to allow IETF defined forwarding The purpose of these models is to allow IETF defined forwarding
protocols, such as IPv6 [RFC2460], Ethernet Pseudo Wires [RFC4448] protocols, such as IPv6 [RFC2460], Ethernet Pseudo Wires [RFC4448]
and VPLS [RFC4761] [RFC4762] to be configurable via YANG when and VPLS [RFC4761] [RFC4762] to be configurable via YANG when
skipping to change at page 5, line 17 skipping to change at page 5, line 17
3. L3 Interface VLAN Model 3. L3 Interface VLAN Model
The L3 Interface VLAN model provides appropriate leaves for The L3 Interface VLAN model provides appropriate leaves for
termination of an 802.1Q VLAN tagged segment to a sub-interface based termination of an 802.1Q VLAN tagged segment to a sub-interface based
L3 service. It allows for termination of traffic with up to two L3 service. It allows for termination of traffic with up to two
802.1Q VLAN tags. 802.1Q VLAN tags.
The "if-l3-vlan" YANG module has the following structure: The "if-l3-vlan" YANG module has the following structure:
augment /if:interfaces/if:interface/if-cmn:encapsulation/ module: ietf-if-l3-vlan
if-cmn:encaps-type: augment /if:interfaces/if:interface/if-cmn:encapsulation/
+--:(vlan) if-cmn:encaps-type:
+--rw vlan +--:(vlan)
+--rw tags +--rw vlan
+--rw tag* [index] +--rw tag* [index]
+--rw index uint8 +--rw index uint8
+--rw dot1q-tag +--rw dot1q-tag
+--rw tag-type dot1q-tag-type +--rw tag-type dot1q-tag-type
+--rw vlan-id dot1q-vlan-id +--rw vlan-id ieee:vlanid
4. Flexible Encapsulation Model 4. Flexible Encapsulation Model
The Flexible Encapsulation model is designed to allow for the The Flexible Encapsulation model is designed to allow for the
flexible provisioning of layer 2 services. It provides the flexible provisioning of layer 2 services. It provides the
capability to classify Ethernet/VLAN frames received on an Ethernet capability to classify Ethernet/VLAN frames received on an Ethernet
trunk interface to sub-interfaces based on the fields available in trunk interface to sub-interfaces based on the fields available in
the layer 2 headers. Once classified to sub-interfaces, it provides the layer 2 headers. Once classified to sub-interfaces, it provides
the capability to selectively modify fields within the layer 2 the capability to selectively modify fields within the layer 2
headers before the frame is handed off to the appropriate forwarding headers before the frame is handed off to the appropriate forwarding
skipping to change at page 6, line 22 skipping to change at page 6, line 22
The final aim for the model design is for it to be cleanly extensible 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 to add in additional match and rewrite criteria of the layer 2
header, such as matching on the source or destination MAC address, header, such as matching on the source or destination MAC address,
PCP or DEI fields in the 802.1Q tags, or the EtherType of the frame PCP or DEI fields in the 802.1Q tags, or the EtherType of the frame
payload. Rewrites can also be extended to allow for modification of payload. Rewrites can also be extended to allow for modification of
other fields within the layer 2 frame header. other fields within the layer 2 frame header.
The "flexible-encapsulation" YANG module has the following structure: The "flexible-encapsulation" YANG module has the following structure:
augment /if:interfaces/if:interface/if-cmn:encapsulation/ module: ietf-flexible-encapsulation
if-cmn:encaps-type: augment /if:interfaces/if:interface/if-cmn:encapsulation/
+--:(flexible) {flexible-encapsulation-rewrites}? if-cmn:encaps-type:
+--rw flexible +--:(flexible) {flexible-encapsulation-rewrites}?
+--rw match +--rw flexible
| +--rw (match-type) +--rw match
| +--:(default) | +--rw (match-type)
| | +--rw default? empty | +--:(default)
| +--:(untagged) | | +--rw default? empty
| | +--rw untagged? empty | +--:(untagged)
| +--:(priority-tagged) | | +--rw untagged? empty
| | +--rw priority-tagged | +--:(priority-tagged)
| | +--rw tag-type? dot1q:dot1q-tag-type | | +--rw priority-tagged
| +--:(vlan-tagged) | | +--rw tag-type? dot1q-types:dot1q-tag-type
| +--rw vlan-tagged | +--:(vlan-tagged)
| +--rw tag* [index] | +--rw vlan-tagged
| | +--rw index uint8 | +--rw tag* [index]
| | +--rw dot1q-tag | | +--rw index uint8
| | +--rw tag-type dot1q-tag-type | | +--rw dot1q-tag
| | +--rw vlan-id union | | +--rw tag-type dot1q-tag-type
| +--rw match-exact-tags? empty | | +--rw vlan-id union
+--rw rewrite {flexible-rewrites}? | +--rw match-exact-tags? empty
+--rw (direction)? +--rw rewrite {flexible-rewrites}?
+--:(symmetrical) +--rw (direction)?
| +--rw symmetrical +--:(symmetrical)
| +--rw tag-rewrite {tag-rewrites}? | +--rw symmetrical
| +--rw pop-tags? uint8 | +--rw tag-rewrite {tag-rewrites}?
| +--rw push-tags* [index] | +--rw pop-tags? uint8
| +--rw index uint8 | +--rw push-tag* [index]
| +--rw dot1q-tag | +--rw index uint8
| +--rw tag-type dot1q-tag-type | +--rw dot1q-tag
| +--rw vlan-id dot1q-vlan-id | +--rw tag-type dot1q-tag-type
+--:(asymmetrical) {asymmetric-rewrites}? | +--rw vlan-id ieee:vlanid
+--rw ingress +--:(asymmetrical) {asymmetric-rewrites}?
| +--rw tag-rewrite {tag-rewrites}? +--rw ingress
| +--rw pop-tags? uint8 | +--rw tag-rewrite {tag-rewrites}?
| +--rw push-tags* [index] | +--rw pop-tags? uint8
| +--rw index uint8 | +--rw push-tag* [index]
| +--rw dot1q-tag | +--rw index uint8
| +--rw tag-type dot1q-tag-type | +--rw dot1q-tag
| +--rw vlan-id dot1q-vlan-id | +--rw tag-type dot1q-tag-type
+--rw egress | +--rw vlan-id ieee:vlanid
+--rw tag-rewrite {tag-rewrites}? +--rw egress
+--rw pop-tags? uint8 +--rw tag-rewrite {tag-rewrites}?
+--rw push-tags* [index] +--rw pop-tags? uint8
+--rw index uint8 +--rw push-tag* [index]
+--rw dot1q-tag +--rw index uint8
+--rw tag-type dot1q-tag-type +--rw dot1q-tag
+--rw vlan-id dot1q-vlan-id +--rw tag-type dot1q-tag-type
augment /if:interfaces/if:interface: +--rw vlan-id ieee:vlanid
+--rw flexible-encapsulation augment /if:interfaces/if:interface:
+--rw local-traffic-default-encaps +--rw flexible-encapsulation
+--rw tag* [index] +--rw local-traffic-default-encaps
+--rw index uint8 +--rw tag* [index]
+--rw dot1q-tag +--rw index uint8
+--rw tag-type dot1q-tag-type +--rw dot1q-tag
+--rw vlan-id dot1q-vlan-id +--rw tag-type dot1q-tag-type
+--rw vlan-id ieee:vlanid
5. L3 Interface VLAN YANG Module 5. L3 Interface VLAN YANG Module
This YANG module augments the encapsultion container defined in This YANG module augments the encapsultion container defined in
Interface Extensions YANG [I-D.ietf-netmod-intf-ext-yang]. Interface Extensions YANG [I-D.ietf-netmod-intf-ext-yang].
<CODE BEGINS> file "ietf-if-l3-vlan@2016-10-21.yang" <CODE BEGINS> file "ietf-if-l3-vlan@2017-03-13.yang"
module ietf-if-l3-vlan { module ietf-if-l3-vlan {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-if-l3-vlan"; namespace "urn:ietf:params:xml:ns:yang:ietf-if-l3-vlan";
prefix if-l3-vlan; prefix if-l3-vlan;
import ietf-interfaces { import ietf-interfaces {
prefix if; prefix if;
} }
import iana-if-type { import iana-if-type {
prefix ianaift; prefix ianaift;
} }
import ieee802-dot1q-types { import ieee802-dot1q-types {
prefix dot1q-types; prefix dot1q-types;
} }
import ietf-interfaces-common { import ietf-interfaces-common {
prefix if-cmn; prefix if-cmn;
} }
organization organization
"IETF NETMOD (NETCONF Data Modeling Language) Working Group"; "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
skipping to change at page 8, line 31 skipping to change at page 8, line 35
WG Chair: Kent Watsen WG Chair: Kent Watsen
<mailto:kwatsen@juniper.net> <mailto:kwatsen@juniper.net>
Editor: Robert Wilton Editor: Robert Wilton
<mailto:rwilton@cisco.com>"; <mailto:rwilton@cisco.com>";
description description
"This YANG module models L3 VLAN sub-interfaces"; "This YANG module models L3 VLAN sub-interfaces";
revision 2016-10-21 { revision 2017-03-13 {
description "Latest draft revision"; description "Latest draft revision";
reference "Internet-Draft draft-wilton-netmod-intf-vlan-yang-04"; reference
} "Internet-Draft draft-ietf-netmod-sub-intf-vlan-model-01";
feature l3-vlan-sub-interfaces {
description
"This feature indicates that the device supports L3 VLAN
sub-interfaces";
} }
/* /*
* Add support for the 802.1Q VLAN encapsulation syntax on layer 3 * Add support for the 802.1Q VLAN encapsulation syntax on layer 3
* terminated VLAN sub-interfaces. * terminated VLAN sub-interfaces.
*/ */
augment "/if:interfaces/if:interface/if-cmn:encapsulation/" + augment "/if:interfaces/if:interface/if-cmn:encapsulation/" +
"if-cmn:encaps-type" { "if-cmn:encaps-type" {
when "../if:type = 'ianaift:l2vlan' and when "../if:type = 'ianaift:l2vlan' and
../if-cmn:transport-layer = 'layer-3'" { derived-from-or-self(../if-cmn:forwarding-mode,
description "Applies only to VLAN sub-interfaces that are 'if-cmn:network-layer')" {
operating at layer 3"; description
"Applies only to VLAN sub-interfaces that are operating at
layer 3";
} }
if-feature l3-vlan-sub-interfaces; description
description "Augment the generic interface encapsulation with an "Augment the generic interface encapsulation with an
encapsulation for layer 3 VLAN sub-interfaces"; encapsulation for layer 3 VLAN sub-interfaces";
/* /*
* Matches a VLAN, or pair of VLAN Ids to classify traffic * Matches a VLAN, or pair of VLAN Ids to classify traffic
* into an L3 service. * into an L3 service.
*/ */
case vlan { case vlan {
container vlan { container vlan {
description description
"Match VLAN tagged frames with specific VLAN Ids"; "Match VLAN tagged frames with specific VLAN Ids";
container tags { list tag {
description "Matches frames tagged with specific VLAN Ids"; must 'index != 0 or ' +
list tag { 'count(../tag/index) != 2 or ' +
must 'index != 0 or ' + 'dot1q-tag/tag-type = "s-vlan"' {
'count(../tag/index) != 2 or ' + error-message
'dot1q-tag/tag-type = "s-vlan"' { "When matching two tags, the outer tag must be of
error-message S-VLAN tag type";
"When matching two tags, the outer tag must be of description
S-VLAN tag type"; "For IEEE 802.1Q interoperability, when matching two
description tags, it is required that the outer tag is an S-VLAN,
"For IEEE 802.1Q interoperability, when matching two and the inner tag is a C-VLAN";
tags, it is required that the outer tag is an }
S-VLAN, and the inner tag is a C-VLAN";
}
must 'index != 1 or ' +
'count(../tag/index) != 2 or ' +
'dot1q-tag/tag-type = "c-vlan"' {
error-message
"When matching two tags, the inner tag must be of
C-VLAN tag type";
description
"For IEEE 802.1Q interoperability, when matching two
tags, it is required that the outer tag is an
S-VLAN, and the inner tag is a C-VLAN";
}
key "index"; must 'index != 1 or ' +
min-elements 1; 'count(../tag/index) != 2 or ' +
max-elements 2; 'dot1q-tag/tag-type = "c-vlan"' {
error-message
"When matching two tags, the inner tag must be of
C-VLAN tag type";
description
"For IEEE 802.1Q interoperability, when matching two
tags, it is required that the outer tag is an S-VLAN,
and the inner tag is a C-VLAN";
}
description "The tags to match, with the outermost tag to key "index";
match with index 0"; min-elements 1;
leaf index { max-elements 2;
type uint8 {
range "0..1";
}
/* description
* Only allow matching on an inner tag (at index 1), if "The tags to match, with the outermost tag to match with
* also matching on the outer tag at the same time. index 0";
*/ leaf index {
must ". = 0 or type uint8 {
count(../../tag[index = 0]/index) > 0" { range "0..1";
error-message }
"An inner tag can only be matched on when also
matching on an outer tag";
description
"Only allow matching on an inner tag, if also
matching on the outer tag at the same time";
}
/*
* Only allow matching on an inner tag (at index 1), if
* also matching on the outer tag at the same time.
*/
must ". = 0 or
count(../../tag[index = 0]/index) > 0" {
error-message
"An inner tag can only be matched on when also
matching on an outer tag";
description description
"The index into the tag stack, outermost tag first"; "Only allow matching on an inner tag, if also
matching on the outer tag at the same time";
} }
uses dot1q-types:dot1q-tag-classifier; description
"The index into the tag stack, outermost tag first";
} }
uses dot1q-types:dot1q-tag-classifier-grouping;
} }
} }
} }
} }
} }
<CODE ENDS> <CODE ENDS>
6. Flexible Encapsulation YANG Module 6. Flexible Encapsulation YANG Module
This YANG module augments the encapsultion container defined in This YANG module augments the encapsultion container defined in
Interface Extensions YANG [I-D.ietf-netmod-intf-ext-yang]. Interface Extensions YANG [I-D.ietf-netmod-intf-ext-yang].
This YANG module also augments the interface container defined in This YANG module also augments the interface container defined in
[RFC7223]. [RFC7223].
<CODE BEGINS> file "ietf-flexible-encapsulation@2016-10-21.yang" <CODE BEGINS> file "ietf-flexible-encapsulation@2017-03-13.yang"
module ietf-flexible-encapsulation { module ietf-flexible-encapsulation {
yang-version 1.1;
namespace namespace
"urn:ietf:params:xml:ns:yang:ietf-flexible-encapsulation"; "urn:ietf:params:xml:ns:yang:ietf-flexible-encapsulation";
prefix flex; prefix flex;
import ietf-interfaces { import ietf-interfaces {
prefix if; prefix if;
} }
import ietf-interfaces-common { import ietf-interfaces-common {
prefix if-cmn; prefix if-cmn;
skipping to change at page 11, line 36 skipping to change at page 11, line 36
WG Chair: Kent Watsen WG Chair: Kent Watsen
<mailto:kwatsen@juniper.net> <mailto:kwatsen@juniper.net>
Editor: Robert Wilton Editor: Robert Wilton
<mailto:rwilton@cisco.com>"; <mailto:rwilton@cisco.com>";
description description
"This YANG module describes interface configuration for flexible "This YANG module describes interface configuration for flexible
VLAN matches and rewrites."; VLAN matches and rewrites.";
revision 2016-10-21 { revision 2017-03-13 {
description "Latest draft revision"; description "Latest draft revision";
reference reference
"Internet-Draft draft-wilton-netmod-intf-vlan-yang-04"; "Internet-Draft draft-ietf-netmod-sub-intf-vlan-model-01";
} }
feature flexible-encapsulation-rewrites { feature flexible-encapsulation-rewrites {
description description
"This feature indicates whether the network element supports "This feature indicates whether the network element supports
flexible Ethernet encapsulation that allows for matching VLAN flexible Ethernet encapsulation that allows for matching VLAN
ranges and performing independent tag manipulations"; ranges and performing independent tag manipulations";
} }
feature flexible-rewrites { feature flexible-rewrites {
skipping to change at page 14, line 30 skipping to change at page 14, line 30
error-message "An inner tag can only be matched on error-message "An inner tag can only be matched on
when also matching on an outer tag"; when also matching on an outer tag";
description "Only allow matching on an inner tag, if description "Only allow matching on an inner tag, if
also matching on the outer tags at the also matching on the outer tags at the
same time"; same time";
} }
description description
"The index into the tag stack, outermost tag first"; "The index into the tag stack, outermost tag first";
} }
uses dot1q-types:dot1q-tag-ranges-or-any-classifier; uses
'dot1q-types:'+
'dot1q-tag-ranges-or-any-classifier-grouping';
} }
leaf match-exact-tags { leaf match-exact-tags {
type empty; type empty;
description description
"If set, indicates that all 802.1Q VLAN tags in the "If set, indicates that all 802.1Q VLAN tags in the
Ethernet frame header must be explicitly matched, i.e. Ethernet frame header must be explicitly matched, i.e.
the EtherType following the matched tags must not be a the EtherType following the matched tags must not be a
802.1Q tag EtherType. If unset then extra 802.1Q VLAN 802.1Q tag EtherType. If unset then extra 802.1Q VLAN
tags are allowed."; tags are allowed.";
skipping to change at page 15, line 15 skipping to change at page 15, line 16
grouping tag-rewrite { grouping tag-rewrite {
description "Flexible rewrite"; description "Flexible rewrite";
leaf pop-tags { leaf pop-tags {
type uint8 { type uint8 {
range 1..2; range 1..2;
} }
description "The number of tags to pop (or translate if used in description "The number of tags to pop (or translate if used in
conjunction with push-tags)"; conjunction with push-tags)";
} }
list push-tags { list push-tag {
must 'index != 0 or ' + must 'index != 0 or ' +
'count(../push-tags/index) != 2 or ' + 'count(../push-tag/index) != 2 or ' +
'dot1q-tag/tag-type = "s-vlan"' { 'dot1q-tag/tag-type = "s-vlan"' {
error-message error-message
"When pushing two tags, the outer tag must be of "When pushing two tags, the outer tag must be of
S-VLAN tag type"; S-VLAN tag type";
description description
"For IEEE 802.1Q interoperability, when pushing two "For IEEE 802.1Q interoperability, when pushing two
tags, it is required that the outer tag is an tags, it is required that the outer tag is an
S-VLAN, and the inner tag is a C-VLAN"; S-VLAN, and the inner tag is a C-VLAN";
} }
must 'index != 1 or ' + must 'index != 1 or ' +
'count(../push-tags/index) != 2 or ' + 'count(../push-tag/index) != 2 or ' +
'dot1q-tag/tag-type = "c-vlan"' { 'dot1q-tag/tag-type = "c-vlan"' {
error-message error-message
"When pushing two tags, the inner tag must be of "When pushing two tags, the inner tag must be of
C-VLAN tag type"; C-VLAN tag type";
description description
"For IEEE 802.1Q interoperability, when pushing two "For IEEE 802.1Q interoperability, when pushing two
tags, it is required that the outer tag is an tags, it is required that the outer tag is an
S-VLAN, and the inner tag is a C-VLAN"; S-VLAN, and the inner tag is a C-VLAN";
} }
skipping to change at page 15, line 51 skipping to change at page 16, line 4
max-elements 2; max-elements 2;
description "The number of tags to push (or translate if used description "The number of tags to push (or translate if used
in conjunction with pop-tags)"; in conjunction with pop-tags)";
/* /*
* Server should order by increasing index. * Server should order by increasing index.
*/ */
leaf index { leaf index {
type uint8 { type uint8 {
range 0..1; range 0..1;
} }
/* /*
* Only allow a push of an inner tag if an outer tag is also * Only allow a push of an inner tag if an outer tag is also
* being pushed. * being pushed.
*/ */
must ". != 0 or must ". != 0 or
count(../../push-tags[index = 0]/index) > 0" { count(../../push-tag[index = 0]/index) > 0" {
error-message "An inner tag can only be pushed if an outer error-message "An inner tag can only be pushed if an outer
tag is also specified"; tag is also specified";
description "Only allow a push of an inner tag if an outer description "Only allow a push of an inner tag if an outer
tag is also being pushed"; tag is also being pushed";
} }
description "The index into the tag stack"; description "The index into the tag stack";
} }
uses dot1q-types:dot1q-tag-classifier; uses dot1q-types:dot1q-tag-classifier-grouping;
} }
} }
/* /*
* Grouping for all flexible rewrites of fields in the L2 header. * Grouping for all flexible rewrites of fields in the L2 header.
* *
* This currently only includes flexible tag rewrites, but is * This currently only includes flexible tag rewrites, but is
* designed to be extensible to cover rewrites of other fields in * designed to be extensible to cover rewrites of other fields in
* the L2 header if required. * the L2 header if required.
*/ */
skipping to change at page 16, line 48 skipping to change at page 16, line 49
container tag-rewrite { container tag-rewrite {
if-feature tag-rewrites; if-feature tag-rewrites;
description "Tag rewrite. Translate operations are expressed description "Tag rewrite. Translate operations are expressed
as a combination of tag push and pop operations."; as a combination of tag push and pop operations.";
uses tag-rewrite; uses tag-rewrite;
} }
} }
augment "/if:interfaces/if:interface/if-cmn:encapsulation/" + augment "/if:interfaces/if:interface/if-cmn:encapsulation/" +
"if-cmn:encaps-type" { "if-cmn:encaps-type" {
when "../if:type = 'if-cmn:ethSubInterface' and when "../if:type = 'if-cmn:ethSubInterface' and
../if-cmn:transport-layer = 'layer-2'" { derived-from-or-self(../if-cmn:forwarding-mode,
'if-cmn:layer-2-forwarding')" {
description "Applies only to Ethernet sub-interfaces that are description "Applies only to Ethernet sub-interfaces that are
operating at transport layer 2"; operating at transport layer 2";
} }
description description
"Add flexible match and rewrite for VLAN sub-interfaces"; "Add flexible match and rewrite for VLAN sub-interfaces";
/* /*
* A flexible encapsulation allows for the matching of ranges and * A flexible encapsulation allows for the matching of ranges and
* sets of VLAN Ids. The structure is also designed to be * sets of VLAN Ids. The structure is also designed to be
* extended to allow for matching/rewriting other fields within * extended to allow for matching/rewriting other fields within
skipping to change at page 18, line 16 skipping to change at page 18, line 19
} }
} }
} }
} }
} }
} }
} }
augment "/if:interfaces/if:interface" { augment "/if:interfaces/if:interface" {
when "if:type = 'if-cmn:ethSubInterface' and when "if:type = 'if-cmn:ethSubInterface' and
if-cmn:transport-layer = 'layer-2'" { derived-from-or-self(if-cmn:forwarding-mode,
'if-cmn:layer-2-forwarding')" {
description "Any L2 Ethernet sub-interfaces"; description "Any L2 Ethernet sub-interfaces";
} }
description "Add flexible encapsulation configuration for VLAN description "Add flexible encapsulation configuration for VLAN
sub-interfaces"; sub-interfaces";
/* /*
* All flexible encapsulation specific interface configuration * All flexible encapsulation specific interface configuration
* (except for the actual encapsulation and rewrite) is contained * (except for the actual encapsulation and rewrite) is contained
* by a flexible-encapsulation container on the interface. * by a flexible-encapsulation container on the interface.
*/ */
skipping to change at page 19, line 20 skipping to change at page 19, line 23
error-message "An inner tag can only be specified if an error-message "An inner tag can only be specified if an
outer tag has also been specified"; outer tag has also been specified";
description "Ensure that an inner tag cannot be description "Ensure that an inner tag cannot be
specified without an outer tag'"; specified without an outer tag'";
} }
description "The index into the tag stack, outermost tag description "The index into the tag stack, outermost tag
assigned index 0"; assigned index 0";
} }
uses dot1q-types:dot1q-tag-classifier; uses dot1q-types:dot1q-tag-classifier-grouping;
} }
} }
} }
} }
} }
<CODE ENDS> <CODE ENDS>
7. Acknowledgements 7. Acknowledgements
The authors would particularly like to thank John Messenger, Glenn The authors would particularly like to thank John Messenger, Glenn
Parsons, and Dan Romascanu for their help progressing this draft. Parsons, and Dan Romascanu for their help progressing this draft.
The authors would also like to thank Eric Gray, Marc Holness, Neil The authors would also like to thank Alex Campbell, Eric Gray, Giles
Ketley, William Lupton, John Messenger, Glenn Parsons, Ludwig Heron, Marc Holness, Iftekhar Hussain, Neil Ketley, William Lupton,
Pauwels, and members of the IEEE 802.1 WG for their helpful feedback John Messenger, Glenn Parsons, Ludwig Pauwels, and members of the
on this draft. IEEE 802.1 WG for their helpful reviews and feedback on this draft.
8. ChangeLog 8. ChangeLog
8.1. Version -04 8.1. WG version -01
o Tweaked the abstract.
o Removed unnecessary feature for the L3 sub-interface module.
o Update the 802.1Qcp type references.
o Remove extra tag container for L3 sub-interfaces YANG.
8.2. Version -04
o IEEE 802.1 specific types have been removed from the draft. These o IEEE 802.1 specific types have been removed from the draft. These
are now referenced from the 802.1Qcp draft YANG modules. are now referenced from the 802.1Qcp draft YANG modules.
o Fixed errors in the xpath expressions. o Fixed errors in the xpath expressions.
8.2. Version -03 8.3. Version -03
o Incorporates feedback received from presenting to the IEEE 802.1 o Incorporates feedback received from presenting to the IEEE 802.1
WG. WG.
o Updates the modules for double tag matches/rewrites to restrict o Updates the modules for double tag matches/rewrites to restrict
the outer tag type to S-VLAN and inner tag type to C-VLAN. the outer tag type to S-VLAN and inner tag type to C-VLAN.
o Updates the introduction to indicate primary use case is for IETF o Updates the introduction to indicate primary use case is for IETF
forwarding protocols. forwarding protocols.
skipping to change at page 21, line 7 skipping to change at page 21, line 16
The nodes in the if-l3-vlan YANG module are concerned with matching The nodes in the if-l3-vlan YANG module are concerned with matching
particular frames received on the network device to connect them to a particular frames received on the network device to connect them to a
layer 3 forwarding instance, and as such adding/modifying/deleting layer 3 forwarding instance, and as such adding/modifying/deleting
these nodes has a high risk of causing traffic to be lost because it these nodes has a high risk of causing traffic to be lost because it
is not being classified correctly, or is being classified to a is not being classified correctly, or is being classified to a
separate sub-interface. The nodes, all under the subtree separate sub-interface. The nodes, all under the subtree
/interfaces/interface/encapsulation/vlan, that are sensitive to this /interfaces/interface/encapsulation/vlan, that are sensitive to this
are: are:
o tags o tag
o tags/index o tag/index
o tags/index/tag-type o tag/index/tag-type
o tags/index/vlan-id o tag/index/vlan-id
10.2. flexible-encapsulation.yang 10.2. flexible-encapsulation.yang
There are many nodes in the flexible-encapsulation YANG module that There are many nodes in the flexible-encapsulation YANG module that
are concerned with matching particular frames received on the network are concerned with matching particular frames received on the network
device, and as such adding/modifying/deleting these nodes has a high device, and as such adding/modifying/deleting these nodes has a high
risk of causing traffic to be lost because it is not being classified risk of causing traffic to be lost because it is not being classified
correctly, or is being classified to a separate sub-interface. The correctly, or is being classified to a separate sub-interface. The
nodes, all under the subtree nodes, all under the subtree
/interfaces/interface/encapsulation/flexible/match, that are /interfaces/interface/encapsulation/flexible/match, that are
skipping to change at page 22, line 9 skipping to change at page 22, line 16
particular frames received on the network device, and as such particular frames received on the network device, and as such
adding/modifying/deleting these nodes has a high risk of causing adding/modifying/deleting these nodes has a high risk of causing
traffic to be dropped or incorrectly processed on peer network traffic to be dropped or incorrectly processed on peer network
devices, or it could cause layer 2 tunnels to go down due to a devices, or it could cause layer 2 tunnels to go down due to a
mismatch in negotiated MTU. The nodes, all under the subtree mismatch in negotiated MTU. The nodes, all under the subtree
/interfaces/interface/encapsulation/flexible/rewrite, that are /interfaces/interface/encapsulation/flexible/rewrite, that are
sensitive to this are: sensitive to this are:
o symmetrical/tag-rewrite/pop-tags o symmetrical/tag-rewrite/pop-tags
o symmetrical/tag-rewrite/push-tags o symmetrical/tag-rewrite/push-tag
o symmetrical/tag-rewrite/push-tags/index o symmetrical/tag-rewrite/push-tag/index
o symmetrical/tag-rewrite/push-tags/dot1q-tag/tag-type o symmetrical/tag-rewrite/push-tag/dot1q-tag/tag-type
o symmetrical/tag-rewrite/push-tags/dot1q-tag/vlan-id o symmetrical/tag-rewrite/push-tag/dot1q-tag/vlan-id
o asymmetrical/ingress/tag-rewrite/pop-tags o asymmetrical/ingress/tag-rewrite/pop-tags
o asymmetrical/ingress/tag-rewrite/push-tags o asymmetrical/ingress/tag-rewrite/push-tag
o asymmetrical/ingress/tag-rewrite/push-tags/index o asymmetrical/ingress/tag-rewrite/push-tag/index
o asymmetrical/ingress/tag-rewrite/push-tags/dot1q-tag/tag-type o asymmetrical/ingress/tag-rewrite/push-tag/dot1q-tag/tag-type
o asymmetrical/ingress/tag-rewrite/push-tags/dot1q-tag/vlan-id o asymmetrical/ingress/tag-rewrite/push-tag/dot1q-tag/vlan-id
o asymmetrical/egress/tag-rewrite/pop-tags o asymmetrical/egress/tag-rewrite/pop-tags
o asymmetrical/egress/tag-rewrite/push-tags o asymmetrical/egress/tag-rewrite/push-tag
o asymmetrical/egress/tag-rewrite/push-tags/index o asymmetrical/egress/tag-rewrite/push-tag/index
o asymmetrical/egress/tag-rewrite/push-tags/dot1q-tag/tag-type o asymmetrical/egress/tag-rewrite/push-tag/dot1q-tag/tag-type
o asymmetrical/egress/tag-rewrite/push-tags/dot1q-tag/vlan-id o asymmetrical/egress/tag-rewrite/push-tag/dot1q-tag/vlan-id
Nodes in the flexible-encapsulation YANG module that are concerned Nodes in the flexible-encapsulation YANG module that are concerned
with the VLAN tags to use for traffic sourced from the network with the VLAN tags to use for traffic sourced from the network
element could cause protocol sessions (such as CFM) to fail if they element could cause protocol sessions (such as CFM) to fail if they
are added, modified or deleted. The nodes, all under the subtree are added, modified or deleted. The nodes, all under the subtree
/interfaces/interface/flexible-encapsulation/local-traffic-default- /interfaces/interface/flexible-encapsulation/local-traffic-default-
encaps that are sensitive to this are: encaps that are sensitive to this are:
o tag o tag
o tag/index o tag/index
o tag/dot1q-tag/tag-type o tag/dot1q-tag/tag-type
o tag/dot1q-tag/vlan-id o tag/dot1q-tag/vlan-id
11. References 11. References
11.1. Normative References 11.1. Normative References
skipping to change at page 23, line 12 skipping to change at page 23, line 17
o tag/dot1q-tag/vlan-id o tag/dot1q-tag/vlan-id
11. References 11. References
11.1. Normative References 11.1. Normative References
[I-D.ietf-netmod-intf-ext-yang] [I-D.ietf-netmod-intf-ext-yang]
Wilton, R., Ball, D., tsingh@juniper.net, t., and S. Wilton, R., Ball, D., tsingh@juniper.net, t., and S.
Sivaraj, "Common Interface Extension YANG Data Models", Sivaraj, "Common Interface Extension YANG Data Models",
draft-ietf-netmod-intf-ext-yang-03 (work in progress), draft-ietf-netmod-intf-ext-yang-04 (work in progress),
October 2016. March 2017.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>. <http://www.rfc-editor.org/info/rfc2119>.
[RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for
the Network Configuration Protocol (NETCONF)", RFC 6020,
DOI 10.17487/RFC6020, October 2010,
<http://www.rfc-editor.org/info/rfc6020>.
[RFC7223] Bjorklund, M., "A YANG Data Model for Interface [RFC7223] Bjorklund, M., "A YANG Data Model for Interface
Management", RFC 7223, DOI 10.17487/RFC7223, May 2014, Management", RFC 7223, DOI 10.17487/RFC7223, May 2014,
<http://www.rfc-editor.org/info/rfc7223>. <http://www.rfc-editor.org/info/rfc7223>.
[RFC7224] Bjorklund, M., "IANA Interface Type YANG Module", [RFC7224] Bjorklund, M., "IANA Interface Type YANG Module",
RFC 7224, DOI 10.17487/RFC7224, May 2014, RFC 7224, DOI 10.17487/RFC7224, May 2014,
<http://www.rfc-editor.org/info/rfc7224>. <http://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,
<http://www.rfc-editor.org/info/rfc7950>.
11.2. Informative References 11.2. Informative References
[dot1Qcp] Holness, M., "802.1Qcp Bridges and Bridged Networks - [dot1Qcp] Holness, M., "802.1Qcp Bridges and Bridged Networks -
Amendment: YANG Data Model", 2016. Amendment: YANG Data Model", 2016.
[RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6
(IPv6) Specification", RFC 2460, DOI 10.17487/RFC2460, (IPv6) Specification", RFC 2460, DOI 10.17487/RFC2460,
December 1998, <http://www.rfc-editor.org/info/rfc2460>. December 1998, <http://www.rfc-editor.org/info/rfc2460>.
[RFC4448] Martini, L., Ed., Rosen, E., El-Aawar, N., and G. Heron, [RFC4448] Martini, L., Ed., Rosen, E., El-Aawar, N., and G. Heron,
 End of changes. 65 change blocks. 
188 lines changed or deleted 204 lines changed or added

This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/