-
Notifications
You must be signed in to change notification settings - Fork 1
155 lines (125 loc) · 5.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
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";
}
import iana-if-type {
prefix ianaift;
reference
"RFC 7224: IANA Interface Type YANG Module";
}
import ieee802-dot1q-types {
prefix dot1q-types;
revision-date 2022-01-19;
reference
"IEEE Std 802.1Q-2022: IEEE Standard for Local and
metropolitan area networks -- Bridges and Bridged Networks";
}
import ietf-if-extensions {
prefix if-ext;
reference
"RFC XXXX: Common Interface Extension YANG Data Models";
}
organization
"IETF NETMOD (NETCONF Data Modeling Language) Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/netmod/>
WG List: <mailto:[email protected]>
Editor: Robert Wilton
<mailto:[email protected]>";
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) 2023 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 XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
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 2023-01-26 {
description
"Latest draft revision";
reference
"RFC XXXX: 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') or
derived-from-or-self(../if:type,
'if-ext:ethSubInterface')" {
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 C-VLAN and S-VLAN tags can be matched.";
description
"For IEEE 802.1Q interoperability, only C-VLAN and
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;
}
}
}
}
}