Internet Engineering Task Force (IETF)                         L. Lhotka
Request for Comments: 9108                                        CZ.NIC
Category: Standards Track                                      P. Špaček
ISSN: 2070-1721                              Internet Systems Consortium
                                                          September 2021

YANG Types for DNS Classes and Resource Record Types




This document introduces the YANG module "iana-dns-class-rr-type", which contains derived types reflecting two IANA registries: DNS CLASSes and Resource Record (RR) TYPEs. These YANG types are intended as the minimum basis for future data modeling work.


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.

この文書は、インターネットエンジニアリングタスクフォース(IETF)の製品です。IETFコミュニティのコンセンサスを表します。それは公開レビューを受け、インターネットエンジニアリングステアリンググループ(IESG)による出版の承認を受けました。インターネット規格に関する詳細情報は、RFC 7841のセクション2で利用できます。

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at


Copyright Notice


Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.

著作権(C)2021 IETF信頼と文書著者として識別された人。全著作権所有。

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ( 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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

このドキュメントは、このドキュメントの発行日に有効なBCP 78およびIETFドキュメントに関連するIETFトラストの法的規定(の対象となります。 これらのドキュメントは、このドキュメントに関するお客様の権利と制限について説明しているため、注意深く確認してください。 このドキュメントから抽出されたコードコンポーネントには、Trust LegalProvisionsのセクション4.eで説明されているSimplifiedBSD Licenseテキストが含まれている必要があり、Simplified BSDLicenseで説明されているように保証なしで提供されます。

Table of Contents


   1.  Introduction
   2.  Terminology
   3.  YANG Design Considerations
   4.  IANA Considerations
     4.1.  URI Registrations
     4.2.  YANG Module Registrations
   5.  Security Considerations
   6.  References
     6.1.  Normative References
     6.2.  Informative References
   Appendix A.  XSLT Stylesheet
   Authors' Addresses
1. Introduction
1. はじめに

YANG [RFC7950] has become a de facto standard as a language for modeling configuration and state data, as well as specifying management operations and asynchronous notifications. It is reasonable to expect that the approach based on utilizing such data models along with standard management protocols such as NETCONF [RFC6241] and RESTCONF [RFC8040] can be effectively used in DNS operations, too. In fact, several efforts are currently underway that attempt to use NETCONF or RESTCONF for configuring and managing

Yang [RFC7950]は、構成および状態データをモデル化するための言語として、および管理操作と非同期通知を指定するための言語として、事実上の標準となっています。そのようなデータモデルをNetConf [RFC6241]およびRESTCONF [RFC8040]のような標準管理プロトコルと共に利用することに基づくアプローチもDNS操作でも効果的に使用できることを期待することが合理的です。実際、設定と管理にNetConfまたはRESTCONFを使用しようとすると、現在進行中にいくつかの努力があります。

* authoritative servers,

* 権威あるサーバー、

* resolvers, and

* リゾルバ、そして

* zone data.

* ゾーンデータ

While it is possible to use the management protocols mentioned above with ad hoc or proprietary data models, their real potential can be realized only if there is a (completely or partly) unified data model supported by multiple DNS software implementations. Operators can then, for instance, run several DNS server implementations in parallel, and use a common configuration and management interface and data for all of them. Also, it becomes considerably easier to migrate to another implementation.


Based on the previous experience from the IETF Routing Area, it is to be expected that the development of unified data models for DNS will be a lengthy and complicated process that will require active cooperation and compromise from the vendors and developers of major DNS server platforms. Nevertheless, it is likely that any DNS-related data modeling effort will need to use various DNS parameters and enumerations that are specified in several IANA registries. For use with YANG, these parameters and enumerations have to be translated into corresponding YANG types or other structures. Such translations should be straightforward and relatively uncontroversial.


This document provides a translation of two fundamental DNS-related IANA registries to YANG. It contains the initial version of the YANG module "iana-dns-class-rr-type", which defines derived types for the common parameters of DNS resource records (RR): class and type. These YANG types, "dns-class" and "rr-type", reflect the IANA registries "DNS CLASSes" and "Resource Record (RR) TYPEs" [IANA-DNS-PARAMETERS].


Appendix A contains an XSLT 1.0 stylesheet that is intended to be used by IANA for generating the initial version of the "iana-dns-class-rr-type" YANG module. Subsequently, whenever a new class or RR type is added to the above registries, IANA will also update the "iana-dns-class-rr-type" YANG module, following the instructions in Section 4 below.

付録Aには、IANAが「IANA-DNS-Class-RR-Type」Yangモジュールを生成するためにIANAが使用することを目的としたXSLT 1.0スタイルシートが含まれています。続いて、上記のレジストリに新しいクラスまたはRRタイプが追加されるたびに、IANAは下記のセクション4の指示に従って、「IANA-DNS-Class-RR型」YANGモジュールも更新されます。

2. Terminology
2. 用語

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.

この文書のキーワード "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", および "OPTIONAL" はBCP 14 [RFC2119] [RFC8174]で説明されているように、すべて大文字の場合にのみ解釈されます。

The terminology for describing YANG data models can be found in [RFC7950]. DNS terminology used in this document can be found in [RFC1035] and [RFC8499].


3. YANG Design Considerations
3. ヤンの設計上の考慮事項

At the time of writing, the "Domain Name System (DNS) Parameters" [IANA-DNS-PARAMETERS] contains altogether thirteen registries. The YANG module "iana-dns-class-rr-type" defines derived types corresponding to only two of the registries that are essential for data models involving zone data, namely "DNS CLASSes" and "Resource Record (RR) TYPEs". It is expected that the remaining registries in [IANA-DNS-PARAMETERS], as well as other DNS-related IANA registries, will be analogously reflected in future YANG modules as necessary. This way, an appropriate combination of YANG modules can be chosen depending on which YANG types are needed for a given data modeling purpose.


The registries "DNS CLASSes" and "Resource Record (RR) TYPEs" are transformed into YANG enumeration types "dns-class-name" and "rr-type-name", respectively. This is the initial fragment of the former:

レジストリ "DNSクラス"と "リソースレコード(RR)タイプ"は、それぞれ "DNS-Class-Name"と "RR-Type-Name"にそれぞれ変換されます。これは前者の初期断片です。

     typedef dns-class-name {
       type enumeration {
         enum IN {
           value 1;
             "Internet (IN)";
             "RFC 1035";

The other derived type, "rr-type-name", is defined similarly.


[RFC3597] introduced the option of specifying a class or RR type via its assigned decimal number as an alternative to the mnemonic name. For example, the "IN" class can be equivalently written as "CLASS1", and "AAAA" type can be written as "TYPE28".


Accordingly, the derived types "dns-class" and "rr-type" are defined in the YANG module as a union of two member types:


* 16-bit decimal integer ("uint16")

* 16ビット10進整数( "uint16")

* mnemonic name belonging to the enumerations "dns-class-name" and "rr-type-name", respectively.

* 列挙型「DNS-Class-Name」と「RR-Type-Name」に属するニーモニック名。

For instance, the "rr-type" type is defined as follows:

たとえば、 "RR-Type"タイプは次のように定義されています。

     typedef rr-type {
       type union {
         type uint16;
         type rr-type-name;
         "This type allows reference to a DNS resource record type
          using either the assigned mnemonic name or numeric value.";

As unassigned and reserved class and RR type values are not included in the mnemonic name enumerations, they can only be specified using their decimal values.


4. IANA Considerations
4. IANAの考慮事項

This section deals with actions and processes necessary for IANA to undertake to maintain the "iana-dns-class-rr-type" YANG module. This YANG module is intended to reflect the "DNS CLASSes" and "Resource Record (RR) TYPEs" registries in [IANA-DNS-PARAMETERS]. The most recent version of the YANG module is available from the "YANG Parameters" registry [IANA-YANG-PARAMETERS].

このセクションでは、IANAが「IANA-DNS-Class-RR型」Yangモジュールを維持するために必要な行動やプロセスについて説明します。このYANGモジュールは、[IANA-DNS-Parameters]で「DNSクラス」と「リソースレコード(RR)型」レジストリを反映することを目的としています。Yangモジュールの最新バージョンは、 "Yang Parameters" Registry [Iana-Yang-Parameters]から入手できます。

With the publication of this document, IANA has created and posted the initial version of the "iana-dns-class-rr-type" YANG module by applying the XSLT stylesheet from Appendix A to the XML version of [IANA-DNS-PARAMETERS].


IANA has added this note to the "iana-dns-class-rr-type" item of the "YANG Module Names" registry [IANA-YANG-PARAMETERS]:


   |  Classes and types of DNS resource records must not be directly
   |  added to the "iana-dns-class-rr-type" YANG module.  They must
   |  instead be added to the "DNS CLASSes" and "Resource Record (RR)
   |  TYPEs" registries, respectively.

When a new DNS class or RR type is added to the "DNS CLASSes" or "Resource Record (RR) TYPEs" registry, a new "enum" statement SHALL be added to the "dns-class-name" or "rr-type-name" type, respectively. The assigned name defined by the "enum" statement SHALL be the same as the mnemonic name of the new class or type. The following substatements to the "enum" statement SHALL be defined:

「DNSクラス」または「リソースレコード(RR)型」レジストリに新しいDNSクラスまたはRRタイプが追加された場合は、「DNS-Class-Name」または「RR-Typeに追加する」という新しい「ENUM」ステートメントを追加してください。-Name "タイプ。"enum"ステートメントによって定義された割り当て名は、新しいクラスまたはタイプのニーモニック名と同じです。"enum"ステートメントへの以下のサブジェクトテーマを定義するものとします。

"value": Use the decimal value from the registry.


"status": Include only if a class or type registration has been deprecated or obsoleted. IANA "deprecated" maps to YANG status "deprecated", and IANA "obsolete" maps to YANG status "obsolete".


"description": Replicate the corresponding information from the registry, namely the full name of the new DNS class, or the meaning of the new RR type, if any.


"reference": Replicate the reference(s) from the registry.


Unassigned or reserved values SHALL NOT be included in the "dns-class-name" and "rr-type-name" enumeration types.


Each time the "iana-dns-class-rr-type" YANG module is updated, a new "revision" statement SHALL be added before the existing "revision" statements.


IANA has added this note to the "DNS CLASSes" and "Resource Record (RR) TYPEs" registries:


| When this registry is modified, the YANG module "iana-dns-class-| rr-type" must be updated as defined in [RFC9108].

| ..このレジストリが変更されると、Yangモジュール「IANA-DNS-Class-| RR-Type」は[RFC9108]で定義されているように更新する必要があります。

The "Reference" text in the "DNS CLASSes" registry has been updated as follows:




| [RFC6895]

| ..[RFC6895]



| [RFC6895][RFC9108]

| ..[RFC6895] [RFC9108]

The "Reference" text in the "Resource Record (RR) TYPEs" registry has been updated as follows:




| [RFC6895][RFC1035]

| ..[RFC6895] [RFC1035]



| [RFC6895][RFC1035][RFC9108]

| ..[RFC6895] [RFC1035] [RFC9108]

4.1. URI Registrations
4.1. URI登録

This document registers a URI in the "IETF XML Registry" [RFC3688]. The following registration has been made:

このドキュメントは「IETF XMLレジストリ」[RFC3688]にURIを登録します。次の登録が行われました。

URI: urn:ietf:params:xml:ns:yang:iana-dns-class-rr-type Registrant Contact: The IESG. XML: N/A; the requested URI is an XML namespace.

URI:URN:IETF:PARAMS:XML:NS:Yang:IANA-DNS-Class-RR型登録者連絡先連絡先:IESG。XML:n / a;要求されたURIはXMLネームスペースです。

4.2. YANG Module Registrations
4.2. ヤンモジュール登録

This document registers a YANG module in the "YANG Module Names" registry [RFC6020]. The following registration has been made:

このドキュメントでは、YANGモジュールを「Yang Module Names」レジストリ[RFC6020]に登録します。次の登録が行われました。

   Name:  iana-dns-class-rr-type
   Namespace:  urn:ietf:params:xml:ns:yang:iana-dns-class-rr-type
   Prefix:  dnsct
   Reference:  RFC 9108
5. Security Considerations
5. セキュリティに関する考慮事項

This document translates two IANA registries into YANG data types and otherwise introduces no technology or protocol. The definitions themselves have no security impact on the Internet, but their use in concrete YANG modules might have. The security considerations spelled out in the YANG specification [RFC7950] apply to this document as well.


6. References
6. 参考文献
6.1. Normative References
6.1. 引用文献

[IANA-DNS-PARAMETERS] IANA, "Domain Name System (DNS) Parameters", <>.

[IANA-DNSパラメータ] IANA、「ドメインネームシステム(DNS)パラメータ」、<>。



[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <>.

[RFC2119] BRADNER、S、「RFCSで使用するためのキーワード」、BCP 14、RFC 2119、DOI 10.17487 / RFC2119、1997年3月、<>。

[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, DOI 10.17487/RFC3688, January 2004, <>.

[RFC3688] Mealling、M.、 "The IETF XMLレジストリ"、BCP 81、RFC 3688、DOI 10.17487 / RFC3688、2004年1月、<>。

[RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487/RFC6020, October 2010, <>.

[RFC6020] Bjorklund、M.、Ed。、「Yang - ネットワーク構成プロトコルのデータモデリング言語(NetConf)」、RFC 6020、DOI 10.17487 / RFC6020、2010年10月、<https://www.rfc-編集者。org / info / rfc6020>。

[RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", RFC 7950, DOI 10.17487/RFC7950, August 2016, <>.

[RFC7950] Bjorklund、M.、ED。、「Yang 1.1データモデリング言語」、RFC 7950、DOI 10.17487 / RFC7950、2016年8月、<>。

[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <>.

[RFC8174] Leiba、B、「RFC 2119キーワードの大文字の曖昧さ」、BCP 14、RFC 8174、DOI 10.17487 / RFC8174、2017年5月、<>。

[W3C.REC-xslt-19991116] Clark, J., "XSL Transformations (XSLT) Version 1.0", W3C Recommendation REC-xslt-19991116, November 1999, <>.

[W3C.REC-XSLT-19991116] Clark、J.、 "XSL変換(XSLT)バージョン1.0"、W3C勧告REC-XSLT-19991116、1999年11月、<>。

6.2. Informative References
6.2. 参考引用

[RFC1035] Mockapetris, P., "Domain names - implementation and specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, November 1987, <>.

[RFC1035] Mockapetris、P.、「ドメイン名 - 実装と仕様」、STD 13、RFC 1035、DOI 10.17487 / RFC1035、1987年11月、<>。

[RFC3597] Gustafsson, A., "Handling of Unknown DNS Resource Record (RR) Types", RFC 3597, DOI 10.17487/RFC3597, September 2003, <>.

[RFC3597] Gustafsson、A。、「未知のDNSリソースレコード(RR)タイプの取り扱い」、RFC 3597、DOI 10.17487 / RFC3597、2003年9月、<>。

[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, <>.

[RFC6241]、R.Bjorklund、M.、Ed。、Schoenwaelder、J.、Ed。、およびA. Bierman、ED。、「ネットワーク構成プロトコル(NetConf)」、RFC 6241、DOI 10.17487 /RFC6241、2011年6月、<>。

[RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, <>.

[RFC8040] Bierman、A.、Bjorklund、M.、K。Watsen、 "Restconf Protoction"、RFC 8040、DOI 10.17487 / RFC8040、2017年1月、<>。

[RFC8499] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS Terminology", BCP 219, RFC 8499, DOI 10.17487/RFC8499, January 2019, <>.

[RFC8499] Hoffman、P.、Sullivan、A.、K. Fujiwara、「DNS用語」、BCP 219、RFC 8499、DOI 10.17487 / RFC8499、2019年1月、<情報/ RFC8499>。

Appendix A. XSLT Stylesheet
付録A. XSLTスタイルシート

This appendix contains an XSLT 1.0 stylesheet [W3C.REC-xslt-19991116] that is to be used to generate the initial revision of the "iana-dns-class-rr-type" YANG module. This is achieved by applying the stylesheet to the XML version of the IANA registry "Domain Name System (DNS) Parameters" [IANA-DNS-PARAMETERS] that was current at the time this document was published.

この付録には、「IANA-DNS-Class-RR型」YANGモジュールの初期リビジョンを生成するために使用されるXSLT 1.0スタイルシート[W3C.REC-XSLT-19991116]が含まれています。これは、スタイルシートをXMLバージョンのIANAレジストリ「ドメインネームシステム(DNS)パラメータ」[IANA-DNS-PARAMATION]のXMLバージョンに適用して、この文書が公開された時点で現在のものです。

Using the ubiquitous xsltproc tool, the YANG module text can be generated with this command:


$ xsltproc iana-dns-class-rr-type.xsl dns-parameters.xml


   <CODE BEGINS> file "iana-dns-class-rr-type.xsl"
   <?xml version="1.0" standalone="yes"?>
   <stylesheet xmlns=""
     <output method="text"/>
     <strip-space elements="*"/>
     <variable name="dq">"</variable>
     <variable name="sq">'</variable>
     <variable name="module-intro">
       <text>module iana-dns-class-rr-type {
     yang-version 1.1;
     prefix dnsct;

organization "Internet Assigned Numbers Authority (IANA)";


contact " Internet Assigned Numbers Authority


Postal: ICANN 12025 Waterfront Drive, Suite 300 Los Angeles, CA 90094

郵便番号:ICANN 12025ウォーターフロントドライブ、スイート300ロサンゼルス、CA 90094

Tel: +1 424 254 5300

TEL:1 424 254 5300


description "This YANG module translates IANA registries 'DNS CLASSes' and 'Resource Record (RR) TYPEs' to YANG-derived types.

説明 "このYangモジュールは、IANAレジストリの「DNSクラス」と「リソースレコード(RR)タイプ」をYang-派生型に変換します。

Copyright (c) 2021 IETF Trust and the persons identified as authors of the code. All rights reserved.

著作権(c)2021 IETF信頼とコードの著者として識別された人。全著作権所有。

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 Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (


        This version of this YANG module was generated from
        the corresponding IANA registries using an XSLT stylesheet
        from Appendix A of RFC 9108
        (; see the RFC itself
        for full legal notices.";
       "IANA 'Domain Name System (DNS) Parameters' registry";</text>
     <template name="enum">
       <param name="id"/>
       <value-of select="concat('      enum ', $id)"/>
       <text> {&#xA;        value </text>
       <value-of select="concat(iana:value, ';&#xA;')"/>
       <if test="contains(iana:description, 'OBSOLETE')">
         <text>        status obsolete;&#xA;</text>
       <apply-templates select="iana:description"/>
       <variable name="xrefs" select="iana:xref[@type!='note']"/>
       <if test="$xrefs">
         <text>        reference&#xA;          "</text>
         <if test="count($xrefs)&gt;1">- </if>
         <apply-templates select="iana:xref[@type!='note']"/>
       <text>      }&#xA;</text>
     <template match="/">
       <value-of select="$module-intro"/>
       <apply-templates select="iana:registry[@id='dns-parameters']"/>
     <template match="iana:registry[@id='dns-parameters']">
       <apply-templates select="iana:updated"/>
     <template match="iana:updated">
       <value-of select="concat('  revision ', ., ' {')"/>
         "Initial revision.";
         "RFC 9108: YANG Types for DNS Classes and Resource Record
     /* Typedefs */&#xA;&#xA;</text>
     <template match="iana:registry[@id='dns-parameters-2']">
       <text>  typedef dns-class-name {&#xA;</text>
       <text>    type enumeration {&#xA;</text>
           select="iana:record[not(iana:description='Unassigned' or
       <text>    }
         "This enumeration type defines mnemonic names and corresponding
          numeric values of DNS classes.";
         "RFC 6895: Domain Name System (DNS) IANA Considerations";
     typedef dns-class {
       type union {
         type uint16;
         type dns-class-name;
         "This type allows reference to a DNS class using either the
          assigned mnemonic name or numeric value.";
     <template match="iana:registry[@id='dns-parameters-4']">
       <text>  typedef rr-type-name {&#xA;</text>
       <text>    type enumeration {&#xA;</text>
           select="iana:record[iana:type!='Unassigned' and
                   iana:type!='Private use' and iana:type!='Reserved']"
       <text>    }
         "This enumeration type defines mnemonic names and corresponding
          numeric values of DNS resource record types.";
         "- RFC 6895: Domain Name System (DNS) IANA Considerations
          - RFC 1035: Domain names - implementation and specification";
     typedef rr-type {
       type union {
         type uint16;
         type rr-type-name;
         "This type allows reference to a DNS resource record type
          using either the assigned mnemonic name or numeric value.";
     <template match="iana:record" mode="class">
       <call-template name="enum">
         <with-param name="id">
             <when test="contains(iana:description,'(')">
               <value-of select="substring-before(substring-after(
                                 iana:description, '('), ')')"/>
                   select="substring-after(iana:description, ' ')"/>
     <template match="iana:record" mode="rr-type">
       <call-template name="enum">
         <with-param name="id" select="iana:type"/>
     <template match="iana:description">
       <text>        description&#xA;          </text>
       <value-of select="concat($dq, ., $dq, ';&#xA;')"/>
     <template match="iana:xref">
         <when test="@type='rfc'">
               select="concat('RFC ', substring-after(@data, 'rfc'))"/>
         <when test="@type='person'">
         <when test="@type='text'">
           <value-of select="translate(., $dq, $sq)"/>
           <value-of select="@data"/>
         <when test="position()=last()">
           <text>&#xA;           - </text>
     <template match="iana:person">
       <value-of select="concat(iana:name, ' &lt;', iana:uri, '&gt;')"/>

Authors' Addresses


Ladislav Lhotka CZ.NIC Czech Republic

Ladislav Lhotka CZ.nicチェコ共和国


Petr Špaček Internet Systems Consortium Czech Republic