1 module o-ran-interfaces {
3 namespace "urn:o-ran:interfaces:1.0";
7 import ietf-inet-types {
15 import ietf-interfaces {
23 import ietf-hardware {
27 import ietf-yang-types {
31 import iana-hardware {
35 organization "O-RAN Alliance";
41 "This module defines the YANG definitions for managng the O-RAN
44 Copyright 2020 the O-RAN Alliance.
46 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
47 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
48 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
49 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
50 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
51 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
52 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
53 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
54 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
55 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
56 POSSIBILITY OF SUCH DAMAGE.
58 Redistribution and use in source and binary forms, with or without
59 modification, are permitted provided that the following conditions are met:
61 * Redistributions of source code must retain the above copyright notice,
62 this list of conditions and the above disclaimer.
63 * Redistributions in binary form must reproduce the above copyright notice,
64 this list of conditions and the above disclaimer in the documentation
65 and/or other materials provided with the distribution.
66 * Neither the Members of the O-RAN Alliance nor the names of its
67 contributors may be used to endorse or promote products derived from
68 this software without specific prior written permission.";
70 revision "2020-04-17" {
74 1) updated descriptions to clarify operation when vlan-tagging is false";
76 reference "ORAN-WG4.M.0-v03.00";
78 revision "2019-07-03" {
82 1) increasing max elements for user plane DSCP markings to 64
83 2) re-organizing layout to facilitate cross-WG adoption, whilst ensuring
84 nodes are syntactically and semantically equivalent";
86 reference "ORAN-WG4.M.0-v01.00";
89 revision "2019-02-04" {
93 1) imported model from xRAN
94 2) changed namespace and reference from xran to o-ran";
96 reference "ORAN-WG4.M.0-v01.00";
99 feature UDPIP-BASED-CU-PLANE {
101 "This feature indicates that the RU supports the UDP/IP based transport
105 feature ALIASMAC-BASED-CU-PLANE {
107 "This feature indicates that the RU supports the alias MAC address
108 based transport for the CU plane.";
117 "Priority Code Point. PCP is a 3-bit field that refers to the
118 class of service applied to a VLAN tagged frame. The
119 field specifies a priority value between 0 and 7, these values
120 can be used by quality of service (QoS) to prioritize
121 different classes of traffic.";
123 "IEEE 802.1Q-2014: Virtual Bridged Local Area Networks";
126 grouping cos-marking {
128 "Configuration data for CU Plane ethernet CoS marking.
129 This grouping is only applicable to an interface when vlan-tagging is
130 set to TRUE for that interface. In other cases, it may be ignored.";
131 container class-of-service {
134 leaf u-plane-marking {
138 "Marking used for default u-plane flows.
139 7 represents highest priority for u-plane marking";
141 leaf c-plane-marking {
144 description "7 represents highest priority for c-plane marking";
146 leaf m-plane-marking {
149 description "2 represents highest excellent effort for m-plane marking";
151 leaf s-plane-marking {
154 description "7 represents highest priority for s-plane marking";
159 description "1 represents best effort for other marking";
161 list enhanced-uplane-markings{
162 key "up-marking-name";
165 "list of mappings for enhanced (non-default) u-plane markings";
166 leaf up-marking-name {
168 description "The name of the marking";
170 leaf enhanced-marking {
172 description "the enhanced u-plane marking";
178 grouping dscp-marking {
180 "Configuration data for CU Plane DSCP marking";
181 container diffserv-markings {
183 "DSCP Configuration";
184 leaf u-plane-marking {
188 "Marking used for default u-plane flows.
189 46 represents expedited forwarding";
191 leaf c-plane-marking {
194 description "46 represents expedited forwarding";
196 leaf s-plane-marking {
199 description "46 represents expedited forwarding";
204 description "0 represents best effort forwarding";
206 list enhanced-uplane-markings{
210 "list of mappings for enhanced (non-default) u-plane markings";
211 leaf up-marking-name {
213 description "The name of the marking";
215 leaf enhanced-marking {
217 description "the enhanced u-plane marking";
223 // Cross Working Group Augmentations Follow
225 // Cross Working Group augmentations for basic Ethernet leafs
227 augment "/if:interfaces/if:interface" {
228 when "if:type = 'ianaift:ethernetCsmacd'" {
229 description "Applies to Ethernet interfaces";
232 "Augment the interface model with parameters for
233 base Ethernet interface";
242 "The maximum size of layer 2 frames that may be transmitted
243 or received on the interface (excluding any FCS overhead).
244 For Ethernet interfaces it also excludes the
245 4-8 byte overhead of any known (i.e. explicitly matched by
246 a child sub-interface) 801.1Q VLAN tags.";
252 "Indicates if VLAN tagging is used.
253 Default true is used to enable equipment to autonomously discover that
254 it is connected to a trunk port.
256 This may be set to false, for example, when the O-RU is directly
257 connected to the O-DU. In such cases, native Ethernet frames may be
258 used across the O-RAN interface, i.e., any PCP markings defined
259 in the cos-markings grouping are NOT used by the O-RU and any default
260 value or configured value using those leafs may be ignored by the O-RAN
266 // Cross Working Group augmentation for l2vlan interfaces for VLAN definition
268 augment "/if:interfaces/if:interface" {
269 when "if:type = 'ianaift:l2vlan'";
270 description "augments for VLAN definition";
271 leaf base-interface {
272 type if:interface-ref;
273 must "/if:interfaces/if:interface[if:name = current()]"
274 + "/o-ran-int:vlan-tagging = 'true'" {
276 "The base interface must have VLAN tagging enabled.";
279 "The base interface for the VLAN sub-interafce.";
290 // Cross Working Group augmention for both ethernetCsmacd and l2vlan interfaces
292 augment "/if:interfaces/if:interface" {
293 when "(if:type = 'ianaift:ethernetCsmacd') or
294 (if:type = 'ianaift:l2vlan')" {
295 description "Applies to ethernetCsmacd and l2vlan interfaces";
298 "Augment the interface model with parameters for all
299 both ethernetCsmacd and l2vlan interfaces.";
301 type yang:date-and-time;
304 "Timestamp of the last time the interface counters were
309 // Cross Working Group augmention to ietf-ip covering DSCP for M-Plane
311 augment "/if:interfaces/if:interface/ip:ipv4" {
312 description "augments for IPv4 based M-Plane transport";
313 leaf m-plane-marking {
316 description "18 represents AF21 or 'immediate traffic'";
319 augment "/if:interfaces/if:interface/ip:ipv6" {
320 description "augments for IPv6 based M-Plane transport";
321 leaf m-plane-marking {
324 description "18 represents AF21 or 'immediate traffic'";
328 // WG4 Specific Augmentations Follow
330 // WG4 Augmentation for basic Ethernet leafs
332 augment "/if:interfaces/if:interface" {
333 if-feature ALIASMAC-BASED-CU-PLANE;
334 when "if:type = 'ianaift:ethernetCsmacd'" {
336 "Applies to WG4 Ethernet interfaces for alias MAC based CU-Plane";
339 "Augment the interface model with parameters for
340 base Ethernet interface";
342 leaf-list alias-macs {
343 type yang:mac-address;
345 "Augments interfaces with range of alias MAC addresses.";
349 // WG4 Augmention for both ethernetCsmacd and l2vlan interfaces
351 augment "/if:interfaces/if:interface" {
352 when "(if:type = 'ianaift:ethernetCsmacd') or
353 (if:type = 'ianaift:l2vlan')" {
354 description "Applies to ethernetCsmacd and l2vlan interfaces";
357 "Augment the interface model with parameters for all
358 both ethernetCsmacd and l2vlan interfaces.";
360 type yang:mac-address;
362 "The MAC address of the interface.";
364 container port-reference {
366 "a port reference used by other O-RAN modules";
369 path '/hw:hardware/hw:component/hw:name';
371 must "derived-from-or-self(deref(current())/../hw:class, 'ianahw:port')";
372 // TAKE NOTE - depending on version of pyang, this may generate various
373 // warnings, e.g., warning: XPath for "port-name" does not exist
375 "O-RAN interfaces use a reference to a physical port component.
377 In this case, the component name referenced must be of class type
378 port, i.e., when /hw:hardware/hw:component/hw:class is derived from
384 "A number allocated by the server which identifies a port.
385 Port number value is 0 to N-1 where N is number of ports
388 This value is fixed for the lifetime of the equipment, i.e., cannot be
389 changed during equipment reboots.";
394 // WG4 specific augmention to ietf-ip covering DSCP for CUS Plane
396 augment "/if:interfaces/if:interface/ip:ipv4" {
397 if-feature UDPIP-BASED-CU-PLANE;
398 description "augments for IPv4 based CUS transport";
401 augment "/if:interfaces/if:interface/ip:ipv6" {
402 if-feature UDPIP-BASED-CU-PLANE;
403 description "augments for IPv6 based CUS transport";
407 // Other Working Group Specific Augmentations Follow Here
410 rpc reset-interface-counters {
412 "Management plane triggered restart of the interface counters.";