RFC 6148
DHCPv4 Lease Query by Relay Agent Remote ID
DHCPv4 Lease Query by Relay Agent Remote ID ๐ฆ
okay bestie, this one is RFC 6148 and it's a Standards Track doc ๐ It's from February 2011, ISSN 2070-1721. The authors are P. Kurapati, R. Desetti, and B. Joshi, with affiliations at Juniper Networks and Infosys Technologies Ltd. It updates RFC 4388, and it doesn't obsolete anything. So it's basically the next chapter of the lease query story, and it's giving sequel energy โจ
Abstract ๐ธ
Some relay agents pull lease info out of the DHCP messages flying between the client and the DHCP server. Relay agents use that info for stuff like antispoofing and preventing flooding ๐ก๏ธ RFC 4388 gives relay agents a way to ask the DHCP server for that lease info again when they've lost it. The catch is that the existing lease query is data-driven, meaning a relay agent can only start a query once data starts flowing to and from clients. In some setups that just doesn't scale ๐ญ So this doc looks at what's wrong with the current mechanism and then proposes a new query type, query by Remote ID, to fix it ๐ฅ
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 5741.
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc6148.
Copyright Notice ๐
Copyright (c) 2011 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 (http://trustee.ietf.org/license-info) 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.
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.
Table of Contents ๐ง
1. Introduction ....................................................3
2. Terminology .....................................................4
3. Motivation ......................................................6
4. Protocol Details ................................................7
4.1. Sending the DHCPLEASEQUERY Message .........................7
4.2. Responding to the DHCPLEASEQUERY Message ...................8
4.3. Building a DHCPLEASEACTIVE or DHCPLEASEUNKNOWN Message .....8
4.4. Determining the IP Address to Be Used in Response ..........9
4.5. Sending a DHCPLEASEACTIVE or DHCPLEASEUNKNOWN Message ......9
4.6. Receiving a DHCPLEASEACTIVE or DHCPLEASEUNKNOWN Message ....9
4.7. Receiving No Response to the DHCPLEASEQUERY Message .......10
4.8. Lease-Binding Data Storage Requirements ...................10
4.9. Using the DHCPLEASEQUERY Message with Multiple
DHCP Servers ..............................................10
5. RFC 4388 Considerations ........................................11
6. Security Considerations ........................................11
7. Acknowledgments ................................................11
8. References .....................................................12
8.1. Normative References ......................................12
8.2. Informative References ....................................12
1. Introduction โจ
okay so DHCP relay agents snoop DHCP messages and tack on a Relay Agent Information option before they forward them to the configured DHCP server ๐ During that process, some relay agents also glean the lease info the server sends back and keep a local copy. Relay agents use that info to block spoofing attempts from clients, and sometimes to install routing info too ๐ง The problem is that when a relay agent reboots, all of that info is gone ๐ญ RFC 4388 [RFC4388] came in clutch and defined a way to pull the lease info back from the DHCP server. BUT the query types RFC 4388 [RFC4388] defines are data-driven. When a client sends data upstream, the relay agent can ask the server about the related lease info, based on the source MAC/IP address. Honestly, that does not scale when there are thousands of clients on one relay agent ๐ In the data-driven model, the lease query doesn't give you the full, consolidated active lease info for a given connection/circuit, which leads to inefficient anti-spoofing. And the relay agent has to spend a lot of resources on negative caching, especially when someone is spoofing ๐
we need a way for a relay agent to grab the consolidated lease info for a given connection/circuit before the clients send any upstream traffic ๐ซถ
+--------+
| DHCP | +--------------+
| Server |-...-| DSLAM |
| | | Relay Agent |
+--------+ +--------------+
| |
+------+ +------+
|Modem1| |Modem2|
+------+ +------+
| | |
+-----+ +-----+ +-----+
|Node1| |Node2| |Node3|
+-----+ +-----+ +-----+
Figure 1
For example, when a DSLAM (Digital Subscriber Line Access Multiplexer) acting as a relay agent gets rebooted, it should query the server for the lease info for all the connections/circuits ๐ธ Also, like the figure above shows, there could be multiple clients on one DSL circuit. The relay agent should get the lease info of all the clients connected to a DSL circuit. That's possible by introducing a new query type based on the Remote ID sub-option of the Relay Agent Information option ๐ This document talks about why we need the new query type and how to actually do it ๐
2. Terminology ๐ฆ
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119].
This document uses the following terms:
- Access Concentrator ๐ An access concentrator is a router or switch at the broadband access provider's edge of a public broadband access network. This document assumes that the access concentrator includes the DHCP relay agent functionality.
- DHCP client ๐ A DHCP client is an Internet node using DHCP to obtain configuration parameters such as a network address.
- DHCP relay agent ๐ง A DHCP relay agent is a third-party agent that transfers Bootstrap Protocol (BOOTP) and DHCP messages between clients and servers residing on different subnets, per RFC 951 [RFC951] and RFC 1542 [RFC1542].
- DHCP server ๐ A DHCP server is an Internet node that returns configuration parameters to DHCP clients.
- Fast path โก Fast path refers to data transfer that happens through a network processor or an Application Specific Integrated Circuit (ASIC) programmed to forward the data at very high speeds.
- Gleaning โจ Gleaning is the extraction of location information from DHCP messages as the messages are forwarded by the DHCP relay agent function.
- Location information ๐ธ Location information is information needed by the access concentrator to forward traffic to a broadband-accessible node. This information includes knowledge of the node's hardware address, the port or virtual circuit that leads to the node, and/or the hardware address of the intervening subscriber modem.
- MAC address ๐ฅ In the context of a DHCP packet, a MAC address consists of the following fields: hardware type ("htype"), hardware length ("hlen"), and client hardware address ("chaddr").
- Slow path ๐ข Slow path refers to data transfer that happens through the control plane. This has very limited buffers to store data, and the speeds are very low compared to the fast path data transfer.
- Upstream โฌ๏ธ Upstream is the direction from the broadband subscriber towards the access concentrator.
3. Motivation โจ
okay so picture an access concentrator (think DSLAM ๐ง) that's also acting as a DHCP relay agent. Most networking boxes have a "fast path" and a "slow path," and it's giving two very different vibes. The fast path is handled by a network processor or an ASIC, while the slow path runs on a normal processor. Regular data forwarding should happen in the fast path as much as possible, and the slow path should be reduced, because it can turn into a bottleneck ๐ง๐
Now here's the tea. On an access concentrator with multiple access ports, several IP addresses might get assigned to one port using DHCP, and nobody really knows how many clients are on a port ๐คทโโ๏ธ The access concentrator might not even know the network portions of the IP addresses handed out to its DHCP clients. Chaotic, but make it make sense ๐
The access concentrator gleans IP address and other info from DHCP negotiations for antispoofing and other purposes ๐ต๏ธโโ๏ธ The antispoofing itself happens in the fast path. It only keeps track of one list: the IP addresses that the DHCP servers assigned. Upstream traffic from any other IP address gets dropped ๐ซ If a client starts sending data after its DHCP negotiation has been gleaned, no legitimate packets get dropped. So antispoofing is both effective (no legit packets dropped, all spoofed ones dropped) and efficient (it's done in the fast path). Iconic ๐ The goal is to get that same effective-and-efficient antispoofing in the lease query scenario too, for when an access concentrator loses its gleaned info (like after a reboot) ๐
After a deep analysis, we found that the three existing query types supported by RFC 4388 [RFC4388] don't give effective and efficient antispoofing for this scenario. So a new mechanism is required ๐ญ
The existing query types are data-driven, which means lease queries can only happen when the access concentrator receives data. That causes a few problems ๐
- increased outage time for clients
- excessive negative caching, eating up a lot of resources under a spoofing attack
- antispoofing being done in the slow path instead of the fast path
4. Protocol Details ๐ฆ
This section covers protocol details for query by Remote ID. Most of the message handling is similar to RFC 4388 [RFC4388], so this section only highlights the differences. Read RFC 4388 [RFC4388] first, ngl, for the full picture ๐
When used in this document, the unqualified term DHCPLEASEQUERY means a lease query by Remote ID, unless otherwise specified ๐
RFC 3046 [RFC3046] defines two sub-options for the Relay Agent Information option. Sub-option 1 is the Circuit ID, which identifies the local circuit of the access concentrator. This sub-option is unique to the relay agent. Sub-option 2 is the Remote ID, which identifies the remote node connected to the access concentrator. The Remote ID is globally unique in the network and is configured per circuit/connection in the relay agent ๐ธ
This document defines a new query type based on the Remote ID sub-option. Say the access concentrator (e.g., DSLAM) lost its lease info when it rebooted. When it comes back up, it starts a DHCP lease query by Remote ID for each connection/circuit, as defined in this section ๐ฅ For this query, the requester supplies an option 82 that includes only a Remote ID sub-option in the DHCPLEASEQUERY message. The Remote ID is normally pre-provisioned in the access concentrator per circuit/connection, so it sticks around after a reboot ๐ซถ
The DHCP server MUST reply with a DHCPLEASEACTIVE message if there is an active lease corresponding to the Remote ID in the DHCPLEASEQUERY message. Otherwise, the server MUST reply with a DHCPLEASEUNKNOWN message. Servers that don't implement DHCP lease query based on Remote ID SHOULD simply not respond ๐
4.1. Sending the DHCPLEASEQUERY Message
The lease query in this document will mostly be used by access concentrators, but other authorized elements in the network can use it too ๐ง The DHCPLEASEQUERY message uses the DHCP message format from RFC 2131 [RFC2131], and it uses message number 10 in the DHCP Message Type option (option 53). Its pertinent message contents are:
- There MUST be a Relay Agent Information option (option 82) with only a Remote ID sub-option (sub-option 2) in the DHCPLEASEQUERY message.
- The Parameter Request List option [RFC2132] MUST be populated by the access concentrator with the Associated-IP option code. The giaddr field and other option codes listed in the Parameter Request List option are set as explained in Section 6.2 of RFC 4388 [RFC4388].
- The ciaddr field MUST be set to zero.
- The values of htype, hlen, and chaddr MUST be set to zero.
- The Client Identifier option (option 61) MUST NOT appear in the packet.
The DHCPLEASEQUERY message SHOULD be sent to a DHCP server that is known to have authoritative information about the Remote ID. It MAY be sent to more than one DHCP server. And if there's no info about which DHCP server might have authoritative info about the Remote ID, it SHOULD be sent to all DHCP servers configured for the associated relay agent (if any are known) ๐ฎ๐
4.2. Responding to the DHCPLEASEQUERY Message
There are two possible responses to a DHCPLEASEQUERY message:
- DHCPLEASEUNKNOWN
The DHCPLEASEUNKNOWN message means the client associated with the Remote ID sub-option of the DHCPLEASEQUERY message isn't allocated any lease, or it isn't managed by the server. Not found, bestie ๐ซฅ
- DHCPLEASEACTIVE
The DHCPLEASEACTIVE message means the server not only knows the client specified in the DHCPLEASEQUERY message, but also knows there's an active lease for that client. We love to see it โจ
4.3. Building a DHCPLEASEACTIVE or DHCPLEASEUNKNOWN Message
A DHCPLEASEACTIVE message is built by filling in info about the client associated with the IP address in the ciaddr field ๐
If more than one IP address has been involved in a DHCP message exchange with the client specified by the Remote ID, then the list of all those IP addresses MUST be returned in the Associated-IP option, whether or not that option was requested in the Parameter Request List option. This is meant to keep backwards compatibility with RFC 4388 [RFC4388] ๐ซถ
All other options in the Parameter Request List [RFC2132] are processed as mentioned in Section 6.4.2 of RFC 4388 [RFC4388] ๐
In a DHCPLEASEUNKNOWN response message, the DHCP server MUST echo the option 82 received in the DHCPLEASEQUERY message. No other option is included in the message ๐
4.4. Determining the IP Address to Be Used in Response
The IP address placed in the ciaddr field of a DHCPLEASEACTIVE message MUST be the IP address with the latest client-last-transaction-time associated with the client described by the Remote ID in the DHCPLEASEQUERY message ๐ฐ๏ธ
If only a single IP address fulfills this criteria, then it MUST be placed in the ciaddr field of the DHCPLEASEACTIVE message ๐ฆ
If more than one IP address has been accessed by the client specified by the Remote ID, then the DHCP server MUST return the IP address returned to the client in the most recent transaction with the client, unless the DHCP server has been configured by the server administrator to use some other preference mechanism ๐
4.5. Sending a DHCPLEASEACTIVE or DHCPLEASEUNKNOWN Message
The server unicasts the DHCPLEASEACTIVE or DHCPLEASEUNKNOWN message to the address specified in the giaddr field of the DHCPLEASEQUERY message ๐ฌ
4.6. Receiving a DHCPLEASEACTIVE or DHCPLEASEUNKNOWN Message
When a DHCPLEASEACTIVE message comes back in response to the DHCPLEASEQUERY message, it means there's currently an active lease associated with the Remote ID in the DHCP server ๐ The access concentrator SHOULD use the info in the htype, hlen, and chaddr fields of the DHCPLEASEACTIVE message, plus the Relay Agent Information option in the packet, to refresh its location info for this IP address. An access concentrator is likely to query by IP address for all the IP addresses in the Associated-IP option of the response, if any, at this point ๐
When a DHCPLEASEUNKNOWN message is received by an access concentrator that sent a DHCPLEASEQUERY message, it means the DHCP server doesn't have definitive info about the DHCP client in the Remote ID sub-option of the DHCPLEASEQUERY message. The access concentrator MAY store this info for future use. However, another DHCPLEASEQUERY message to the same DHCP server SHOULD NOT be attempted with the same Remote ID sub-option ๐ โโ๏ธ
For lease query by Remote ID, the impact of negative caching is greatly reduced, because the response gives "definitive" info on all the nodes connected behind the connection. Note that with the data-driven approach [RFC4388], a node spoofing several IP addresses can lead to negative caching of greater magnitude ๐ค Another big change this document brings is the removal of periodic lease queries generated from negative caching caused by DHCPLEASEUNKNOWN messages. Since the info from query by Remote ID is complete, there's no need to attempt another lease query for the same connection ๐ง โจ
4.7. Receiving No Response to the DHCPLEASEQUERY Message
The situation where an access concentrator gets no response to a DHCPLEASEQUERY message is handled the same way as suggested in RFC 4388 [RFC4388] ๐คทโโ๏ธ
4.8. Lease-Binding Data Storage Requirements
Implementation Note:
To generate replies for a lease query by Remote ID efficiently, a DHCP server should index the lease-binding data structures using Remote ID ๐๏ธ๐
4.9. Using the DHCPLEASEQUERY Message with Multiple DHCP Servers
This scenario is handled the same way as it is in RFC 4388 [RFC4388] ๐
5. RFC 4388 Considerations ๐
This document is compatible with RFC 4388-based [RFC4388] implementations. That means a client that supports this extension can work with a server that doesn't support this document, as long as it uses the query types defined in RFC 4388 [RFC4388]. Also, a server supporting this document can work with a client that doesn't support this query type. There are some changes this document proposes with respect to RFC 4388 [RFC4388], though. Implementers extending RFC 4388 [RFC4388] implementations to support this document should take note of the following points:
- There may be cases where a query by IP address/MAC address/Client Identifier has an option 82 containing a Remote ID. In that case, the query is still recognized as a query by IP address/MAC address/Client Identifier, as specified by RFC 4388 [RFC4388] ๐ซง
- Section 6.4 of RFC 4388 [RFC4388] suggests that a DHCPLEASEUNKNOWN message MUST NOT have any other option present. But for a query by Remote ID, option 82 MUST be present in the reply ๐ ๐ฅ
6. Security Considerations ๐
okay bestie, this part is serious, so let's get into it ๐ซถ This document inherits all the security worries from the original lease query spec, [RFC4388], so everything in that one still applies here.
This spec adds one extra issue on top of the ones in RFC 4388 [RFC4388] ๐ญ When you query by Remote ID, the server replies with consolidated lease-binding info, all bundled together. If someone unauthorized sends that query, they could leak lease-binding information, and that's a real problem. So the big takeaway is that you really need the authentication techniques from RFC 3118 [RFC3118] to stop those unauthorized lease queries ๐ซ
Seriously, don't skip authentication here. Unauthorized lease queries are the main new risk, and RFC 3118 [RFC3118] is how you lock them down ๐
7. Acknowledgments ๐ซถ
this part is giving gratitude ๐ A lot of the text in this document is borrowed from RFC 4388 [RFC4388], so big thanks to the people who wrote that one. Kim Kinnear, Damien Neil, Stephen Jacob, Ted Lemon, Ralph Droms, and Alfred Hoenes all gave valuable feedback on this document, and we love them for it ๐ธ
8. References ๐
8.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC4388] Woundy, R. and K. Kinnear, "Dynamic Host Configuration
Protocol (DHCP) Leasequery", RFC 4388, February 2006.
[RFC2131] Droms, R., "Dynamic Host Configuration Protocol",
RFC 2131, March 1997.
[RFC2132] Alexander, S. and R. Droms, "DHCP Options and BOOTP Vendor
Extensions", RFC 2132, March 1997.
[RFC3046] Patrick, M., "DHCP Relay Agent Information Option",
RFC 3046, January 2001.
[RFC3118] Droms, R., Ed. and W. Arbaugh, Ed., "Authentication for
DHCP Messages", RFC 3118, June 2001.
8.2. Informative References
[RFC951] Croft, B. and J. Gilmore, "Bootstrap Protocol (BOOTP)",
RFC 951, September 1985.
[RFC1542] Wimer, W., "Clarifications and Extensions for the
Bootstrap Protocol", RFC 1542, October 1993.
Authors' Addresses ๐
these are the people behind the spec, so here's where to find them ๐ง
Pavan Kurapati
Juniper Networks
Embassy Prime Buildings, C.V. Raman Nagar
Bangalore 560 093
India
EMail: kurapati@juniper.net
URI: http://www.juniper.net/
D.T.V Ramakrishna Rao
Infosys Technologies Ltd.
44 Electronics City, Hosur Road
Bangalore 560 100
India
EMail: ramakrishnadtv@infosys.com
URI: http://www.infosys.com/
Bharat Joshi
Infosys Technologies Ltd.
44 Electronics City, Hosur Road
Bangalore 560 100
India
EMail: bharat_joshi@infosys.com
URI: http://www.infosys.com/
that's the whole doc, bestie ๐ the authors really did the most โจ
๐ฆ where this page comes from
- ietf: rfc6148 2011-02
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms