RFC3315 - Dynamic Host Configuration Protocol for IPv6 (DHCP(3)

时间:2005-02-17 来源: 作者: 点击:
to require that the client accept Reconfigure messages. The server includes other options containing configuration information to be returned to the client as described in section 18.2. If the server
  
to require that the client accept Reconfigure messages.

The server includes other options containing configuration
information to be returned to the client as described in section
18.2.

If the server finds that the client has included an IA in the Request
message for which the server already has a binding that associates
the IA with the client, the client has resent a Request message for
which it did not receive a Reply message. The server either resends
a previously cached Reply message or sends a new Reply message.

18.2.2. Receipt of Confirm Messages

When the server receives a Confirm message, the server determines
whether the addresses in the Confirm message are appropriate for the
link to which the client is attached. If all of the addresses in the
Confirm message pass this test, the server returns a status of
Success. If any of the addresses do not pass this test, the server
returns a status of NotOnLink. If the server is unable to perform
this test (for example, the server does not have information about
prefixes on the link to which the client is connected), or there were
no addresses in any of the IAs sent by the client, the server MUST
NOT send a reply to the client.

The server ignores the T1 and T2 fields in the IA options and the
preferred-lifetime and valid-lifetime fields in the IA Address
options.

The server constructs a Reply message by setting the "msg-type" field
to REPLY, and copying the transaction ID from the Confirm message
into the transaction-id field.

The server MUST include a Server Identifier option containing the
server's DUID and the Client Identifier option from the Confirm
message in the Reply message. The server includes a Status Code
option indicating the status of the Confirm message.

18.2.3. Receipt of Renew Messages

When the server receives a Renew message via unicast from a client to
which the server has not sent a unicast option, the server discards
the Renew message and responds with a Reply message containing a
Status Code option with the value UseMulticast, a Server Identifier
option containing the server's DUID, the Client Identifier option
from the client message, and no other options.

When the server receives a Renew message that contains an IA option
from a client, it locates the client's binding and verifies that the
information in the IA from the client matches the information stored
for that client.

If the server cannot find a client entry for the IA the server
returns the IA containing no addresses with a Status Code option set
to NoBinding in the Reply message.

If the server finds that any of the addresses are not appropriate for
the link to which the client is attached, the server returns the
address to the client with lifetimes of 0.

If the server finds the addresses in the IA for the client then the
server sends back the IA to the client with new lifetimes and T1/T2
times. The server may choose to change the list of addresses and the
lifetimes of addresses in IAs that are returned to the client.

The server constructs a Reply message by setting the "msg-type" field
to REPLY, and copying the transaction ID from the Renew message into
the transaction-id field.

The server MUST include a Server Identifier option containing the
server's DUID and the Client Identifier option from the Renew message
in the Reply message.

The server includes other options containing configuration
information to be returned to the client as described in section
18.2.

18.2.4. Receipt of Rebind Messages

When the server receives a Rebind message that contains an IA option
from a client, it locates the client's binding and verifies that the
information in the IA from the client matches the information stored
for that client.

If the server cannot find a client entry for the IA and the server
determines that the addresses in the IA are not appropriate for the
link to which the client's interface is attached according to the
server's explicit configuration information, the server MAY send a
Reply message to the client containing the client's IA, with the
lifetimes for the addresses in the IA set to zero. This Reply
constitutes an explicit notification to the client that the addresses
in the IA are no longer valid. In this situation, if the server does
not send a Reply message it silently discards the Rebind message.

If the server finds that any of the addresses are no longer
appropriate for the link to which the client is attached, the server
returns the address to the client with lifetimes of 0.

If the server finds the addresses in the IA for the client then the
server SHOULD send back the IA to the client with new lifetimes and
T1/T2 times.

The server constructs a Reply message by setting the "msg-type" field
to REPLY, and copying the transaction ID from the Rebind message into
the transaction-id field.

The server MUST include a Server Identifier option containing the
server's DUID and the Client Identifier option from the Rebind
message in the Reply message.

The server includes other options containing configuration
information to be returned to the client as described in section
18.2.

18.2.5. Receipt of Information-request Messages

When the server receives an Information-request message, the client
is requesting configuration information that does not include the
assignment of any addresses. The server determines all configuration
parameters appropriate to the client, based on the server
configuration policies known to the server.

The server constructs a Reply message by setting the "msg-type" field
to REPLY, and copying the transaction ID from the Information-request
message into the transaction-id field.

The server MUST include a Server Identifier option containing the
server's DUID in the Reply message. If the client included a Client
Identification option in the Information-request message, the server
copies that option to the Reply message.

The server includes options containing configuration information to
be returned to the client as described in section 18.2.

If the Information-request message received from the client did not
include a Client Identifier option, the server SHOULD respond with a
Reply message containing any configuration parameters that are not
determined by the client's identity. If the server chooses not to
respond, the client may continue to retransmit the
Information-request message indefinitely.

18.2.6. Receipt of Release Messages

When the server receives a Release message via unicast from a client
to which the server has not sent a unicast option, the server
discards the Release message and responds with a Reply message
containing a Status Code option with value UseMulticast, a Server
Identifier option containing the server's DUID, the Client Identifier
option from the client message, and no other options.

Upon the receipt of a valid Release message, the server examines the
IAs and the addresses in the IAs for validity. If the IAs in the
message are in a binding for the client, and the addresses in the IAs
have been assigned by the server to those IAs, the server deletes the
addresses from the IAs and makes the addresses available for
assignment to other clients. The server ignores addresses not
assigned to the IA, although it may choose to log an error.

After all the addresses have been processed, the server generates a
Reply message and includes a Status Code option with value Success, a
Server Identifier option with the server's DUID, and a Client
Identifier option with the client's DUID. For each IA in the Release
message for which the server has no binding information, the server
adds an IA option using the IAID from the Release message, and
includes a Status Code option with the value NoBinding in the IA
option. No other options are included in the IA option.

A server may choose to retain a record of assigned addresses and IAs
after the lifetimes on the addresses have expired to allow the server
to reassign the previously assigned addresses to a client.

18.2.7. Receipt of Decline Messages

When the server receives a Decline message via unicast from a client
to which the server has not sent a unicast option, the server
discards the Decline message and responds with a Reply message
containing a Status Code option with the value UseMulticast, a Server
Identifier option containing the server's DUID, the Client Identifier
option from the client message, and no other options.

Upon the receipt of a valid Decline message, the server examines the
IAs and the addresses in the IAs for validity. If the IAs in the
message are in a binding for the client, and the addresses in the IAs
have been assigned by the server to those IAs, the server deletes the
addresses from the IAs. The server ignores addresses not assigned to
the IA (though it may choose to log an error if it finds such an
address).

The client has found any addresses in the Decline messages to be
already in use on its link. Therefore, the server SHOULD mark the
addresses declined by the client so that those addresses are not
assigned to other clients, and MAY choose to make a notification that
addresses were declined. Local policy on the server determines when
the addresses identified in a Decline message may be made available
for assignment.

After all the addresses have been processed, the server generates a
Reply message and includes a Status Code option with the value
Success, a Server Identifier option with the server's DUID, and a
Client Identifier option with the client's DUID. For each IA in the
Decline message for which the server has no binding information, the
server adds an IA option using the IAID from the Release message and
includes a Status Code option with the value NoBinding in the IA
option. No other options are included in the IA option.

18.2.8. Transmission of Reply Messages

If the original message was received directly by the server, the
server unicasts the Reply message directly to the client using the
address in the source address field from the IP datagram in which the
original message was received. The Reply message MUST be unicast
through the interface on which the original message was received.

If the original message was received in a Relay-forward message, the
server constructs a Relay-reply message with the Reply message in the
payload of a Relay Message option (see section 22.10). If the
Relay-forward messages included an Interface-id option, the server
copies that option to the Relay-reply message. The server unicasts
the Relay-reply message directly to the relay agent using the address
in the source address field from the IP datagram in which the
Relay-forward message was received.

19. DHCP Server-Initiated Configuration Exchange

A server initiates a configuration exchange to cause DHCP clients to
obtain new addresses and other configuration information. For
example, an administrator may use a server-initiated configuration
exchange when links in the DHCP domain are to be renumbered. Other

examples include changes in the location of directory servers,
addition of new services such as printing, and availability of new
software.

19.1. Server Behavior

A server sends a Reconfigure message to cause a client to initiate
immediately a Renew/Reply or Information-request/Reply message
exchange with the server.

19.1.1. Creation and Transmission of Reconfigure Messages

The server sets the "msg-type" field to RECONFIGURE. The server sets
the transaction-id field to 0. The server includes a Server
Identifier option containing its DUID and a Client Identifier option
containing the client's DUID in the Reconfigure message.

The server MAY include an Option Request option to inform the client
of what information has been changed or new information that has been
added. In particular, the server specifies the IA option in the
Option Request option if the server wants the client to obtain new
address information. If the server identifies the IA option in the
Option Request option, the server MUST include an IA option that
contains no other sub-options to identify each IA that is to be
reconfigured on the client.

Because of the risk of denial of service attacks against DHCP
clients, the use of a security mechanism is mandated in Reconfigure
messages. The server MUST use DHCP authentication in the Reconfigure
message.

The server MUST include a Reconfigure Message option (defined in
section 22.19) to select whether the client responds with a Renew
message or an Information-Request message.

The server MUST NOT include any other options in the Reconfigure
except as specifically allowed in the definition of individual
options.

A server sends each Reconfigure message to a single DHCP client,
using an IPv6 unicast address of sufficient scope belonging to the
DHCP client. If the server does not have an address to which it can
send the Reconfigure message directly to the client, the server uses
a Relay-reply message (as described in section 20.3) to send the
Reconfigure message to a relay agent that will relay the message to
the client. The server may obtain the address of the client (and the

appropriate relay agent, if required) through the information the
server has about clients that have been in contact with the server,
or through some external agent.

To reconfigure more than one client, the server unicasts a separate
message to each client. The server may initiate the reconfiguration
of multiple clients concurrently; for example, a server may send a
Reconfigure message to additional clients while previous
reconfiguration message exchanges are still in progress.

The Reconfigure message causes the client to initiate a Renew/Reply
or Information-request/Reply message exchange with the server. The
server interprets the receipt of a Renew or Information-request
message (whichever was specified in the original Reconfigure message)
from the client as satisfying the Reconfigure message request.

19.1.2. Time Out and Retransmission of Reconfigure Messages

If the server does not receive a Renew or Information-request message
from the client in REC_TIMEOUT milliseconds, the server retransmits
the Reconfigure message, doubles the REC_TIMEOUT value and waits
again. The server continues this process until REC_MAX_RC
unsuccessful attempts have been made, at which point the server
SHOULD abort the reconfigure process for that client.

Default and initial values for REC_TIMEOUT and REC_MAX_RC are
documented in section 5.5.

19.2. Receipt of Renew Messages

The server generates and sends a Reply message to the client as
described in sections 18.2.3 and 18.2.8, including options for
configuration parameters.

The server MAY include options containing the IAs and new values for
other configuration parameters in the Reply message, even if those
IAs and parameters were not requested in the Renew message from the
client.

19.3. Receipt of Information-request Messages

The server generates and sends a Reply message to the client as
described in sections 18.2.5 and 18.2.8, including options for
configuration parameters.

The server MAY include options containing new values for other
configuration parameters in the Reply message, even if those
parameters were not requested in the Information-request message from
the client.

19.4. Client Behavior

A client receives Reconfigure messages sent to the UDP port 546 on
interfaces for which it has acquired configuration information
through DHCP. These messages may be sent at any time. Since the
results of a reconfiguration event may affect application layer
programs, the client SHOULD log these events, and MAY notify these
programs of the change through an implementation-specific interface.

19.4.1. Receipt of Reconfigure Messages

Upon receipt of a valid Reconfigure message, the client responds with
either a Renew message or an Information-request message as indicated
by the Reconfigure Message option (as defined in section 22.19). The
client ignores the transaction-id field in the received Reconfigure
message. While the transaction is in progress, the client silently
discards any Reconfigure messages it receives.

DISCUSSION:

The Reconfigure message acts as a trigger that signals the client
to complete a successful message exchange. Once the client has
received a Reconfigure, the client proceeds with the message
exchange (retransmitting the Renew or Information-request message
if necessary); the client ignores any additional Reconfigure
messages until the exchange is complete. Subsequent Reconfigure
messages cause the client to initiate a new exchange.

How does this mechanism work in the face of duplicated or
retransmitted Reconfigure messages? Duplicate messages will be
ignored because the client will begin the exchange after the
receipt of the first Reconfigure. Retransmitted messages will
either trigger the exchange (if the first Reconfigure was not
received by the client) or will be ignored. The server can
discontinue retransmission of Reconfigure messages to the client
once the server receives the Renew or Information-request message
from the client.

It might be possible for a duplicate or retransmitted Reconfigure
to be sufficiently delayed (and delivered out of order) to arrive
at the client after the exchange (initiated by the original
Reconfigure) has been completed. In this case, the client would
initiate a redundant exchange. The likelihood of delayed and out

of order delivery is small enough to be ignored. The consequence
of the redundant exchange is inefficiency rather than incorrect
operation.

19.4.2. Creation and Transmission of Renew Messages

When responding to a Reconfigure, the client creates and sends the
Renew message in exactly the same manner as outlined in section
18.1.3, with the exception that the client copies the Option Request
option and any IA options from the Reconfigure message into the Renew
message.

19.4.3. Creation and Transmission of Information-request Messages

When responding to a Reconfigure, the client creates and sends the
Information-request message in exactly the same manner as outlined in
section 18.1.5, with the exception that the client includes a Server
Identifier option with the identifier from the Reconfigure message to
which the client is responding.

19.4.4. Time Out and Retransmission of Renew or Information-request
Messages

The client uses the same variables and retransmission algorithm as it
does with Renew or Information-request messages generated as part of
a client-initiated configuration exchange. See sections 18.1.3 and
18.1.5 for details. If the client does not receive a response from
the server by the end of the retransmission process, the client
ignores and discards the Reconfigure message.

19.4.5. Receipt of Reply Messages

Upon the receipt of a valid Reply message, the client processes the
options and sets (or resets) configuration parameters appropriately.
The client records and updates the lifetimes for any addresses
specified in IAs in the Reply message.

20. Relay Agent Behavior

The relay agent MAY be configured to use a list of destination
addresses, which MAY include unicast addresses, the All_DHCP_Servers
multicast address, or other addresses selected by the network
administrator. If the relay agent has not been explicitly
configured, it MUST use the All_DHCP_Servers multicast address as the
default.

If the relay agent relays messages to the All_DHCP_Servers multicast
address or other multicast addresses, it sets the Hop Limit field to
32.

20.1. Relaying a Client Message or a Relay-forward Message

A relay agent relays both messages from clients and Relay-forward
messages from other relay agents. When a relay agent receives a
valid message to be relayed, it constructs a new Relay-forward
message. The relay agent copies the source address from the header
of the IP datagram in which the message was received to the
peer-address field of the Relay-forward message. The relay agent
copies the received DHCP message (excluding any IP or UDP headers)
into a Relay Message option in the new message. The relay agent adds
to the Relay-forward message any other options it is configured to
include.

20.1.1. Relaying a Message from a Client

If the relay agent received the message to be relayed from a client,
the relay agent places a global or site-scoped address with a prefix
assigned to the link on which the client should be assigned an
address in the link-address field. This address will be used by the
server to determine the link from which the client should be assigned
an address and other configuration information. The hop-count in the
Relay-forward message is set to 0.

If the relay agent cannot use the address in the link-address field
to identify the interface through which the response to the client
will be relayed, the relay agent MUST include an Interface-id option
(see section 22.18) in the Relay-forward message. The server will
include the Interface-id option in its Relay-reply message. The
relay agent fills in the link-address field as described in the
previous paragraph regardless of whether the relay agent includes an
Interface-id option in the Relay-forward message.

20.1.2. Relaying a Message from a Relay Agent

If the message received by the relay agent is a Relay-forward message
and the hop-count in the message is greater than or equal to
HOP_COUNT_LIMIT, the relay agent discards the received message.

The relay agent copies the source address from the IP datagram in
which the message was received from the client into the peer-address
field in the Relay-forward message and sets the hop-count field to
the value of the hop-count field in the received message incremented
by 1.

If the source address from the IP datagram header of the received
message is a global or site-local address (and the device on which
the relay agent is running belongs to only one site), the relay agent
sets the link-address field to 0; otherwise the relay agent sets the
link-address field to a global or site-local address assigned to the
interface on which the message was received, or includes an
Interface-ID option to identify the interface on which the message
was received.

20.2. Relaying a Relay-reply Message

The relay agent processes any options included in the Relay-reply
message in addition to the Relay Message option, and then discards
those options.

The relay agent extracts the message from the Relay Message option
and relays it to the address contained in the peer-address field of
the Relay-reply message.

If the Relay-reply message includes an Interface-id option, the relay
agent relays the message from the server to the client on the link
identified by the Interface-id option. Otherwise, if the
link-address field is not set to zero, the relay agent relays the
message on the link identified by the link-address field.

20.3. Construction of Relay-reply Messages

A server uses a Relay-reply message to return a response to a client
if the original message from the client was relayed to the server in
a Relay-forward message or to send a Reconfigure message to a client
if the server does not have an address it can use to send the message
directly to the client.

A response to the client MUST be relayed through the same relay
agents as the original client message. The server causes this to
happen by creating a Relay-reply message that includes a Relay
Message option containing the message for the next relay agent in the
return path to the client. The contained Relay-reply message
contains another Relay Message option to be sent to the next relay
agent, and so on. The server must record the contents of the
peer-address fields in the received message so it can construct the
appropriate Relay-reply message carrying the response from the
server.

For example, if client C sent a message that was relayed by relay
agent A to relay agent B and then to the server, the server would
send the following Relay-Reply message to relay agent B:

msg-type: RELAY-REPLY
hop-count: 1
link-address: 0
peer-address: A
Relay Message option, containing:
msg-type: RELAY-REPLY
hop-count: 0
link-address: address from link to which C is attached
peer-address: C
Relay Message option: <response from server>

When sending a Reconfigure message to a client through a relay agent,
the server creates a Relay-reply message that includes a Relay
Message option containing the Reconfigure message for the next relay
agent in the return path to the client. The server sets the
peer-address field in the Relay-reply message header to the address
of the client, and sets the link-address field as required by the
relay agent to relay the Reconfigure message to the client. The
server obtains the addresses of the client and the relay agent
through prior interaction with the client or through some external
mechanism.

21. Authentication of DHCP Messages

Some network administrators may wish to provide authentication of the
source and contents of DHCP messages. For example, clients may be
subject to denial of service attacks through the use of bogus DHCP
servers, or may simply be misconfigured due to unintentionally
instantiated DHCP servers. Network administrators may wish to
constrain the allocation of addresses to authorized hosts to avoid
denial of service attacks in "hostile" environments where the network
medium is not physically secured, such as wireless networks or
college residence halls.

The DHCP authentication mechanism is based on the design of
authentication for DHCPv4 [4].

21.1. Security of Messages Sent Between Servers and Relay Agents

Relay agents and servers that exchange messages securely use the
IPsec mechanisms for IPv6 [7]. If a client message is relayed
through multiple relay agents, each of the relay agents must have
established independent, pairwise trust relationships. That is, if
messages from client C will be relayed by relay agent A to relay

agent B and then to the server, relay agents A and B must be
configured to use IPSec for the messages they exchange, and relay
agent B and the server must be configured to use IPSec for the
messages they exchange.

Relay agents and servers that support secure relay agent to server or
relay agent to relay agent communication use IPsec under the
following conditions:

Selectors Relay agents are manually configured with the
addresses of the relay agent or server to which
DHCP messages are to be forwarded. Each relay
agent and server that will be using IPsec for
securing DHCP messages must also be configured
with a list of the relay agents to which messages
will be returned. The selectors for the relay
agents and servers will be the pairs of addresses
defining relay agents and servers that exchange
DHCP messages on the DHCPv6 UDP ports 546 and
547.

Mode Relay agents and servers use transport mode and
ESP. The information in DHCP messages is not
generally considered confidential, so encryption
need not be used (i.e., NULL encryption can be
used).

Key management Because the relay agents and servers are used
within an organization, public key schemes are
not necessary. Because the relay agents and
servers must be manually configured, manually
configured key management may suffice, but does
not provide defense against replayed messages.
Accordingly, IKE with preshared secrets SHOULD be
supported. IKE with public keys MAY be
supported.

Security policy DHCP messages between relay agents and servers
should only be accepted from DHCP peers as
identified in the local configuration.

Authentication Shared keys, indexed to the source IP address of
the received DHCP message, are adequate in this
application.

Availability Appropriate IPsec implementations are likely to
be available for servers and for relay agents in
more featureful devices used in enterprise and

core ISP networks. IPsec is less likely to be
available for relay agents in low end devices
primarily used in the home or small office
markets.

21.2. Summary of DHCP Authentication

Authentication of DHCP messages is accomplished through the use of
the Authentication option (see section 22.11). The authentication
information carried in the Authentication option can be used to
reliably identify the source of a DHCP message and to confirm that
the contents of the DHCP message have not been tampered with.

The Authentication option provides a framework for multiple
authentication protocols. Two such protocols are defined here.
Other protocols defined in the future will be specified in separate
documents.

Any DHCP message MUST NOT include more than one Authentication
option.

The protocol field in the Authentication option identifies the
specific protocol used to generate the authentication information
carried in the option. The algorithm field identifies a specific
algorithm within the authentication protocol; for example, the
algorithm field specifies the hash algorithm used to generate the
message authentication code (MAC) in the authentication option. The
replay detection method (RDM) field specifies the type of replay
detection used in the replay detection field.

21.3. Replay Detection

The Replay Detection Method (RDM) field determines the type of replay
detection used in the Replay Detection field.

If the RDM field contains 0x00, the replay detection field MUST be
set to the value of a monotonically increasing counter. Using a
counter value, such as the current time of day (for example, an NTP-
format timestamp [9]), can reduce the danger of replay attacks. This
method MUST be supported by all protocols.

21.4. Delayed Authentication Protocol

If the protocol field is 2, the message is using the "delayed
authentication" mechanism. In delayed authentication, the client
requests authentication in its Solicit message, and the server
replies with an Advertise message that includes authentication

information. This authentication information contains a nonce value
generated by the source as a message authentication code (MAC) to
provide message authentication and entity authentication.

The use of a particular technique based on the HMAC protocol [8]
using the MD5 hash [16] is defined here.

21.4.1. Use of the Authentication Option in the Delayed Authentication
Protocol

In a Solicit message, the client fills in the protocol, algorithm and
RDM fields in the Authentication option with the client's
preferences. The client sets the replay detection field to zero and
omits the authentication information field. The client sets the
option-len field to 11.

In all other messages, the protocol and algorithm fields identify the
method used to construct the contents of the authentication
information field. The RDM field identifies the method used to
construct the contents of the replay detection field.

The format of the Authentication information is:

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| DHCP realm |
| (variable length) |
. .
. .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| key ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| HMAC-MD5 |
| (128 bits) |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

DHCP realm The DHCP realm that identifies the key used to
generate the HMAC-MD5 value.

key ID The key identifier that identified the key used to
generate the HMAC-MD5 value.

HMAC-MD5 The message authentication code generated by applying
MD5 to the DHCP message using the key identified by
the DHCP realm, client DUID, and key ID.

The sender computes the MAC using the HMAC generation algorithm [8]
and the MD5 hash function [16]. The entire DHCP message (setting the
MAC field of the authentication option to zero), including the DHCP
message header and the options field, is used as input to the HMAC-
MD5 computation function.

DISCUSSION:

Algorithm 1 specifies the use of HMAC-MD5. Use of a different
technique, such as HMAC-SHA, will be specified as a separate
protocol.

The DHCP realm used to identify authentication keys is chosen to
be unique among administrative domains. Use of the DHCP realm
allows DHCP administrators to avoid conflict in the use of key
identifiers, and allows a host using DHCP to use authenticated
DHCP while roaming among DHCP administrative domains.

21.4.2. Message Validation

Any DHCP message that includes more than one authentication option
MUST be discarded.

To validate an incoming message, the receiver first checks that the
value in the replay detection field is acceptable according to the
replay detection method specified by the RDM field. Next, the
receiver computes the MAC as described in [8]. The entire DHCP
message (setting the MAC field of the authentication option to 0) is
used as input to the HMAC-MD5 computation function. If the MAC
computed by the receiver does not match the MAC contained in the
authentication option, the receiver MUST discard the DHCP message.

21.4.3. Key Utilization

Each DHCP client has a set of keys. Each key is identified by <DHCP
realm, client DUID, key id>. Each key also has a lifetime. The key
may not be used past the end of its lifetime. The client's keys are
initially distributed to the client through some out-of-band
mechanism. The lifetime for each key is distributed with the key.
Mechanisms for key distribution and lifetime specification are beyond
the scope of this document.

The client and server use one of the client's keys to authenticate
DHCP messages during a session (until the next Solicit message sent
by the client).

21.4.4. Client Considerations for Delayed Authentication Protocol

The client announces its intention to use DHCP authentication by
including an Authentication option in its Solicit message. The
server selects a key for the client based on the client's DUID. The
client and server use that key to authenticate all DHCP messages
exchanged during the session.

21.4.4.1. Sending Solicit Messages

When the client sends a Solicit message and wishes to use
authentication, it includes an Authentication option with the desired
protocol, algorithm and RDM as described in section 21.4. The client
does not include any replay detection or authentication information
in the Authentication option.

21.4.4.2. Receiving Advertise Messages

The client validates any Advertise messages containing an
Authentication option specifying the delayed authentication protocol
using the validation test described in section 21.4.2.

Client behavior, if no Advertise messages include authentication
information or pass the validation test, is controlled by local
policy on the client. According to client policy, the client MAY
choose to respond to an Advertise message that has not been
authenticated.

The decision to set local policy to accept unauthenticated messages
should be made with care. Accepting an unauthenticated Advertise
message can make the client vulnerable to spoofing and other attacks.
If local users are not explicitly informed that the client has
accepted an unauthenticated Advertise message, the users may
incorrectly assume that the client has received an authenticated
address and is not subject to DHCP attacks through unauthenticated
messages.

A client MUST be configurable to discard unauthenticated messages,
and SHOULD be configured by default to discard unauthenticated
messages if the client has been configured with an authentication key
or other authentication information. A client MAY choose to
differentiate between Advertise messages with no authentication
information and Advertise messages that do not pass the validation
test; for example, a client might accept the former and discard the
latter. If a client does accept an unauthenticated message, the
client SHOULD inform any local users and SHOULD log the event.

21.4.4.3. Sending Request, Confirm, Renew, Rebind, Decline or Release
Messages

If the client authenticated the Advertise message through which the
client selected the server, the client MUST generate authentication
information for subsequent Request, Confirm, Renew, Rebind or Release
messages sent to the server, as described in section 21.4. When the
client sends a subsequent message, it MUST use the same key used by
the server to generate the authentication information.

21.4.4.4. Sending Information-request Messages

If the server has selected a key for the client in a previous message
exchange (see section 21.4.5.1), the client MUST use the same key to
generate the authentication information throughout the session.

21.4.4.5. Receiving Reply Messages

If the client authenticated the Advertise it accepted, the client
MUST validate the associated Reply message from the server. The
client MUST discard the Reply if the message fails to pass the
validation test and MAY log the validation failure. If the Reply
fails to pass the validation test, the client MUST restart the DHCP
configuration process by sending a Solicit message.

If the client accepted an Advertise message that did not include
authentication information or did not pass the validation test, the
client MAY accept an unauthenticated Reply message from the server.

21.4.4.6. Receiving Reconfigure Messages

The client MUST discard the Reconfigure if the message fails to pass
the validation test and MAY log the validation failure.

21.4.5. Server Considerations for Delayed Authentication Protocol

After receiving a Solicit message that contains an Authentication
option, the server selects a key for the client, based on the
client's DUID and key selection policies with which the server has
been configured. The server identifies the selected key in the
Advertise message and uses the key to validate subsequent messages
between the client and the server.

21.4.5.1. Receiving Solicit Messages and Sending Advertise Messages

The server selects a key for the client and includes authentication
information in the Advertise message returned to the client as
specified in section 21.4. The server MUST record the identifier of
the key selected for the client and use that same key for validating
subsequent messages with the client.

21.4.5.2. Receiving Request, Confirm, Renew, Rebind or Release Messages
and Sending Reply Messages

The server uses the key identified in the message and validates the
message as specified in section 21.4.2. If the message fails to pass
the validation test or the server does not know the key identified by
the 'key ID' field, the server MUST discard the message and MAY
choose to log the validation failure.

If the message passes the validation test, the server responds to the
specific message as described in section 18.2. The server MUST
include authentication information generated using the key identified
in the received message, as specified in section 21.4.

21.5. Reconfigure Key Authentication Protocol

The Reconfigure key authentication protocol provides protection
against misconfiguration of a client caused by a Reconfigure message
sent by a malicious DHCP server. In this protocol, a DHCP server
sends a Reconfigure Key to the client in the initial exchange of DHCP
messages. The client records the Reconfigure Key for use in
authenticating subsequent Reconfigure messages from that server. The
server then includes an HMAC computed from the Reconfigure Key in
subsequent Reconfigure messages.

Both the Reconfigure Key sent from the server to the client and the
HMAC in subsequent Reconfigure messages are carried as the
Authentication information in an Authentication option. The format
of the Authentication information is defined in the following
section.

The Reconfigure Key protocol is used (initiated by the server) only
if the client and server are not using any other authentication
protocol and the client and server have negotiated to use Reconfigure
messages.

21.5.1. Use of the Authentication Option in the Reconfigure Key
Authentication Protocol

The following fields are set in an Authentication option for the
Reconfigure Key Authentication Protocol:

protocol 3

algorithm 1

RDM 0

The format of the Authentication information for the Reconfigure Key
Authentication Protocol is:

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Value (128 bits) |
+-+-+-+-+-+-+-+-+ |
. .
. .
. +-+-+-+-+-+-+-+-+
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type Type of data in Value field carried in this option:

1 Reconfigure Key value (used in Reply message).

2 HMAC-MD5 digest of the message (used in Reconfigure
message).

Value Data as defined by field.

21.5.2. Server considerations for Reconfigure Key protocol

The server selects a Reconfigure Key for a client during the
Request/Reply, Solicit/Reply or Information-request/Reply message
exchange. The server records the Reconfigure Key and transmits that
key to the client in an Authentication option in the Reply message.

The Reconfigure Key is 128 bits long, and MUST be a cryptographically
strong random or pseudo-random number that cannot easily be
predicted.

To provide authentication for a Reconfigure message, the server
selects a replay detection value according to the RDM selected by the
server, and computes an HMAC-MD5 of the Reconfigure message using the
Reconfigure Key for the client. The server computes the HMAC-MD5
over the entire DHCP Reconfigure message, including the
Authentication option; the HMAC-MD5 field in the Authentication
option is set to zero for the HMAC-MD5 computation. The server
includes the HMAC-MD5 in the authentication information field in an
Authentication option included in the Reconfigure message sent to the
client.

21.5.3. Client considerations for Reconfigure Key protocol

The client will receive a Reconfigure Key from the server in the
initial Reply message from the server. The client records the
Reconfigure Key for use in authenticating subsequent Reconfigure
messages.

To authenticate a Reconfigure message, the client computes an
HMAC-MD5 over the DHCP Reconfigure message, using the Reconfigure Key
received from the server. If this computed HMAC-MD5 matches the
value in the Authentication option, the client accepts the
Reconfigure message.

22. DHCP Options

Options are used to carry additional information and parameters in
DHCP messages. Every option shares a common base format, as
described in section 22.1. All values in options are represented in
network byte order.

This document describes the DHCP options defined as part of the base
DHCP specification. Other options may be defined in the future in
separate documents.

Unless otherwise noted, each option may appear only in the options
area of a DHCP message and may appear only once. If an option does
appear multiple times, each instance is considered separate and the
data areas of the options MUST NOT be concatenated or otherwise
combined.

22.1. Format of DHCP Options

The format of DHCP options is:

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| option-code | option-len |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| option-data |
| (option-len octets) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

option-code An unsigned integer identifying the specific option
type carried in this option.

option-len An unsigned integer giving the length of the
option-data field in this option in octets.

option-data The data for the option; the format of this data
depends on the definition of the option.

DHCPv6 options are scoped by using encapsulation. Some options apply
generally to the client, some are specific to an IA, and some are
specific to the addresses within an IA. These latter two cases are
discussed in sections 22.4 and 22.6.

22.2. Client Identifier Option

The Client Identifier option is used to carry a DUID (see section 9)
identifying a client between a client and a server. The format of
the Client Identifier option is:

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| OPTION_CLIENTID | option-len |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
. .
. DUID .
. (variable length) .
. .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

option-code OPTION_CLIENTID (1).

option-len Length of DUID in octets.

DUID The DUID for the client.

22.3. Server Identifier Option

The Server Identifier option is used to carry a DUID (see section 9)
identifying a server between a client and a server. The format of
the Server Identifier option is:

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| OPTION_SERVERID | option-len |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
. .
. DUID .
. (variable length) .
. .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

option-code OPTION_SERVERID (2).

option-len Length of DUID in octets.

DUID The DUID for the server.

22.4. Identity Association for Non-temporary Addresses Option

The Identity Association for Non-temporary Addresses option (IA_NA
option) is used to carry an IA_NA, the parameters associated with the
IA_NA, and the non-temporary addresses associated with the IA_NA.

Addresses appearing in an IA_NA option are not temporary addresses
(see section 22.5).

The format of the IA_NA option is:

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| OPTION_IA_NA | option-len |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IAID (4 octets) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| T1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| T2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
. IA_NA-options .
. .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

option-code OPTION_IA_NA (3).

option-len 12 + length of IA_NA-options field.

IAID The unique identifier for this IA_NA; the
IAID must be unique among the identifiers for
all of this client's IA_NAs. The number
space for IA_NA IAIDs is separate from the
number space for IA_TA IAIDs.

T1 The time at which the client contacts the
server from which the addresses in the IA_NA
were obtained to extend the lifetimes of the
addresses assigned to the IA_NA; T1 is a
time duration relative to the current time
expressed in units of seconds.

T2 The time at which the client contacts any
available server to extend the lifetimes of
the addresses assigned to the IA_NA; T2 is a
time duration relative to the current time
expressed in units of seconds.

IA_NA-options Options associated with this IA_NA.

The IA_NA-options field encapsulates those options that are specific
to this IA_NA. For example, all of the IA Address Options carrying
the addresses associated with this IA_NA are in the IA_NA-options
field.

An IA_NA option may only appear in the options area of a DHCP
------分隔线----------------------------
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
最新评论 查看所有评论
发表评论 查看所有评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 密码: 验证码:
推荐内容