#readwise
# DHCPv6 - Wikipedia

## Metadata
- Author: [[wikipedia.org]]
- Full Title: DHCPv6 - Wikipedia
- URL: https://en.wikipedia.org/wiki/DHCPv6
## Summary
DHCPv6 is a protocol that helps configure devices on an IPv6 network by assigning them IP addresses and other important information. It can work alongside another method called SLAAC, which allows devices to create their own IP addresses. DHCPv6 is useful because it can provide additional information that SLAAC does not, like the addresses of DNS servers. This protocol also includes a way to automatically configure routers in a network without needing manual setup.
## Highlights
The Dynamic Host Configuration Protocol version 6 (DHCPv6) is a [network protocol](https://en.wikipedia.org/wiki/Network_protocol) for configuring [[IPv6 - Wikipedia|Internet Protocol version 6]] (IPv6) [hosts](https://en.wikipedia.org/wiki/Host_(network)) with [IP addresses](https://en.wikipedia.org/wiki/IP_address), [IP prefixes](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing), [default route](https://en.wikipedia.org/wiki/Default_route), local segment [[Maximum Transmission Unit - Wikipedia|MTU]], and other configuration data required to operate in an IPv6 network. It is not just the IPv6 equivalent of the [[Dynamic Host Configuration Protocol - Wikipedia|Dynamic Host Configuration Protocol]] for [[IPv4 - Wikipedia|IPv4]]. ([View Highlight](https://read.readwise.io/read/01jhtq124t4yqv2v4rqtqgr8f0)) ^e8dgtw
---
IPv6 hosts may automatically generate IP addresses internally using [stateless address autoconfiguration](https://en.wikipedia.org/wiki/IPv6#Stateless_address_autoconfiguration_(SLAAC)) (SLAAC), or they may be assigned configuration data with DHCPv6, or both. ([View Highlight](https://read.readwise.io/read/01jhtq18v45cj74px4pxnwvvh2)) ^fqu7y0
---
IPv6 hosts that use stateless autoconfiguration may need information other than what SLAAC provides on a given network. DHCPv6 can provide this information whether it is being used to assign IP addresses or not. DHCPv6 can provide host with the addresses of [Domain Name System](https://en.wikipedia.org/wiki/Domain_Name_System) (DNS) servers, but they can also be provided through [[Neighbor Discovery Protocol - Wikipedia|Neighbor Discovery Protocol]], which is the mechanism for stateless autoconfiguration. ([View Highlight](https://read.readwise.io/read/01jhtq1s89j0dcs4gekdnj0fep))
---
Port numbers
Clients listen for DHCP messages on [UDP](https://en.wikipedia.org/wiki/User_Datagram_Protocol) port 546. Servers and relay agents listen for DHCP messages on UDP port 547. ([View Highlight](https://read.readwise.io/read/01jhtq24z9q4majwdbg8pa91w5))
---
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. ^mkpnm9
- Four DUID types are identified: ^23vlx5
- Link-layer address plus time (DUID-LLT)
- Vendor-assigned unique ID based on enterprise number (DUID-EN)
- Link-layer address (DUID-LL)
- UUID-based DUID (DUID-UUID)
RFC 6939: Client Link-Layer Address Option
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](https://datatracker.ietf.org/doc/html/rfc6939) was released, giving a way to identify a host based on its [MAC address](https://en.wikipedia.org/wiki/MAC_address). It defines a way for a DHCPv6 relay to pass that information to a DHCPv6 server. ([View Highlight](https://read.readwise.io/read/01jhtq3sbbqjq45wrggrr9zdsn))
---