# DHCPv6

<details>

<summary><strong>从零开始学习AWS黑客技术，成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE（HackTricks AWS红队专家）</strong></a><strong>！</strong></summary>

支持HackTricks的其他方式：

* 如果您想看到您的**公司在HackTricks中做广告**或**下载PDF格式的HackTricks**，请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
* 获取[**官方PEASS & HackTricks周边产品**](https://peass.creator-spring.com)
* 探索[**PEASS家族**](https://opensea.io/collection/the-peass-family)，我们独家的[**NFTs**](https://opensea.io/collection/the-peass-family)收藏品
* **加入** 💬 [**Discord群**](https://discord.gg/hRep4RUj7f) 或 [**电报群**](https://t.me/peass) 或在**Twitter**上关注我们 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**。**
* 通过向[**HackTricks**](https://github.com/carlospolop/hacktricks)和[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享您的黑客技巧。

</details>

#### DHCPv6与DHCPv4消息类型比较

下表展示了DHCPv6和DHCPv4消息类型的比较：

| DHCPv6消息类型                         | DHCPv4消息类型        |
| ---------------------------------- | ----------------- |
| Solicit (1)                        | DHCPDISCOVER      |
| Advertise (2)                      | DHCPOFFER         |
| Request (3), Renew (5), Rebind (6) | DHCPREQUEST       |
| Reply (7)                          | DHCPACK / DHCPNAK |
| Release (8)                        | DHCPRELEASE       |
| Information-Request (11)           | DHCPINFORM        |
| Decline (9)                        | DHCPDECLINE       |
| Confirm (4)                        | 无                 |
| Reconfigure (10)                   | DHCPFORCERENEW    |
| Relay-Forw (12), Relay-Reply (13)  | 无                 |

**DHCPv6消息类型详细解释：**

1. **Solicit (1)**: DHCPv6客户端发起以查找可用服务器。
2. **Advertise (2)**: 服务器响应Solicit发送Advertise，指示提供DHCP服务。
3. **Request (3)**: 客户端使用此消息从特定服务器请求IP地址或前缀。
4. **Confirm (4)**: 客户端用于验证分配的地址在网络上是否仍然有效，通常在网络更改后使用。
5. **Renew (5)**: 客户端向原始服务器发送此消息以延长地址生命周期或更新配置。
6. **Rebind (6)**: 发送到任何服务器以延长地址生命周期或更新配置，特别是在未收到Renew的响应时。
7. **Reply (7)**: 服务器使用此消息提供地址、配置参数，或确认Release或Decline等消息。
8. **Release (8)**: 客户端通知服务器停止使用一个或多个分配的地址。
9. **Decline (9)**: 客户端发送此消息报告分配的地址在网络上存在冲突。
10. **Reconfigure (10)**: 服务器提示客户端启动新的或更新配置的事务。
11. **Information-Request (11)**: 客户端请求配置参数而不分配IP地址。
12. **Relay-Forw (12)**: 中继代理将消息转发到服务器。
13. **Relay-Repl (13)**: 服务器回复中继代理，然后将消息传递给客户端。

### 参考资料

* <https://support.huawei.com/enterprise/en/doc/EDOC1100306163/d427e938/introduction-to-dhcpv6-messages>

<details>

<summary><strong>从零开始学习AWS黑客技术，成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE（HackTricks AWS红队专家）</strong></a><strong>！</strong></summary>

支持HackTricks的其他方式：

* 如果您想看到您的**公司在HackTricks中做广告**或**下载PDF格式的HackTricks**，请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
* 获取[**官方PEASS & HackTricks周边产品**](https://peass.creator-spring.com)
* 探索[**PEASS家族**](https://opensea.io/collection/the-peass-family)，我们独家的[**NFTs**](https://opensea.io/collection/the-peass-family)收藏品
* **加入** 💬 [**Discord群**](https://discord.gg/hRep4RUj7f) 或 [**电报群**](https://t.me/peass) 或在**Twitter**上关注我们 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**。**
* 通过向[**HackTricks**](https://github.com/carlospolop/hacktricks)和[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享您的黑客技巧。

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hacktricks.xsx.tw/generic-methodologies-and-resources/pentesting-network/dhcpv6.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
