Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

DHCPv6

From Wikipedia, the free encyclopedia
Protocol for statefully assigning IPv6 addresses on an IPv6 network
Dynamic Host Configuration Protocol version 6
Communication protocol
AbbreviationDHCPv6
PurposeProvideIPv6 addresses and additional network configuration parameters to clients in anIPv6 network.
Developer(s)Michael Carney
Charles E. Perkins
Bernie Volz
Ted Lemon
Jim Bound
IntroductionJune 2003; 22 years ago (2003-06)
Based onDynamic Host Configuration Protocol forIPv4
OSI layerLayer 7 Application
Port(s)UDP port 546, for Clients.
UDP port 547, for Servers and relay agents.
RFC(s)9915,8415,3319,3646,4704,5007,6355,6939,7653
Internet protocol suite
Application layer
Transport layer
Internet layer
Link layer

TheDynamic Host Configuration Protocol version 6 (DHCPv6) is anetwork protocol for configuringInternet Protocol version 6 (IPv6)hosts withIP addresses,IP prefixes, and other configuration data required to operate in an IPv6 network. It is not just the IPv6 equivalent of theDynamic Host Configuration Protocol forIPv4.

IPv6 hosts may automatically generate IP addresses internally usingstateless address autoconfiguration (SLAAC), or they may be assigned configuration data with DHCPv6, or both.

DHCPv6 and SLAAC are complementary services. Unlike theNeighbor Discovery Protocol (NDP) used by SLAAC, DHCPv6 can not only assign single unicast addresses, but also entire prefixes inprefix delegation. For example, an ISP's router can provide a prefix to a customer's router via DHCPv6 so that the customer's router can assign addresses to the customer's many devices via either DHCPv6 or SLAAC. This allows routers for residential networks to be configured with no operator intervention.

DHCPv6 also allows the distribution of information other than what SLAAC/NDP provides on a given network: this works even without DHCPv6 managing the distribution of network addresses. The standard method for a SLAAC/NDP network to hand outDomain Name System (DNS) server settings is via setting a flag in the Router Advertisement (RA) message telling the clients to ask for such settings over DHCPv6,[1]: §4.2  although this specific use case is being replaced via a nonstandard extension of the RA message.[2] Still, there remains a plethora of DHCPv6 options for providing additional information not handled by SLAAC/NDP, much like the wide range of information conveyed by legacy DHCP options.[3]

Finally, DHCPv6 also offers a stateful approach, which provides more control over SLAAC's stateless approach.

Operation

[edit]

Multicast addresses in DHCPv6

[edit]

DHCPv6 usesIPv6 multicast addresses to enable communication between clients, relay agents, and servers when unicast addresses are not yet known. RFC 9915 defines two well-known multicast groups for this purpose.

Defined multicast addresses

[edit]
Multicast addressNameScopeUsed byPurpose
ff02::1:2All_DHCP_Relay_Agents_and_ServersLink-localClientsDiscover on-link DHCPv6 servers and relay agents
ff05::1:3All_DHCP_ServersSite-localRelay agentsForward client messages to all DHCPv6 servers within a site

All DHCPv6 servers and relay agents must join the appropriate multicast groups on relevant interfaces.

Notes

  • Link-local multicast traffic (ff02::1:2) is never forwarded beyond the local link.
  • Site-local multicast (ff05::1:3) requires the relay agent to have an address with sufficient scope to reach servers within the site.
  • Multicast support is mandatory for correct DHCPv6 operation.

Port numbers

[edit]

Clients listen for DHCP messages onUDP port 546. Servers and relay agents listen for DHCP messages on UDP port 547.[4]: §7.2 

Identifiers

[edit]

DHCP unique identifier

[edit]

The DHCP unique identifier (DUID) is used by a client to get an IP address from a DHCPv6 server. It has a 2-byte DUID type field, and a variable-length identifier field up to 128 bytes. Its actual length depends on its type. The server compares the DUID with its database and delivers configuration data (address, lease times, DNS servers, etc.) to the client.

Four DUID types are identified:[4]: §11 

TypeNameDescription
1DUID-LLTlink-layer address plus time
2DUID-ENVendor-assigned identifier based on Enterprise Number
3DUID-LLlink-layer address
4DUID-UUIDUniversally Unique Identifier (UUID)

RFC 6939: Client Link-Layer Address Option

[edit]

Due to the fact that it is difficult to manage multiple identifiers in a dual-stack environment, and the fact that DUIDs are simply not optimal for some situations,RFC 6939 was released, giving a way to identify a host based on itsMAC address. It defines a way for a DHCPv6 relay to pass that information to a DHCPv6 server.

Example

[edit]
DHCPv6 Example sequence Diagram, with Router Discovery (NDP)
DHCPv6 Example sequence Diagram, with Router Discovery (NDP)

In this example, without rapid-commit present, the server's link-local address isfe80::0011:22ff:fe33:5566 and the client's link-local address isfe80::aabb:ccff:fedd:eeff.

  • Client sends asolicit from [fe80::aabb:ccff:fedd:eeff]:546 to multicast address [ff02::1:2]:547.[4]: §14 
  • Server replies with anadvertise from [fe80::0011:22ff:fe33:5566]:547 to [fe80::aabb:ccff:fedd:eeff]:546.
  • Client replies with arequest from [fe80::aabb:ccff:fedd:eeff]:546 to [ff02::1:2]:547.
  • Server finishes with areply from [fe80::0011:22ff:fe33:5566]:547 to [fe80::aabb:ccff:fedd:eeff]:546.

Client/Server Message Formats

[edit]

DHCP messages utilize a fixed-format header followed by a variable-format options area.

Message Structure Overview

[edit]

All values in the message header and options are encoded innetwork byte order.

Client/Server Message Format
OffsetOctet0123
OctetBit012345678910111213141516171819202122232425262728293031
00msg-typetransaction-id
432Options; code, length and data. (variable number and length)
864
msg-type: 8 bits
Identifies the DHCP message type
transaction-id: 24 bits
Value to synchronize server responses to client messages. Random number generated by client.
Options: Variable bits
Options have up to three fields: Option-code (2 octet), Option-Length (2 octet), Option-Data (variable). Depending on Option-code value, the next two fields may be set. Option-Length indicates the total length of the option, and Option-Data contains data associated with the option, if applicable.


Message types

This table lists the DHCPv6 message types.

DHCPv6 Message Types
CodeNameDescriptionRFC
1SOLICITClient initiates to locate available servers.RFC 8415
2ADVERTISEServer indicates availability in response to Solicit.RFC 8415
3REQUESTClient requests parameters/addresses from a specific server.RFC 8415
4CONFIRMClient verifies if assigned addresses remain valid for the link.RFC 8415
5RENEWClient requests lease extension from the original server.RFC 8415
6REBINDClient requests lease extension from any available server after a RENEW fails.RFC 8415
7REPLYServer provides leases, parameters, or acknowledgments in response to client messages.RFC 8415
8RELEASEClient notifies the issuing server that it is relinquishing one or more leases.RFC 8415
9DECLINEClient notifies server that assigned addresses are already in use on the link.RFC 8415
10RECONFIGUREServer prompts client to initiate a transaction to receive updated parameters.RFC 8415
11INFORMATION-REQUESTClient requests configuration parameters without lease assignments.RFC 8415
12RELAY-FORWRelay agent forwards a message to a server. The original message is encapsulated within an option.RFC 8415
13RELAY-REPLServer sends a response to a relay agent. The response for the client is encapsulated within an option for the relay to extract.RFC 8415
14LEASEQUERYA requestor queries a server to retrieve information regarding a client's lease state. The query scope is defined by the OPTION_LQ_QUERY.RFC 5007
15LEASEQUERY-REPLYThe server responds to a LEASEQUERY with the requested client lease data or status.RFC 5007
16LEASEQUERY-DONESignals the termination of a leasequery response stream.RFC 5460
17LEASEQUERY-DATATransmits data for a single client's leases or Prefix Delegation (PD) bindings.RFC 5460
18RECONFIGURE-REQUESTRFC 6977
19RECONFIGURE-REPLYRFC 6977
20DHCPV4-QUERYClient sends this to a DHCP 4o6 server. It contains the DHCPv4 message within a 'DHCPv4 Message' option.RFC 7341
21DHCPV4-RESPONSEServer responds to the client. It carries the resulting DHCPv4 message inside a 'DHCPv4 Message' option.RFC 7341
22ACTIVELEASEQUERYProvide real-time (or near real-time) updates on DHCPv6 binding activity. Unlike a standard query, it instructs the server to transmit updates as they occur after the request is received.RFC 7653
23STARTTLSUnitiates the establishment of a Transport Layer Security (TLS) connection between a requestor and a DHCPv6 server.RFC 7653

Option codes

This table lists some of DHCPv6 Option codes. Full list can be for herIANA DHCPv6 Option Codes

DHCPv6 Option Codes
Option-CodeNameDescriptionRFC
1OPTION_CLIENTIDCarries a DUID to uniquely identify the client.RFC 8415
2OPTION_SERVERIDCarries a DUID to uniquely identify the server.RFC 8415
3OPTION_IA_NAContainer for non-temporary address assignments and associated parameters.RFC 8415
4OPTION_IA_TAContainer for temporary address assignments.RFC 8415
5OPTION_IAADDRSpecifies an IPv6 address associated with an IA_NA or IA_TA.RFC 8415
6OPTION_OROIdentifies a list of requested options by their option codes.RFC 8415
7OPTION_PREFERENCEProvides a preference value to influence the client's server selection.RFC 8415
8OPTION_ELAPSED_TIMEReports the duration of the current DHCP transaction in hundredths of a second.RFC 8415
9OPTION_RELAY_MSGEncapsulates a DHCPv6 message for transmission between relay agents and servers.RFC 8415
11OPTION_AUTHCarries authentication information to verify the identity of the sender.RFC 8415
12OPTION_UNICASTIndicates a server unicast address the client may use for direct contact.RFC 8415
13OPTION_STATUS_CODECommunicates success or failure status and associated error messages.RFC 8415
14OPTION_RAPID_COMMITSignals the use of a two-message exchange for address assignment.RFC 8415
15OPTION_USER_CLASSIdentifies the type or category of user or application on the client.RFC 8415
16OPTION_VENDOR_CLASSIdentifies the vendor and hardware/software configuration of the client.RFC 8415
17OPTION_VENDOR_OPTSCarries vendor-specific information and parameters.RFC 8415
18OPTION_INTERFACE_IDIdentifies the specific interface on which a relay agent received a message.RFC 8415
19OPTION_RECONF_MSGSpecifies the message type a client must use when responding to reconfiguration.RFC 8415
20OPTION_RECONF_ACCEPTSignals that the client supports and will accept Reconfigure messages.RFC 8415
25OPTION_IA_PDContainer for prefix delegation identity associations and parameters.RFC 8415
26OPTION_IAPREFIXSpecifies an IPv6 prefix associated with an IA_PD.RFC 8415
32OPTION_INFORMATION_REFRESH_TIMEDefines the interval at which a client should refresh its configuration information.RFC 8415
82OPTION_SOL_MAX_RTDefines the maximum retransmission timeout for Solicit messages.RFC 8415
83OPTION_INF_MAX_RTDefines the maximum retransmission timeout for Information-request messages.RFC 8415

DHCP Unique Identifier (DUID) option

[edit]

All devices participating in a DHCPv6 exchange[4]: §11 , whether acting as a client or a server, must possess a single DHCP Unique Identifier (DUID) to establish a persistent identity within the network. This identifier is carried in theOPTION_CLIENTID (1) andOPTION_SERVERID (2) fields to ensure that transactions remain consistent even if hardware interfaces are swapped or addresses are reassigned. The DUID is designed to be permanent across reboots and reconfigurations, acting as the definitive anchor for the server’s binding database and the client’s server-selection logic.

DUID-LLT (Link-Layer Address Plus Time)

[edit]

DUID-LLT (Type 1)[4]: §11.2  consists of:

  • DUID type (1)
  • Hardware type (IANA-assigned)
  • Time value (seconds since 00:00 UTC, 1 January 2000, modulo 2³²)
  • link-layer address

The time component reduces the likelihood of collisions if the same link-layer address is reused on another device. Devices using DUID-LLT must store the generated identifier in stable, non-volatile storage and continue using it even if the original network interface is removed.

This type is recommended for general-purpose computing devices such as desktops, laptops, and printers, that provide writable persistent storage.

DUID-LLT Format
OffsetOctet0123
OctetBit012345678910111213141516171819202122232425262728293031
00DUID-Type (1)hardware type
432time
864link-layer address (variable length)
1296
16128
20160

DUID-EN (Enterprise Number)

[edit]

DUID-EN (Type 2)[4]: §11.3  is assigned by the device vendor and consists of:

  • DUID type (2)
  • Vendor’s IANA-assigned Private Enterprise Number
  • Vendor-defined unique identifier

The identifier must be unique per device and stored in non-volatile storage. This type is commonly assigned during manufacturing or at first boot in virtualized environments.

DUID-EN Format
OffsetOctet0123
OctetBit012345678910111213141516171819202122232425262728293031
00DUID-Type (2)enterprise-number
432enterprise-number (cont.) 
864identifier (variable length)
34272

DUID-LL (Link-Layer Address)

[edit]

DUID-LL (Type 3)[4]: §11.4  consists of:

Unlike DUID-LLT, no time value is included. This type is intended for devices with a permanently attached network interface and no writable persistent storage. It should not be used if the permanence of the interface cannot be guaranteed.

DUID-LL Format
OffsetOctet0123
OctetBit012345678910111213141516171819202122232425262728293031
00DUID-Type (3)hardware type
432link-layer address (variable length)
864
1296
16128

DUID-UUID (Universally Unique Identifier)

[edit]

DUID-UUID (Type 4)[4]: §11.5  uses a 128-bit UUID as its identifier.

DUID-UUID consists of:

Its usage and UUID selection rules are defined in RFC 6355. This type is suitable for devices that already store a UUID in firmware or platform configuration.

DUID-UUID Format
OffsetOctet0123
OctetBit012345678910111213141516171819202122232425262728293031
00DUID-Type (4) 
432Universally Unique Identifier
864
1296
16128

Option Request Option (ORO)

[edit]

TheOption Request Option (ORO)[4]: §21.7 , identified byOPTION_ORO (6), is the mechanism used by a DHCPv6 client to inform the server which configuration parameters it is interested in receiving. Rather than the server blindly pushing all available data, the client provides a list of option codes within the ORO to tailor the response to its specific needs.

The Option Request Option is defined byIANA DHCPv6 Option Codes

Client Responsibility: The client MUST include an ORO in messages like Solicit, Request, Renew, and Rebind if it requires specific information (such as DNS recursive name servers or domain search lists).

Server Responsibility: The server uses the ORO as a guide. It should include the requested options in its response, provided those options are configured and appropriate for the client's link.

Option Request Option Format
OffsetOctet0123
OctetBit012345678910111213141516171819202122232425262728293031
00OPTION_ORO (6)option-len (2 * number of requested options)
432requested-option-code-1requested-option-code-2
864...
1296

Common DHCPv6 Option Request Codes

In a standard network deployment, a client typically includes the following option codes in itsOPTION_ORO (6) to ensure a functional IPv6 environment:

CodeNameFunction
23DNS_SERVERSRequests a list of IPv6 addresses for recursiveDNS servers.
24DOMAIN_LISTRequests thedomain search list for suffix completion.
31SNTP_SERVERSRequests a list ofSimple Network Time Protocol (SNTP) servers.
32INF_REFRESH_TIMERequests the interval for when to refresh stateless information.
56NTP_SERVERRequestsNetwork Time Protocol (NTP) server information (RFC 5908).
59BOOTFILE_URLUsed inPXE booting to request the location of a boot image.

IETF standards

[edit]
  • RFC 8415, "Dynamic Host Configuration Protocol for IPv6 (DHCPv6)" - Obsoletes RFC 3315, RFC 3633, RFC 3736, RFC 4242, RFC 7083, RFC 7283, RFC 7550.
  • RFC 3319, "Dynamic Host Configuration Protocol (DHCPv6) Options for Session Initiation Protocol (SIP) Servers"
  • RFC 3646, "DNS Configuration options for Dynamic Host Configuration Protocol for IPv6 (DHCPv6)"
  • RFC 4704, "The Dynamic Host Configuration Protocol for IPv6 (DHCPv6) Client Fully Qualified Domain Name (FQDN) Option"
  • RFC 5007, "DHCPv6 Leasequery" support
  • RFC 6221, "Lightweight DHCPv6 Relay Agent" (LDRA) - Updates RFC 3315, Errata
  • RFC 6355, "Definition of the UUID-Based DHCPv6 Unique Identifier (DUID-UUID)"
  • RFC 6939, "Client Link-Layer Address Option in DHCPv6"
  • RFC 7653, "DHCPv6 Active Leasequery"

See also

[edit]

References

[edit]
  1. ^T. Narten; E. Nordmark; W. Simpson; H. Holiman (September 2007).Neighbor Discovery for IP version 6 (IPv6). Network Working Group.doi:10.17487/RFC4861.RFC4861.Draft Standard. ObsoletesRFC 2461. Updated byRFC 5942,6980,7048,7527,7559,8028,8319,8425 and9131.
  2. ^J. Jeong, ed. (February 2006).IPv6 Host Configuration of DNS Server Information Approaches. Network Working Group.doi:10.17487/RFC4339.RFC4339.Informational.
  3. ^"Dynamic Host Configuration Protocol for IPv6 (DHCPv6) [IANA registry]".www.iana.org.
  4. ^abcdefghiT. Mrugalski; M. Siodelski; B. Volz; A. Yourtchenko; M. Richardson; S. Jiang; T. Lemon; T. Winters (November 2018).Dynamic Host Configuration Protocol for IPv6 (DHCPv6).Internet Engineering Task Force.doi:10.17487/RFC8415.ISSN 2070-1721.RFC8415.Proposed Standard. ObsoletesRFC 3315,3633,3736,4242,7083,7283 and7550.

External links

[edit]
Wikiversity has learning resources about DHCPv6
General
Deployment
IPv4 to IPv6 topics
Related protocols
Retrieved from "https://en.wikipedia.org/w/index.php?title=DHCPv6&oldid=1336758142"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp