RFC 9911: Common YANG Data Types
- J. Schönwälder, Ed.
Abstract
This document defines a collection of common data types to be used with the YANG data modeling language. It includes several new type definitions and obsoletes RFC 6991.¶
Status of This Memo
This is an Internet Standards Track document.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.¶
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
Copyright Notice
Copyright (c) 2025 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://
This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.¶
1. Introduction
YANG [RFC7950] is a data modeling language used to model configuration and state data manipulated by the Network Configuration Protocol (NETCONF) [RFC6241]. The YANG language supports a small set of built-in data types and provides mechanisms to derive other types from the built-in types.¶
This document defines a collection of common data types. The definitions are organized into two YANG modules:¶
The initial version of these YANG modules was published as [RFC6021]. The first revision of [RFC6021], published as [RFC6991], added several type definitions to the YANG modules. This second revision adds further new type definitions and addresses Erratum IDs 4076 [Err4076] and 5105 [Err5105]. Furthermore, the yang-identifier definition has been aligned with YANG 1.1 [RFC7950], and some pattern statements have been improved. For further details, see the revision statements of the YANG modules in Sections 3 and 4. A brief overview of all types and when they were introduced can be found in Section 2. Additional type definitions may be added in the future by submitting proposals to the NETMOD Working Group.¶
This document uses the YANG terminology defined in Section 3 of [RFC7950].¶
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.¶
2. Overview
Tables 1 and 2 list the types defined in the YANG modules
"ietf
Some types have an equivalent Structure of Management Information Version 2 (SMIv2) [RFC2578] [RFC2579] data type. A YANG data type is equivalent to an SMIv2 data type if the data types have the same set of values and the semantics of the values are equivalent.¶
Table 3 lists the types defined in the "ietf
3. Core YANG Types
The "ietf
4. Internet Protocol Suite Types
The "ietf
5. IANA Considerations
This document reuses the URIs for "ietf
Per this document, IANA has updated the "YANG Module
Names" registry to reference this RFC instead of [RFC6991] for
the "ietf
6. Security Considerations
This document defines common data types using the YANG data modeling language. The definitions themselves have no security impact on the Internet, but the usage of these definitions in concrete YANG modules might have. The security considerations spelled out in the YANG specification [RFC7950] apply for this document as well.¶
7. References
7.1. Normative References
- [RFC2119]
-
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10
.17487 , , <https:///RFC2119 www >..rfc -editor .org /info /rfc2119 - [RFC3339]
-
Klyne, G. and C. Newman, "Date and Time on the Internet: Timestamps", RFC 3339, DOI 10
.17487 , , <https:///RFC3339 www >..rfc -editor .org /info /rfc3339 - [RFC3688]
-
Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, DOI 10
.17487 , , <https:///RFC3688 www >..rfc -editor .org /info /rfc3688 - [RFC3986]
-
Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, DOI 10
.17487 , , <https:///RFC3986 www >..rfc -editor .org /info /rfc3986 - [RFC4007]
-
Deering, S., Haberman, B., Jinmei, T., Nordmark, E., and B. Zill, "IPv6 Scoped Address Architecture", RFC 4007, DOI 10
.17487 , , <https:///RFC4007 www >..rfc -editor .org /info /rfc4007 - [RFC4291]
-
Hinden, R. and S. Deering, "IP Version 6 Addressing Architecture", RFC 4291, DOI 10
.17487 , , <https:///RFC4291 www >..rfc -editor .org /info /rfc4291 - [RFC6020]
-
Bjorklund, M., Ed., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10
.17487 , , <https:///RFC6020 www >..rfc -editor .org /info /rfc6020 - [RFC7950]
-
Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", RFC 7950, DOI 10
.17487 , , <https:///RFC7950 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 , , <https:///RFC8174 www >..rfc -editor .org /info /rfc8174 - [RFC9499]
-
Hoffman, P. and K. Fujiwara, "DNS Terminology", BCP 219, RFC 9499, DOI 10
.17487 , , <https:///RFC9499 www >..rfc -editor .org /info /rfc9499 - [RFC9557]
-
Sharma, U. and C. Bormann, "Date and Time on the Internet: Timestamps with Additional Information", RFC 9557, DOI 10
.17487 , , <https:///RFC9557 www >..rfc -editor .org /info /rfc9557 - [RFC9562]
-
Davis, K., Peabody, B., and P. Leach, "Universally Unique IDentifiers (UUIDs)", RFC 9562, DOI 10
.17487 , , <https:///RFC9562 www >..rfc -editor .org /info /rfc9562 - [XPATH]
-
Clark, J., Ed. and S. DeRose, Ed., "XML Path Language (XPath) Version 1.0", W3C Recommendation, , <http://
www >..w3 .org /TR /xpath -10 - [XSD-TYPES]
-
Peterson, D., Ed., Gao, S., Ed., Malhotra, A., Ed., Sperberg
-Mc , and H. S. Thompson, Ed., "W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes", W3C Recommendation, , <https://Queen, C., Ed. www >..w3 .org /TR /xmlschema11 -2 /
7.2. Informative References
- [RFC0768]
-
Postel, J., "User Datagram Protocol", STD 6, RFC 768, DOI 10
.17487 , , <https:///RFC0768 www >..rfc -editor .org /info /rfc768 - [RFC0791]
-
Postel, J., "Internet Protocol", STD 5, RFC 791, DOI 10
.17487 , , <https:///RFC0791 www >..rfc -editor .org /info /rfc791 - [RFC0952]
-
Harrenstien, K., Stahl, M., and E. Feinler, "DoD Internet host table specification", RFC 952, DOI 10
.17487 , , <https:///RFC0952 www >..rfc -editor .org /info /rfc952 - [RFC1034]
-
Mockapetris, P., "Domain names - concepts and facilities", STD 13, RFC 1034, DOI 10
.17487 , , <https:///RFC1034 www >..rfc -editor .org /info /rfc1034 - [RFC1123]
-
Braden, R., Ed., "Requirements for Internet Hosts - Application and Support", STD 3, RFC 1123, DOI 10
.17487 , , <https:///RFC1123 www >..rfc -editor .org /info /rfc1123 - [RFC1930]
-
Hawkinson, J. and T. Bates, "Guidelines for creation, selection, and registration of an Autonomous System (AS)", BCP 6, RFC 1930, DOI 10
.17487 , , <https:///RFC1930 www >..rfc -editor .org /info /rfc1930 - [RFC2317]
-
Eidnes, H., de Groot, G., and P. Vixie, "Classless IN-ADDR.ARPA delegation", BCP 20, RFC 2317, DOI 10
.17487 , , <https:///RFC2317 www >..rfc -editor .org /info /rfc2317 - [RFC2474]
-
Nichols, K., Blake, S., Baker, F., and D. Black, "Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers", RFC 2474, DOI 10
.17487 , , <https:///RFC2474 www >..rfc -editor .org /info /rfc2474 - [RFC2578]
-
McCloghrie, K., Ed., Perkins, D., Ed., and J. Schoenwaelder, Ed., "Structure of Management Information Version 2 (SMIv2)", STD 58, RFC 2578, DOI 10
.17487 , , <https:///RFC2578 www >..rfc -editor .org /info /rfc2578 - [RFC2579]
-
McCloghrie, K., Ed., Perkins, D., Ed., and J. Schoenwaelder, Ed., "Textual Conventions for SMIv2", STD 58, RFC 2579, DOI 10
.17487 , , <https:///RFC2579 www >..rfc -editor .org /info /rfc2579 - [RFC2780]
-
Bradner, S. and V. Paxson, "IANA Allocation Guidelines For Values In the Internet Protocol and Related Headers", BCP 37, RFC 2780, DOI 10
.17487 , , <https:///RFC2780 www >..rfc -editor .org /info /rfc2780 - [RFC2782]
-
Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for specifying the location of services (DNS SRV)", RFC 2782, DOI 10
.17487 , , <https:///RFC2782 www >..rfc -editor .org /info /rfc2782 - [RFC2856]
-
Bierman, A., McCloghrie, K., and R. Presuhn, "Textual Conventions for Additional High Capacity Data Types", RFC 2856, DOI 10
.17487 , , <https:///RFC2856 www >..rfc -editor .org /info /rfc2856 - [RFC3289]
-
Baker, F., Chan, K., and A. Smith, "Management Information Base for the Differentiated Services Architecture", RFC 3289, DOI 10
.17487 , , <https:///RFC3289 www >..rfc -editor .org /info /rfc3289 - [RFC3305]
-
Mealling, M., Ed. and R. Denenberg, Ed., "Report from the Joint W3C/IETF URI Planning Interest Group: Uniform Resource Identifiers (URIs), URLs, and Uniform Resource Names (URNs): Clarifications and Recommendations
" , RFC 3305, DOI 10.17487 , , <https:///RFC3305 www >..rfc -editor .org /info /rfc3305 - [RFC3595]
-
Wijnen, B., "Textual Conventions for IPv6 Flow Label", RFC 3595, DOI 10
.17487 , , <https:///RFC3595 www >..rfc -editor .org /info /rfc3595 - [RFC3927]
-
Cheshire, S., Aboba, B., and E. Guttman, "Dynamic Configuration of IPv4 Link-Local Addresses", RFC 3927, DOI 10
.17487 , , <https:///RFC3927 www >..rfc -editor .org /info /rfc3927 - [RFC4001]
-
Daniele, M., Haberman, B., Routhier, S., and J. Schoenwaelder, "Textual Conventions for Internet Network Addresses", RFC 4001, DOI 10
.17487 , , <https:///RFC4001 www >..rfc -editor .org /info /rfc4001 - [RFC4271]
-
Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A Border Gateway Protocol 4 (BGP-4)", RFC 4271, DOI 10
.17487 , , <https:///RFC4271 www >..rfc -editor .org /info /rfc4271 - [RFC4340]
-
Kohler, E., Handley, M., and S. Floyd, "Datagram Congestion Control Protocol (DCCP)", RFC 4340, DOI 10
.17487 , , <https:///RFC4340 www >..rfc -editor .org /info /rfc4340 - [RFC4502]
-
Waldbusser, S., "Remote Network Monitoring Management Information Base Version 2", RFC 4502, DOI 10
.17487 , , <https:///RFC4502 www >..rfc -editor .org /info /rfc4502 - [RFC4592]
-
Lewis, E., "The Role of Wildcards in the Domain Name System", RFC 4592, DOI 10
.17487 , , <https:///RFC4592 www >..rfc -editor .org /info /rfc4592 - [RFC5017]
-
McWalter, D., Ed., "MIB Textual Conventions for Uniform Resource Identifiers (URIs)", RFC 5017, DOI 10
.17487 , , <https:///RFC5017 www >..rfc -editor .org /info /rfc5017 - [RFC5131]
-
McWalter, D., Ed., "A MIB Textual Convention for Language Tags", RFC 5131, DOI 10
.17487 , , <https:///RFC5131 www >..rfc -editor .org /info /rfc5131 - [RFC5322]
-
Resnick, P., Ed., "Internet Message Format", RFC 5322, DOI 10
.17487 , , <https:///RFC5322 www >..rfc -editor .org /info /rfc5322 - [RFC5646]
-
Phillips, A., Ed. and M. Davis, Ed., "Tags for Identifying Languages", BCP 47, RFC 5646, DOI 10
.17487 , , <https:///RFC5646 www >..rfc -editor .org /info /rfc5646 - [RFC5890]
-
Klensin, J., "Internationaliz
ed , RFC 5890, DOI 10Domain Names for Applications (IDNA): Definitions and Document Framework" .17487 , , <https:///RFC5890 www >..rfc -editor .org /info /rfc5890 - [RFC5952]
-
Kawamura, S. and M. Kawashima, "A Recommendation for IPv6 Address Text Representation", RFC 5952, DOI 10
.17487 , , <https:///RFC5952 www >..rfc -editor .org /info /rfc5952 - [RFC6021]
-
Schoenwaelder, J., Ed., "Common YANG Data Types", RFC 6021, DOI 10
.17487 , , <https:///RFC6021 www >..rfc -editor .org /info /rfc6021 - [RFC6241]
-
Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., and A. Bierman, Ed., "Network Configuration Protocol (NETCONF)", RFC 6241, DOI 10
.17487 , , <https:///RFC6241 www >..rfc -editor .org /info /rfc6241 - [RFC6532]
-
Yang, A., Steele, S., and N. Freed, "Internationaliz
ed , RFC 6532, DOI 10Email Headers" .17487 , , <https:///RFC6532 www >..rfc -editor .org /info /rfc6532 - [RFC6793]
-
Vohra, Q. and E. Chen, "BGP Support for Four-Octet Autonomous System (AS) Number Space", RFC 6793, DOI 10
.17487 , , <https:///RFC6793 www >..rfc -editor .org /info /rfc6793 - [RFC6991]
-
Schoenwaelder, J., Ed., "Common YANG Data Types", RFC 6991, DOI 10
.17487 , , <https:///RFC6991 www >..rfc -editor .org /info /rfc6991 - [RFC8200]
-
Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", STD 86, RFC 8200, DOI 10
.17487 , , <https:///RFC8200 www >..rfc -editor .org /info /rfc8200 - [RFC9260]
-
Stewart, R., Tüxen, M., and K. Nielsen, "Stream Control Transmission Protocol", RFC 9260, DOI 10
.17487 , , <https:///RFC9260 www >..rfc -editor .org /info /rfc9260 - [RFC9293]
-
Eddy, W., Ed., "Transmission Control Protocol (TCP)", STD 7, RFC 9293, DOI 10
.17487 , , <https:///RFC9293 www >..rfc -editor .org /info /rfc9293 - [ISO-8601]
-
ISO/IEC, "Data elements and interchange formats -- Information interchange -- Representation of dates and times", ISO/IEC 8601:2000, , <https://
www >..iso .org /standard /26780 .html - [ISO-9834-1]
-
ISO/IEC, "Information technology -- Procedures for the operation of object identifier registration authorities -- Part 1: General procedures and top arcs of the international object identifier tree", ISO/IEC 9834-1:2012, , <https://
www >..iso .org /standard /58055 .html - [IEEE-802-2024]
-
IEEE, "IEEE Standard for Local and Metropolitan Area Networks: Overview and Architecture", IEEE Std 802-2024, DOI 10
.1109 , , <https:///IEEESTD .2025 .10935844 doi >..org /10 .1109 /IEEESTD .2025 .10935844 - [Err4076]
-
RFC Errata, Erratum ID 4076, RFC 6991, <https://
www >..rfc -editor .org /errata /eid4076 - [Err5105]
-
RFC Errata, Erratum ID 5105, RFC 6991, <https://
www >..rfc -editor .org /errata /eid5105
Acknowledgments
The following people contributed significantly to the original version of this document, which was published as [RFC6021]: Andy Bierman, Martin Björklund, Balazs Lengyel, David Partain, and Phil Shafer.¶
Helpful comments on various draft versions of this document were provided by the following individuals: Andy Bierman, Martin Björklund, Benoît Claise, Joel M. Halpern, Ladislav Lhotka, Lars-Johan Liman, and Dan Romascanu.¶