RFC 4701
A DNS Resource Record (RR) for Encoding Dynamic Host Configuration Protocol (DHCP) Information (DHCID RR)
RFC 4701: A DNS Resource Record (RR) for Encoding Dynamic Host Configuration Protocol (DHCP) Information (DHCID RR) ๐
Title block tea: this doc came out of the Network Working Group in October 2006 and is on the Standards Track ๐ . The authors are M. Stapp from Cisco Systems, Inc., T. Lemon from Nominum, Inc., and A. Gustafsson from Araneus Information Systems Oy. The title block doesn't list anything it obsoletes or updates, so it's a clean new start ๐ฆ.
Status of This Memo
okay so this part is the official "what kind of document is this" bit ๐. It's an Internet standards track protocol for the Internet community, and the authors want people to discuss it and send ideas for making it better ๐ฌ. For the current standardization state and status, you go check the "Internet Official Protocol Standards" (STD 1) ๐. Distribution of this memo is unlimited, so share it with everyone ๐ธ.
Copyright Notice
Copyright (C) The Internet Society (2006). ๐
Abstract
so here's the tea โ. DHCP clients can try to update the same DNS Fully Qualified Domain Name (FQDN), or try to update an FQDN that already got added to DNS for some other reason, while they're grabbing their DHCP leases ๐ฌ. Doesn't matter if the DHCP server or the clients are doing the DNS updates, conflicts can still happen ๐. To fix that, RFC 4703 suggests storing client identifiers in DNS, so every domain name can be clearly tied to the DHCP client it belongs to โจ. This memo is the one that makes a separate Resource Record (RR) type for that job, used by DHCP clients and servers, and it's called the "DHCID" RR ๐.
Table of Contents
1. Introduction ....................................................3
2. Terminology .....................................................3
3. The DHCID RR ....................................................3
3.1. DHCID RDATA Format .........................................3
3.2. DHCID Presentation Format ..................................4
3.3. The DHCID RR Identifier Type Codes .........................4
3.4. The DHCID RR Digest Type Code ..............................4
3.5. Computation of the RDATA ...................................5
3.5.1. Using the Client's DUID .............................5
3.5.2. Using the Client Identifier Option ..................6
3.5.3. Using the Client's htype and chaddr .................6
3.6. Examples ...................................................6
3.6.1. Example 1 ...........................................6
3.6.2. Example 2 ...........................................7
3.6.3. Example 3 ...........................................7
4. Use of the DHCID RR .............................................8
5. Updater Behavior ................................................8
6. Security Considerations .........................................8
7. IANA Considerations .............................................9
8. Acknowledgements ................................................9
9. References ......................................................9
9.1. Normative References .......................................9
9.2. Informative References ....................................10
1. Introduction โจ
okay so the DHCP folks have a whole set of procedures (see [7] and [11]) that let DHCP clients and servers update the DNS automatically (see [3] and [4]). Those procedures are proposed in [1] ๐ฆ.
Conflicts can totally happen when a bunch of DHCP clients all want the same DNS name, or when a client tries to grab a name that somebody added for something else ๐. To fix this, [1] suggests storing client identifiers in DNS so each domain name is clearly linked to the DHCP clients using it ๐ . For clarity's sake, it's better for this DHCP info to live in its own RR type โจ. This memo creates that separate RR for DHCP clients or servers: the "DHCID" RR ๐.
Now the privacy part, which I'm obsessed with ๐ซถ. The stored data is the result of a one-way SHA-256 hash, so potentially sensitive client identifying info stays hidden ๐. The hash mixes in info from the DHCP client's message AND the domain name itself, so what's stored in the DHCID RR depends on both the client identification used in the DHCP exchange and the domain name ๐ง. That means the DHCID RDATA changes if one client gets linked to more than one name over time, which makes it way harder to "track" a client across different domain names ๐ต๏ธโโ๏ธ.
2. Terminology
the key words are "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" ๐. In this document, they're to be read the way [2] describes them ๐.
3. The DHCID RR ๐
The DHCID RR has the mnemonic DHCID and type code 49 ๐ข. It's only defined in the IN class, and DHCID RRs cause no additional section processing ๐ธ.
3.1. DHCID RDATA Format
The RDATA section of a DHCID RR in transmission has RDLENGTH octets of binary data ๐ฆ. DHCP servers and clients are the ones who interpret that data, and the format and interpretation are described below ๐.
DNS software should consider the RDATA section to be opaque ๐. DHCP clients or servers use the DHCID RR to link a DHCP client's identity to a DNS name, so several DHCP clients and servers can deterministically perform dynamic DNS updates to the same zone ๐. From the updater's point of view, the DHCID RDATA is made of a 2-octet identifier type (in network byte order), then a 1-octet digest type, then one or more octets holding the actual identifier ๐งฉ:
< 2 octets > Identifier type code
< 1 octet > Digest type code
< n octets > Digest (length depends on digest type)
3.2. DHCID Presentation Format
In DNS master files, the RDATA is shown as one block in base-64 encoding, the same encoding used for binary data in [8], Section 3 ๐. You can split the data into any number of white-space-separated substrings, all the way down to single base-64 digits, and they get concatenated into the full RDATA โจ. Those substrings can span lines if you use the standard parentheses ๐ซถ.
3.3. The DHCID RR Identifier Type Codes
The Identifier Type Code says what piece of the DHCP client's request got fed into the hash function ๐. These codes live in a registry that IANA maintains, as specified in Section 7 ๐. Here's the starting list of assigned values for the identifier type code and the identifier it refers to ๐:
+------------------+------------------------------------------------+
| Identifier Type | Identifier |
| Code | |
+------------------+------------------------------------------------+
| 0x0000 | The 1-octet 'htype' followed by 'hlen' octets |
| | of 'chaddr' from a DHCPv4 client's DHCPREQUEST |
| | [7]. |
| 0x0001 | The data octets (i.e., the Type and |
| | Client-Identifier fields) from a DHCPv4 |
| | client's Client Identifier option [10]. |
| 0x0002 | The client's DUID (i.e., the data octets of a |
| | DHCPv6 client's Client Identifier option [11] |
| | or the DUID field from a DHCPv4 client's |
| | Client Identifier option [6]). |
| 0x0003 - 0xfffe | Undefined; available to be assigned by IANA. |
| 0xffff | Undefined; RESERVED. |
+------------------+------------------------------------------------+
3.4. The DHCID RR Digest Type Code
The Digest Type Code tells you which digest algorithm got used ๐งฎ. The digest is calculated over an identifier and the canonical FQDN, which the next section explains ๐.
These codes also live in an IANA-maintained registry, as specified in Section 7 ๐. The starting values are: value 0 is reserved, and value 1 is SHA-256 โจ. Reserving other types requires IETF standards action ๐ฆ. Defining new values will also require IETF standards action, to document how DNS updaters are supposed to handle multiple digest types ๐ .
3.5. Computation of the RDATA
The DHCID RDATA is built by sticking the 2-octet identifier type code together with variable-length data ๐งฑ.
The RDATA for every type code except 0xffff (which is reserved for future expansion) is made of the 2-octet identifier type code, the 1-octet digest type code, and the digest value (32 octets for SHA-256) ๐:
< identifier-type > < digest-type > < digest >
The input to the digest hash function is defined as:
digest = SHA-256(< identifier > < FQDN >)
The FQDN goes into the buffer in the canonical wire format described in [9], Section 6.2 ๐งญ. The identifier type code and the identifier are related the way Section 3.3 describes: the type code says where the identifier came from ๐.
A DHCPv4 updater uses the 0x0002 type code if a Client Identifier option is in the DHCPv4 messages and it's encoded as specified in [6]. Otherwise, the updater uses 0x0001 if a Client Identifier option is present, and 0x0000 if it isn't ๐.
A DHCPv6 updater always uses the 0x0002 type code ๐.
3.5.1. Using the Client's DUID
When the updater uses the client's DUID (either from a DHCPv6 Client Identifier option, or from a part of the DHCPv4 Client Identifier option encoded as specified in [6]), the first two octets of the DHCID RR MUST be 0x0002, in network byte order ๐ฏ. The third octet is the digest type code (1 for SHA-256). The rest of the DHCID RR MUST contain the results of computing the SHA-256 hash across the octets of the DUID, followed by the FQDN ๐.
3.5.2. Using the Client Identifier Option
When the updater uses the DHCPv4 Client Identifier option that the client sent in its DHCPREQUEST message, the first two octets of the DHCID RR MUST be 0x0001, in network byte order ๐. The third octet is the digest type code (1 for SHA-256). The rest of the DHCID RR MUST contain the results of computing the SHA-256 hash across the data octets of the option (i.e., the Type and Client-Identifier fields), followed by the FQDN ๐ฆ.
3.5.3. Using the Client's htype and chaddr
When the updater uses the client's link-layer address as the identifier, the first two octets of the DHCID RDATA MUST be zero ๐ซง. The third octet is the digest type code (1 for SHA-256). To generate the rest of the resource record, the updater computes a one-way hash with SHA-256 across a buffer holding the client's network hardware type, link-layer address, and the FQDN data ๐ง.
Specifically, the first octet of the buffer is the network hardware type, exactly as it appeared in the DHCP htype field of the client's DHCPREQUEST message ๐ ๏ธ. All of the significant octets of the chaddr field in that DHCPREQUEST message come next, in the same order they appear in the message ๐ข. The number of significant octets in chaddr is given by the hlen field of the DHCPREQUEST message ๐. Then the FQDN data, as specified above, goes at the end ๐ท.
3.6. Examples ๐
(part 2 incoming, bestie ๐)
3.6.1. Example 1 ๐
okay bestie, this one is a DHCPv6 client ๐ฆ A DHCP server gives the client the IPv6 address 2001:DB8::1234:5678. The client's request included DHCPv6 client-identifier option data 00:01:00:06:41:2d:f1:66:01:02:03:04:05:06. The server updates the name "chi6.example.com" for the client and uses the client identifier option data to form a DHCID RR. The DHCID RDATA is built by setting the two type octets to 0x0002, setting the 1-octet digest type to 1 for SHA-256, and running a SHA-256 hash over a buffer with the 14 octets from the client-id option plus the FQDN (written as described in Section 3.5). iconic math ๐ฅ
chi6.example.com. AAAA 2001:DB8::1234:5678
chi6.example.com. DHCID ( AAIBY2/AuCccgoJbsaxcQc9TUapptP69l
OjxfNuVAA2kjEA= )
If the DHCID RR type isn't supported, the RDATA gets encoded [13] like this:
\# 35 ( 000201636fc0b8271c82825bb1ac5c41cf5351aa69b4febd94e8f17cd
b95000da48c40 )
3.6.2. Example 2 ๐ธ
this one is an IPv4 client ๐ A DHCP server gives the address 192.0.2.2 to a client whose DHCP request had client-identifier option data 01:07:08:09:0a:0b:0c. The server updates "chi.example.com" for the client and uses the client identifier option data to form a DHCID RR. The RDATA gets the two type octets set to 0x0001, the 1-octet digest type set to 1 for SHA-256, and a SHA-256 hash over a buffer with the seven octets from the client-id option plus the FQDN (written as described in Section 3.5). the math is giving consistency โจ
chi.example.com. A 192.0.2.2
chi.example.com. DHCID ( AAEBOSD+XR3Os/0LozeXVqcNc7FwCfQdW
L3b/NaiUDlW2No= )
If the DHCID RR type isn't supported, the RDATA gets encoded [13] like this:
\# 35 ( 0001013920fe5d1dceb3fd0ba3379756a70d73b17009f41d58bddbfcd
6a2503956d8da )
3.6.3. Example 3 ๐ง
last example, and it's a fun one ๐ A DHCP server gives the IPv4 address 192.0.2.3 to a client with Ethernet MAC address 01:02:03:04:05:06, using the domain name "client.example.com". The server identifies the client by its link-layer address. The DHCID RDATA is composed by setting the two type octets to zero, setting the 1-octet digest type to 1 for SHA-256, and running a SHA-256 hash over a buffer containing the 1-octet 'htype' value for Ethernet, 0x01, followed by the six octets of the Ethernet MAC address, and the domain name (written as described in Section 3.5). ok that's the whole flow ๐ซถ
client.example.com. A 192.0.2.3
client.example.com. DHCID ( AAABxLmlskllE0MVjd57zHcWmEH3pCQ6V
ytcKD//7es/deY= )
If the DHCID RR type isn't supported, the RDATA gets encoded [13] like this:
\# 35 ( 000001c4b9a5b249651343158dde7bcc77169841f7a4243a572b5c283
fffedeb3f75e6 )
4. Use of the DHCID RR โจ
this RR MUST NOT be used for any purpose other than the one detailed in [1]. it's opaque to DNS servers, but every entity that updates or interprets it has to agree on the data, so no freelancing ๐ โโ๏ธ that's why new data formats can only be defined by the DHC Working Group, as a result of revising [1]. boundaries, bestie ๐
5. Updater Behavior ๐ฅ
the data in the DHCID RR lets updaters figure out whether more than one DHCP client wants the same FQDN. this lets site administrators set their own DNS update policy, but the DHCID RR doesn't set any policy itself, so it's not the boss ๐
updaters take data from a DHCP client's request and the domain name the client wants, compute a client identity hash, and then compare that hash to the data in any DHCID RRs on the name they want to link to the client's IP address. if an updater finds DHCID RRs whose RDATA doesn't match the client identity it computed, the updater SHOULD conclude that a different client is currently associated with that name. then the updater SHOULD proceed according to the site's administrative policy. that policy might say to pick a different name, or it might let the updater carry on. the vibe is "check first, then follow the house rules" ๐
6. Security Considerations ๐
the DHCID record itself doesn't introduce any new security problems into the DNS. to hide the client's identity information, a one-way hash is used. and to make it hard to 'track' a client by looking at the names tied to a hash value, the FQDN is included in the hash computation. so the RDATA depends on both the DHCP client identification data and each FQDN associated with the client. very clever, very layered ๐ง
but here's the scary part ๐ญ an attacker who knows some things, like the MAC addresses commonly used in DHCP client identification data, might be able to find the client's DHCP identify using a brute-force attack. even without any extra knowledge, the number of unknown bits used in computing the hash is typically only 48 to 80. yikes, that's not a lot ๐
administrators should be wary of allowing unsecured DNS updates to zones, whether or not those zones are exposed to the global Internet. both DHCP clients and servers SHOULD use some form of update authentication (e.g., [12]) when performing DNS updates. please lock your updates down, periodt ๐โจ
7. IANA Considerations ๐
IANA has allocated a DNS RR type number for the DHCID record type.
this spec defines a new number-space for the 2-octet identifier type codes associated with the DHCID RR. IANA has set up a registry for the values in this number-space. three initial values are assigned in Section 3.3, and the value 0xFFFF is reserved for future use. new DHCID RR identifier type codes are assigned through Standards Action, as defined in [5].
this spec also defines a new number-space for the 1-octet digest type codes associated with the DHCID RR. IANA has set up a registry for these values too. two initial values are assigned in Section 3.4. new DHCID RR digest type codes are assigned through Standards Action, as defined in [5]. registry era, honestly iconic ๐
8. Acknowledgements ๐ซถ
huge thanks to Harald Alvestrand, Ralph Droms, Olafur Gudmundsson, Sam Hartman, Josh Littlefield, Pekka Savola, and especially Bernie Volz for their review and suggestions. the real MVPs ๐๐
9. References ๐
9.1. Normative References
- [1] Stapp, M. and B. Volz, "Resolution of Fully Qualified Domain Name (FQDN) Conflicts among Dynamic Host Configuration Protocol (DHCP) Clients", RFC 4703, October 2006.
- [2] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
- [3] Mockapetris, P., "Domain names - concepts and facilities", STD 13, RFC 1034, November 1987.
- [4] Mockapetris, P., "Domain names - implementation and specification", STD 13, RFC 1035, November 1987.
- [5] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 2434, October 1998.
- [6] Lemon, T. and B. Sommerfeld, "Node-specific Client Identifiers for Dynamic Host Configuration Protocol Version Four (DHCPv4)", RFC 4361, February 2006.
9.2. Informative References
- [7] Droms, R., "Dynamic Host Configuration Protocol", RFC 2131, March 1997.
- [8] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 3548, July 2003.
- [9] Arends, R., Austein, R., Larson, M., Massey, D., and S. Rose, "Resource Records for the DNS Security Extensions", RFC 4034, March 2005.
- [10] Alexander, S. and R. Droms, "DHCP Options and BOOTP Vendor Extensions", RFC 2132, March 1997.
- [11] Droms, R., Bound, J., Volz, B., Lemon, T., Perkins, C., and M. Carney, "Dynamic Host Configuration Protocol for IPv6 (DHCPv6)", RFC 3315, July 2003.
- [12] Vixie, P., Gudmundsson, O., Eastlake, D., and B. Wellington, "Secret Key Transaction Authentication for DNS (TSIG)", RFC 2845, May 2000.
- [13] Gustafsson, A., "Handling of Unknown DNS Resource Record (RR) Types", RFC 3597, September 2003.
Authors' Addresses ๐ง
Mark Stapp
Cisco Systems, Inc.
1414 Massachusetts Ave.
Boxborough, MA 01719
USA
Phone: 978.936.1535
EMail: mjs@cisco.com
Ted Lemon
Nominum, Inc.
950 Charter St.
Redwood City, CA 94063
USA
EMail: mellon@nominum.com
Andreas Gustafsson
Araneus Information Systems Oy
Ulappakatu 1
02320 Espoo
Finland
EMail: gson@araneus.fi
Full Copyright Statement โญ
Copyright (C) The Internet Society (2006).
This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.
This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property ๐ฆ
The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.
Acknowledgement ๐ธ
Funding for the RFC Editor function is provided by the IETF Administrative Support Activity (IASA). and that's a wrap on RFC 4701, bestie! ๐โจ
๐ฆ where this page comes from
- ietf: rfc4701 2006-10
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms