> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/welcome/cn/elastic-compute/networking/01-overview-4/04-eip-allocation.md).

# 自带 IP EIP 分配

客户 CIDR 进入 `活跃` 状态后，其 EIP 池即开放分配。从该池中提取地址的操作与从 Zenlayer 默认池中提取地址完全相同 — 只需将分配目标指向客户 IP 池即可。

## 分配流程

分配流程采用常规 EIP 参数，外加您希望地址来源的池：

1. 在客户 CIDR 的详情页上查找池 ID。
2. 提交 EIP 分配请求，并将该池 ID 设置为目标池。
3. 平台从该池中预留一个地址，并返回一个常规 EIP 对象。

此后的所有操作 — 绑定到实例、添加到 NAT 网关 SNAT 条目、带宽配置、释放 — 均与其他 EIP 流程完全相同。不存在 BYOIP 专属的绑定、SNAT 或释放路径。

## 客户自有标记

每个 EIP 都携带一个标记，指示其地址来源于 Zenlayer 分配的池还是您的客户 CIDR 之一。这是将您的地址与默认供给区分开来的唯一标识。

该标记在三个场景中非常有用：

* **分配目标验证** — 确认某次分配确实来自客户 IP 池，而非因遗漏池 ID 而落到默认池。
* **清单审计** — 回答"我的在线 EIP 中哪些是我自有地址？"无需手动逐一核对前缀归属。
* **事件响应** — 当下游系统对某个源 IP 发出告警时，该标记能立即告知您问题是否出在客户 CIDR 还是其他地方。

## 将自带 IP EIP 与其他服务配合使用

由于客户 IP 池中的 EIP 在运行时层面就是普通 EIP，它们无需额外配置即可接入下游服务：

| 服务               | 客户 IP 池 EIP 的适用方式                         |
| ---------------- | ----------------------------------------- |
| **实例**           | 直接绑定到网络接口。实例将使用您的地址处理入站和出站流量。             |
| **NAT 网关（SNAT）** | 在 SNAT 条目中引用该 EIP。所覆盖子网的出站流量将通过您的地址访问互联网。 |
| **NAT 网关（DNAT）** | 在 DNAT 条目中引用该 EIP。入站端口转发将落在您的地址上。         |
| **负载均衡器**        | 用作前端 EIP。客户端将看到您的地址作为服务的公网 IP。            |

在所有情况下，下游服务无需知道该 EIP 来自 BYOIP 池 — 它只看到一个 EIP。

## 释放分配

释放客户 IP 池中的 EIP 与释放其他 EIP 的方式相同 — 但地址会回到*您的*池中，而非 Zenlayer 分配的池。这意味着：

* 已释放的地址可在后续请求中从客户 IP 池重新分配。
* 释放不会删除客户 CIDR。如需退役 CIDR 本身，必须先释放所有已分配的 EIP。参见[客户 CIDR — 与已分配 EIP 的关系](https://docs.console.zenlayer.com/welcome/cn/elastic-compute/networking/01-overview-4/pages/lnC4D7I2eJXAs5KQSLrd#与已分配-eip-的关系)。

***

## 常见问题

**可以从池中选择特定地址吗？** 池决定了前缀范围；具体 IP 的选择取决于您的账户的 EIP 分配流程所支持的能力。

**可以分配超过 CIDR 容量的地址吗？** 不可以。一旦池耗尽，以该池为目标的新分配请求将被拒绝，直到有地址被释放或添加了新的 CIDR。

**如果我忘记指定池 ID，从默认池分配了地址怎么办？** 分配会成功，但落在 Zenlayer 分配的地址上。您可以通过 EIP 上的客户自有标记来判断。释放该 EIP，并使用正确的池 ID 重新分配，即可获得来自您 CIDR 的地址。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://docs.console.zenlayer.com/welcome/cn/elastic-compute/networking/01-overview-4/04-eip-allocation.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.
