RFC 4030

The Authentication Suboption for the Dynamic Host Configuration Protocol (DHCP) Relay Agent Option

๐Ÿ“… published April 2005, from ietf

The Authentication Suboption for the Dynamic Host Configuration Protocol (DHCP) Relay Agent Option ๐ŸŽ€

Okay, bestie, let's get the basics down first ๐Ÿ’…

  • RFC number: 4030
  • Series: Network Working Group
  • Authors: M. Stapp (Cisco Systems, Inc.) and T. Lemon (Nominum, Inc.) ๐Ÿ‘ฏ
  • Category: Standards Track โœ…
  • Date: March 2005 ๐Ÿ“…
  • Obsoletes / Updates: this one doesn't list anything it obsoletes or updates ๐ŸŒธ

Status of This Memo ๐Ÿ“œ

Okay so this is a standards track protocol for the whole Internet community ๐ŸŒ, and it's literally asking for discussion and suggestions for improvements ๐Ÿ’ฌ. If you want to know where this protocol sits in the standardization process, check the current edition of the "Internet Official Protocol Standards" (STD 1) ๐Ÿ“‹. Distribution of this memo is unlimited ๐Ÿฆ‹.

Copyright (C) The Internet Society (2005). ๐Ÿ’–

Abstract โœจ

So the Dynamic Host Configuration Protocol (DHCP) Relay Agent Information Option (RFC 3046) is how a DHCP Relay Agent and a DHCP server pass info back and forth ๐Ÿ”. This spec adds an authentication suboption to that option, and it carries a keyed hash in its payload ๐Ÿ”. The result? Relayed DHCP messages get data integrity and replay protection, and that's iconic ๐Ÿ‘‘.

Table of Contents ๐Ÿ—‚๏ธ

1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . .   2
2.  Requirements Terminology . . . . . . . . . . . . . . . . . .   3
3.  DHCP Terminology . . . . . . . . . . . . . . . . . . . . . .   4
4.  Suboption Format . . . . . . . . . . . . . . . . . . . . . .   4
5.  Replay Detection . . . . . . . . . . . . . . . . . . . . . .   5
6.  The Relay Identifier Field . . . . . . . . . . . . . . . . .   5
7.  Computing Authentication Information . . . . . . . . . . . .   6
    7.1.  The HMAC-SHA1 Algorithm  . . . . . . . . . . . . . . .   6
8.  Procedures for Sending Messages  . . . . . . . . . . . . . .   7
    8.1.  Replay Detection . . . . . . . . . . . . . . . . . . .   7
    8.2.  Packet Preparation . . . . . . . . . . . . . . . . . .   8
    8.3.  Checksum Computation . . . . . . . . . . . . . . . . .   8
    8.4.  Sending the Message  . . . . . . . . . . . . . . . . .   8
9.  Procedures for Processing Incoming Messages  . . . . . . . .   8
    9.1.  Initial Examination  . . . . . . . . . . . . . . . . .   8
    9.2.  Replay Detection Check . . . . . . . . . . . . . . . .   9
    9.3.  Testing the Checksum . . . . . . . . . . . . . . . . .   9
10. Relay Agent Behavior . . . . . . . . . . . . . . . . . . . .   9
    10.1. Receiving Messages from Other Relay Agents . . . . . .  10
    10.2. Sending Messages to Servers  . . . . . . . . . . . . .  10
    10.3. Receiving Messages from Servers  . . . . . . . . . . .  10
11. DHCP Server Behavior . . . . . . . . . . . . . . . . . . . .  10
    11.1. Receiving Messages from Relay Agents . . . . . . . . .  10
    11.2. Sending Reply Messages to Relay Agents . . . . . . . .  11
12. IANA Considerations  . . . . . . . . . . . . . . . . . . . .  11
13. Security Considerations  . . . . . . . . . . . . . . . . . .  11
    13.1. The Key ID Field . . . . . . . . . . . . . . . . . . .  12
    13.2. Protocol Vulnerabilities . . . . . . . . . . . . . . .  12
14. Acknowledgements . . . . . . . . . . . . . . . . . . . . . .  13
15. References . . . . . . . . . . . . . . . . . . . . . . . . .  13
    15.1. Normative References . . . . . . . . . . . . . . . . .  13
    15.2. Informative References . . . . . . . . . . . . . . . .  13
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . .  14
Full Copyright Statement . . . . . . . . . . . . . . . . . . . .  15

1. Introduction ๐Ÿ’–

Okay so DHCP (RFC 2131 [6]) hands out IP addresses and configuration info to IPv4 clients ๐Ÿ–ฅ๏ธ. It also has a relay-agent capability (RFC 951 [7], RFC 1542 [8]) where processes inside the network infrastructure catch broadcast messages from clients and forward them to servers as unicast messages ๐Ÿ“ฌ. In networks like DOCSIS data-over-cable and xDSL, it's been really useful for the relay agent to add info to the DHCP message before forwarding it, using the relay-agent information option (RFC 3046 [1]) ๐Ÿงš. That info often shapes what the server decides about the addresses and configuration parameters the client should get ๐ŸŽฏ. Because the server leans on relay-agent data so much, that data is super important, and it makes the trust relationship between the relay agent and the server a big deal ๐Ÿซถ.

The existing DHCP Authentication spec (RFC 3118) [9] only covers communication between the DHCP client and server ๐Ÿ™…. Relay-agent info gets added after the client has already sent its message, so the DHCP Authentication spec explicitly leaves relay-agent data out of that authentication ๐Ÿ’€.

So the goal here is to define methods a relay agent can use to:

  1. protect the integrity of relayed DHCP messages,
  2. provide replay protection for those messages, and
  3. leverage existing mechanisms, such as DHCP Authentication.

To hit those goals, this spec introduces a brand new relay-agent suboption: the Authentication suboption ๐ŸŽ€. Its format is very similar to the DHCP Authentication option, and its cryptographic methods and hash computation are similar too, which is honestly so smart ๐Ÿง .

Relay agents that want to make sure the data they put in the Relay Agent option hasn't been messed with will include the Authentication suboption ๐Ÿ”’. They get configured with the parameters needed to generate cryptographic checksums of the data in the DHCP messages they forward to DHCP servers ๐Ÿ”‘. A DHCP server set up to process the Authentication suboption uses the info in it to verify the checksum, and it only keeps processing the relay agent information option if the checksum is valid โœ…. If the server sends a response, it includes an Authentication suboption in that response message ๐Ÿ“จ. And relay agents check the checksums in server responses to decide whether to forward those responses along ๐Ÿฆ‹.

2. Requirements Terminology ๐Ÿ“š

Okay, the key words are the bossy ones that tell you how strict a rule is ๐Ÿ‘‘. In this document, the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as described in RFC 2119 [2] ๐Ÿงš.

3. DHCP Terminology ๐ŸŒท

This doc uses the terms "DHCP server" (or "server") and "DHCP client" (or "client") the way RFC 2131 [6] defines them ๐Ÿ–ฅ๏ธ. The term "DHCP relay agent" refers to a "BOOTP relay agent" as defined in RFC 2131 ๐Ÿ“ฌ.

4. Suboption Format ๐Ÿงฉ

Here's the layout, bestie. Each row is 32 bits wide, so this is basically the suboption as a picture ๐Ÿ–ผ๏ธ:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |    Length     |   Algorithm   |  MBZ  |  RDM  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Replay Detection (64 bits)                                   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Replay Detection cont.                                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    Relay Identifier                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |                                                               |
   |                Authentication Information                     |
   |                                                               |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The code for the suboption is 8 ๐Ÿ”ข. The length field counts the lengths of the algorithm, the RDM, and every suboption field after them, in octets ๐Ÿ“.

The Algorithm field says which algorithm generates the authentication info ๐Ÿ”.

Four bits are reserved for future use ๐ŸŒ™. These bits SHOULD be set to zero, and they MUST NOT be used when the suboption is processed ๐Ÿšซ.

The Replay Detection Method (RDM) field says which method generates the Replay Detection Data ๐Ÿ”.

The Replay Detection field holds a value used to catch replayed messages, and it gets interpreted according to the RDM ๐Ÿ•ต๏ธ.

The Relay Identifier field is for relay agents that don't set giaddr, as described in RFC 3046 [1], section 2.1 ๐Ÿชช.

The Authentication Information field holds the data needed to communicate algorithm-specific parameters, plus the checksum ๐Ÿง. The checksum is usually a digest of the data in the DHCP packet, computed with the method the Algorithm field specifies ๐Ÿ’œ.

5. Replay Detection ๐Ÿ”

Okay, this is the replay-detection mechanism, and the big idea is that a receiver can figure out whether a message has a valid replay token value ๐Ÿ•ฐ๏ธ. The default RDM, with value 1, says the Replay Detection field holds an increasing counter value ๐Ÿ“ˆ. The receiver keeps a replay counter for each sender, and it rejects any message with an authentication suboption whose Replay Detection counter value is less than or equal to the last valid value ๐Ÿšซ. DHCP servers MAY identify relay agents by giaddr value or by other data in the message (e.g., data in other relay agent suboptions) ๐Ÿ”. Relay agents identify DHCP servers by source IP address ๐ŸŒ. If the message's replay detection value and the checksum are both valid, the receiver updates its notion of the last valid replay counter value for that sender ๐ŸŽ‰.

All implementations MUST support the default RDM ๐Ÿ’…. Additional methods may be defined in the future, following the process described in section 12 ๐Ÿ”ฎ.

Receivers SHOULD perform the replay-detection check before testing the checksum ๐Ÿง. The keyed hash calculation is likely to be much more expensive than the replay-detection value check ๐Ÿ’ธ.

DISCUSSION: This places a burden on the receiver to maintain some run-time state (the most-recent valid counter value) for each sender, but the number of members in a DHCP agent-server system is unlikely to be unmanageably large. ๐ŸŒˆ

6. The Relay Identifier Field โœจ

Okay so the Relay Agent Information Option [1] spec lets a relay agent slap a relay agent option onto relayed messages without setting the giaddr field ๐ŸŽ€. When that happens, the server that finally gets the message needs a steady identifier so it can tie per-sender stuff (like the Key ID and the replay-detection counters) to the right sender ๐Ÿ”. That's where the Relay ID field comes in!

A relay that adds a relay agent information option and sets giaddr MUST NOT set the Relay ID field ๐Ÿ™…โ€โ™€๏ธ. A relay that doesn't set giaddr MAY be configured to put a value in the Relay ID field ๐ŸŒธ. If it's set up to use that field, it MAY be configured with a specific value, or it MAY be configured to generate one from some other data, like its MAC or IP addresses ๐Ÿงš. And if a relay makes up its own Relay ID value, it SHOULD pick one it can regenerate reliably, e.g., across reboots ๐Ÿ’….

Servers that process an Authentication Suboption SHOULD use the giaddr value to identify the sender whenever giaddr is set ๐Ÿ’–. Servers MAY be configured to use some other data in the message to identify the sender instead ๐Ÿฆ‹. If giaddr isn't set, the server SHOULD use the Relay ID field, as long as it's nonzero โœจ. And if neither giaddr nor the Relay ID field is set, the server MAY be configured to use some other data in the message, or it MAY increment an error counter ๐Ÿ’€.


7. Computing Authentication Information ๐Ÿ”

The Authentication Information field holds a keyed hash that the sender makes ๐Ÿซถ. Every algorithm handles the data in the DHCP messages the same way, which is honestly so iconic ๐Ÿ‘‘. The sender and receiver both compute a hash over a buffer with every byte of the DHCP message, including the fixed DHCP message header, the DHCP options, and the relay agent suboptions ๐Ÿง. There are a few exceptions though, so pay attention! ๐Ÿ‘€

The hops field MUST be set to zero for the computation, because its value can change in transit ๐Ÿ”„. The giaddr field MUST also be set to zero for the computation, because it can get modified in networks where one relay agent adds the relay agent option but a different relay agent sets giaddr (see RFC 3046, section 2.1) ๐ŸŒˆ. Also, since the relay agent option is itself part of the computation, the 'authentication information' field in the Authentication suboption is set to all zeros ๐Ÿ™ˆ. The relay agent option length, the Authentication suboption length, and the other Authentication suboption fields are all included in the computation ๐Ÿ’œ.

All implementations MUST support Algorithm 1, the HMAC-SHA1 algorithm ๐Ÿ’…. Other algorithms may be defined in the future by following the process described in section 12 ๐Ÿ”ฎ.

7.1. The HMAC-SHA1 Algorithm

Algorithm 1 is assigned to the HMAC [3] protocol by using the SHA-1 [4] hash function ๐Ÿง . This algorithm needs a shared secret key configured at both the relay agent and the DHCP server ๐Ÿ—๏ธ. Each shared key has a 32-bit Key Identifier attached, and that identifier rides along in the first 4 bytes of the Authentication Information field of the Authentication suboption ๐ŸŽ€. The HMAC-SHA1 computation spits out a 20-byte hash value, which goes into the Authentication Information field right after the Key ID โœจ.

When Algorithm 1 is being used, the Authentication suboption looks like this:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Code      |       38      |0 0 0 0 0 0 0 1|  MBZ  |  RDM  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Replay Detection (64 bits)                                   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Replay Detection cont.                                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    Relay Identifier                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        Key ID (32 bits)                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |                      HMAC-SHA1 (160 bits)                     |
   |                                                               |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The suboption length is 38 ๐Ÿ”ข. The RDM and Replay Detection fields work exactly as section 5 says ๐Ÿ“–. The Relay ID field gets set the way section 6 describes ๐ŸŒธ. The sender sets the Key ID to the ID of the key it used for the checksum, as an integer in network byte order ๐Ÿงฎ. The HMAC result comes right after the Key ID ๐Ÿ’ซ.

The Key ID is only there so the sender and receiver can pick a shared secret when a bunch of secrets are floating around among a network's relays and DHCP servers ๐Ÿ—‚๏ธ. Key ID values are totally a local configuration thing, and they only have to be unique locally ๐Ÿ . This spec doesn't define any semantics for Key ID values or put any requirements on them, so no drama there ๐Ÿ™Œ.


8. Procedures for Sending Messages ๐Ÿ“ค

8.1. Replay Detection

The sender grabs a replay-detection counter value based on the RDM it's using ๐Ÿ”ข. If the sender is using RDM 1, which is the default RDM, the value MUST be greater than any value sent before ๐Ÿ“ˆ. No going backwards, bestie ๐Ÿ’…!

8.2. Packet Preparation

The sender sets giaddr and hops to all zeros 0๏ธโƒฃ. Then it tacks the relay agent information option onto the client's packet, Authentication suboption included ๐ŸŽ. It picks an appropriate Replay Detection value ๐ŸŽฏ. The sender puts its identifier in the Relay ID field if it needs to, or sets the field to all zeros ๐Ÿ†”. Next it sets the suboption length, drops the Replay Detection value into the Replay Detection field, and sets the algorithm to the number of the one it's using ๐Ÿ”ง. If it's using HMAC-SHA1, it sets the Key ID field to the right value ๐Ÿ”‘. Last step, it sets the checksum field to all zeros ๐Ÿซง. Other algorithms may have their own extra prep steps ๐ŸŒŸ.

8.3. Checksum Computation

The sender computes the checksum across the entire DHCP message using the algorithm it picked ๐Ÿงฎ. Then it puts the result into the Authentication Information field of the Authentication suboption ๐Ÿ’Œ.

8.4. Sending the Message

The sender restores the hops and giaddr values and then sends the message ๐Ÿš€. Ta-da!


9. Procedures for Processing Incoming Messages ๐Ÿ“ฅ

9.1. Initial Examination

The receiver looks at the giaddr value and checks whether the packet has the relay agent information option ๐Ÿ‘€. It uses its configuration to figure out whether it should expect an Authentication suboption ๐Ÿง. The receiver MUST support a configuration that lets it drop incoming messages that don't have a valid relay agent information option and Authentication suboption ๐Ÿ›‘. No sneaky messages allowed!

If the receiver decides the Authentication suboption is there and that it should process it, it uses the data in the message to figure out which algorithm, key, and RDM to validate with ๐Ÿ”. If it can't work out which algorithm, key, and RDM to use, or it doesn't support the value the message indicates, it SHOULD drop the message ๐Ÿ—‘๏ธ. This could mean a misconfiguration that's blocking clients from getting service, so receivers MAY try to tell their administrators or log an error message ๐Ÿ“ฃ.

9.2. Replay Detection Check

The receiver checks the RDM field first ๐Ÿ”Ž. Receivers MUST discard messages with RDM values they don't support ๐Ÿšซ. Since that might point to a misconfiguration at the sender, an attempt SHOULD be made to let the administrator know, by bumping an error counter or writing a log message ๐Ÿ“. If the receiver does support the RDM, it checks the Replay Detection field using the procedures in the RDM and in section 5 ๐Ÿงฉ. If the Replay value isn't valid, the receiver MUST drop the message ๐Ÿ™…โ€โ™€๏ธ.

โš ๏ธ Important tea: at this point the receiver MUST NOT update its notion of the last valid Replay Detection value for the sender! Until the checksum has been tested, the Replay Detection field can't be trusted ๐Ÿฅบ. If the receiver trusted the Replay Detection value without testing the checksum, a malicious host could send a replayed message with a super high Replay Detection value and trick the receiver into rejecting the sender's legit values ๐Ÿ˜ฑ. Not on my watch!

9.3. Testing the Checksum

The receiver gets the packet ready for checksum testing by setting the giaddr and hops fields to zero, and by setting the Authentication Information field of the suboption to all zeros ๐Ÿงผ. Using the algorithm and key associated with the sender, the receiver computes a hash of the message ๐Ÿงช. It then compares its result with the value that was sent โš–๏ธ. If the checksums don't match, the receiver MUST drop the message ๐Ÿ’ฅ. Otherwise, it updates its notion of the last valid Replay Detection value for the sender and processes the message ๐ŸŽ‰.


10. Relay Agent Behavior ๐Ÿงš

DHCP Relay agents are usually configured with the addresses of one or more DHCP servers ๐Ÿ—บ๏ธ. A relay agent that implements this suboption needs an algorithm number for each server, along with the right credentials (i.e., keys) ๐Ÿ”. Relay implementations SHOULD support a configuration that says all relayed messages should include the Authentication suboption ๐Ÿ’ซ. Using the Authentication suboption SHOULD be disabled by default ๐Ÿ™…โ€โ™€๏ธ. Relay agents MAY support a configuration saying certain destination servers support the Authentication suboption and others don't ๐ŸŒ—. Relay agents MAY support one algorithm number and one key for all DHCP servers, or they MAY support different algorithms and keys for each server ๐Ÿ”‘.

10.1. Receiving Messages from Other Relay Agents

Sometimes one relay agent adds the relay agent option and then forwards the DHCP message to another relay agent ๐Ÿ”. For example, a layer-2 switch might be directly connected to a client and forward messages to an aggregating router, which sets giaddr and then forwards the message to a DHCP server ๐Ÿ–ง. When a DHCP relay that implements the Authentication suboption receives a message, it MAY use the procedures in section 9 to verify the source of the message before forwarding it ๐Ÿ•ต๏ธโ€โ™€๏ธ.

10.2. Sending Messages to Servers

When the relay agent gets a broadcast packet from a client, it figures out which DHCP servers (or other relay agents) should get copies of the message ๐Ÿ“ฌ. If the relay agent is set up to include the Authentication suboption, it decides which Algorithm and RDM to use, and then it runs through the steps in section 8 ๐Ÿƒโ€โ™€๏ธ.

10.3. Receiving Messages from Servers

When the relay agent receives a message, it checks its configuration to see whether it expects the message to have a relay agent information option and an Authentication suboption ๐Ÿ”. The relay agent MAY be configured to drop response messages that don't have the Authentication suboption ๐Ÿ—‘๏ธ. After that, the relay agent follows the procedures in section 9 ๐Ÿ’–.

11. DHCP Server Behavior โœจ

Okay so servers can totally be talking to a whole crowd of relay agents at once ๐Ÿซถ Server implementations MAY support a setup where one algorithm and one key get paired with every relay agent, and servers MAY also support a setup where each relay agent gets its own algorithm and key ๐Ÿ”‘

11.1. Receiving Messages from Relay Agents

When a DHCP server that implements the Authentication suboption gets a message, it runs through the steps in section 9. Easy peasy ๐Ÿ’…

11.2. Sending Reply Messages to Relay Agents

Once the server has a reply ready to go, it looks at the incoming request and its own config to decide whether the reply should carry a relay agent information option and an Authentication suboption ๐ŸŽ€ If the server is set up to include the Authentication suboption, it picks the Algorithm and RDM to use and then follows the steps in section 8.

DISCUSSION: this server behavior is a teeny bit different from RFC 3046 [1], section 2.2 ๐Ÿ™ˆ The Authentication suboption doesn't get echoed back from the server to the relay. Instead, the server makes its own suboption.

12. IANA Considerations ๐ŸŒธ

Section 4 defines a brand new suboption for the DHCP relay agent option, called the Authentication Suboption. IANA gave it a new suboption code from the relay agent option suboption number space ๐Ÿฆ‹

This spec also introduces two brand new number spaces, one for the Authentication suboption's 'Algorithm' field and one for its 'Replay Detection Method' field. IANA has set these up and will keep maintaining them ๐Ÿ“‹

The Algorithm identifier is a one-byte value. Algorithm value 0 is reserved. Algorithm value 1 is assigned to the HMAC-SHA1 keyed hash, as defined in section 7.1. Any additional algorithm values will be allocated and assigned through IETF consensus, as defined in RFC 2434 [5] ๐Ÿ’œ

The RDM identifier is a four-bit value. RDM value 0 is reserved. RDM value 1 is assigned to the use of a monotonically increasing counter value, as defined in section 5. Any additional RDM values will be allocated and assigned through IETF consensus, as defined in RFC 2434 [5] โœจ

13. Security Considerations ๐Ÿ”ฅ

Okay this part is serious bestie ๐Ÿ˜ญ This spec describes a protocol that adds source authentication and message integrity protection to the messages between DHCP relay agents and DHCP servers ๐Ÿ›ก๏ธ

Using this protocol puts a brand new computational burden on relay agents and servers, because they have to do cryptographic hash calculations every time they send and receive messages. That burden can add latency to DHCP message exchanges ๐Ÿ’€ Relay agents are involved whenever clients reboot, so periods of really high reboot activity mean the most messages have to get processed. During a cable MSO head-end reboot event, for example, the time it takes for every client to get served might go up ๐Ÿ˜ฉ

13.1. The Key ID Field

The Authentication suboption has a four-byte Key ID, following the example of the DHCP Authentication RFC ๐Ÿ”‘ Other authentication protocols, like DNS TSIG [10], use a key name. A key name is more flexible and potentially more human readable than a key ID. DHCP servers may well be set up to use key names for DNS updates with TSIG, so it might simplify server config if some of the key management for both protocols could be shared ๐Ÿงš

On the other hand, it's crucial to keep the size expansion from the relay agent information option as small as possible. Named keys would take up more physical space and would make suboption encoding and parsing more complicated. That's why the spec uses a fixed-length Key ID instead of a variable-length key name ๐Ÿ’…

13.2. Protocol Vulnerabilities

Because DHCP runs over UDP, messages between relays and servers might get delivered in a different order than they were generated ๐ŸŒ€ The replay-detection mechanism will make receivers drop packets that show up 'late', which leads to client retries. Most clients already handle retries, so this shouldn't be a massive issue, but senders will still do computational work that gets wasted if their messages get reordered ๐Ÿ™ˆ

The DHC WG has developed two documents about authenticating DHCP relay agent options, so they can handle different deployment scenarios: this document and "Authentication of Relay Agent Options Using IPsec" [11] ๐Ÿฆ‹ As section 11 notes, the Authentication suboption can be used without pairwise keys between each relay and each DHCP server. In deployments where IPsec is readily available and pairwise keys can be managed efficiently, using IPsec as described in that document may be the better fit. If IPsec isn't available, or there are multiple relay agents whose multiple keys need managing, the protocol described here may be the better fit. Like with any situation where two options are available, local network administration can pick whichever is more appropriate ๐Ÿ‘‘ Because the relay agents and the DHCP server are all in the same administrative domain, the right mechanism can be configured on every interoperating DHCP server element โœจ

14. Acknowledgements ๐Ÿซถ

The need for this spec was made clear by comments from Thomas Narten and John Schnizlein, and Josh Littlefield suggested using the DHCP Authentication option format, at IETF 53 ๐ŸŒˆ

15. References ๐Ÿ“š

15.1. Normative References

[1]  Patrick, M., "DHCP Relay Agent Information Option", RFC 3046,
     January 2001.

[2]  Bradner, S., "Key words for use in RFCs to Indicate Requirement
     Levels", BCP 14, RFC 2119, March 1997.

[3]  Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-Hashing
     for Message Authentication", RFC 2104, February 1997.

[4]  Eastlake 3rd, D. and P. Jones, "US Secure Hash Algorithm 1
     (SHA1)", RFC 3174, September 2001.

[5]  Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA
     Considerations Section in RFCs", BCP 26, RFC 2434, October 1998.

15.2. Informative References

[6]  Droms, R., "Dynamic Host Configuration Protocol", RFC 2131,
     March 1997.

[7]  Croft, W. and J. Gilmore, "Bootstrap Protocol", RFC 951,
     September 1985.

[8]  Wimer, W., "Clarifications and Extensions for the Bootstrap
     Protocol", RFC 1542, October 1993.

[9]  Droms, R. and W. Arbaugh, "Authentication for DHCP Messages",
     RFC 3118, June 2001.

[10] Vixie, P., Gudmundsson, O., Eastlake 3rd, D., and B. Wellington,
     "Secret Key Transaction Authentication for DNS (TSIG)", RFC
     2845, May 2000.

[11] Droms, R., "Authentication of Relay Agent Options Using IPsec",
     Work in Progress, February 2004.

Authors' Addresses ๐ŸŽ€

Mark Stapp
Cisco Systems, Inc.
1414 Massachusetts Ave.
Boxborough, MA  01719
USA

Phone: 978.936.0000
EMail: mjs@cisco.com


Ted Lemon
Nominum, Inc.
950 Charter St.
Redwood City, CA  94063
USA

EMail: Ted.Lemon@nominum.com

Copyright (C) The Internet Society (2005).

This document is subject to the rights, licenses and restrictions in BCP 78, and except as set forth there, the authors keep all their rights.

This document and the information in it are provided on an "AS IS" basis. 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 doesn't take a position on whether any Intellectual Property Rights or other rights that someone might claim over the technology in this document are valid or in scope, or on whether any license under those rights might be available. It also doesn't claim to have independently looked for any such rights ๐Ÿ” Info about rights in RFC documents is in BCP 78 and BCP 79.

Copies of IPR disclosures made to the IETF Secretariat, any assurances of licenses to be made available, and the results of any attempt to get a general license or permission for implementers or users to use such proprietary rights can be found in the IETF's online IPR repository at http://www.ietf.org/ipr.

The IETF invites anyone interested to bring to its attention any copyrights, patents, patent applications, or other proprietary rights that may cover technology needed to implement this standard. Please send that info to the IETF at ietf-ipr@ietf.org ๐Ÿ“ฌ

Acknowledgement ๐ŸŒท

Funding for the RFC Editor function is currently provided by the Internet Society ๐Ÿ’œ

๐Ÿ“ฆ where this page comes from