> 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/07-bandwidth-cap.md).

# 带宽上限

## 简介

**带宽上限**是对 EIP 可推送 Mbps 数量的可选上限。它是一个限速约束，而非计量器——不会改变您在给定计费方式下的付费金额，只是防止流量超过配置的上限。

在 EIP 创建表单上，上限显示为\*"（可选）设置带宽上限"\*，并提示**默认带宽上限为 10 Gbps**。如不设置上限，将使用该默认值。

10 Gbps 上限是 Console 的默认值，而非平台级别的硬性限制。ZEC 完全支持超过 10 Gbps 的 EIP——如果您的业务有需要，请提交工单，可在您的账户上调高上限。

***

## 对各计费方式的意义

带宽上限在不同计费方式下扮演不同角色：

* **流量计费** — 计量器本身无法防止失控工作负载：按 GB 付费，线路占满就意味着高额费用。上限是您的失控防护机制。
* **包月带宽** — 上限*就是*您付费的依据。您选择一个 Mbps 带宽值，这就是您的上限，流量在此处被截断，不允许突发超出。
* **聚合 95 计费** — 按 EIP 的上限限制每个 EIP 对聚合 95th percentile 的贡献。适合不希望某个实例主导整个池的场景。

***

## 方向性上限

入方向（入站）和出方向（出站）上限可独立设置。Console 上通常设置一个对称值；API 允许分别设置。

如果某个方向的上限未设置，默认为平台默认值（Console 上为 10 Gbps）。对于包月带宽，您选择的上限就是您付费的带宽。

***

## 验证规则

每个方向适用两条硬性规则：

* **最小带宽为 0.1 Mbps。** 更小的值会被拒绝。
* **上限必须 ≥ 计费方式的最小值。** 平台会拒绝与计费配置冲突的值。

在 EIP 表单上，Console 以 Mbps 显示上限，并提示默认上限为 10 Gbps——这是不明确设置上限时应用的上限值。

***

## 限速模式——宽松与严格

上限具有形状特征。您可以选择两种限速行为之一：

* **宽松模式。** 限速器允许短暂突发至上限附近后再截断。适合有短暂峰值的工作负载。
* **严格模式。** 限速器将带宽在各流量之间均匀分配，收敛到稳定的吞吐量。适合流量间公平性重要的场景。

两种模式下，流量均不能超过上限。

***

## 如何判断正在被限速

由于 ZEC 数据面完全自主研发，每个 EIP 都提供专用的**丢包**计数器，仅在限速器实际因达到上限而丢弃数据包时递增。如果 `dropped` 为零，说明在您查看的时间窗口内从未发生限速。如果不为零，说明发生了限速。

该计数器通过 EIP 监控指标暴露，按方向拆分：

| 指标                                               | 含义                       |
| ------------------------------------------------ | ------------------------ |
| `ingress_dropped_packets`                        | 因达到入方向上限而丢弃的入站数据包        |
| `egress_dropped_packets`                         | 因达到出方向上限而丢弃的出站数据包        |
| `ingress_dropped_bytes` / `egress_dropped_bytes` | 同上，以字节为单位                |
| `ingress_dropped_bits` / `egress_dropped_bits`   | 同上，以比特为单位（便于与 Mbps 上限对比） |

每个计数器均为**按 EIP、按方向**统计。它们与 `ingress_fwd_packets` / `egress_fwd_packets`（EIP 实际转发的数据包）配合使用，一个有用的信号是比率：

```
drop_rate = dropped_packets / (fwd_packets + dropped_packets)
```

出方向持续出现非零丢包率意味着流量希望超过出方向上限，正在被截断。解决方法是提高上限（如果工作负载确实需要更多空间）或减少上游负载。

由于计数器只有在限速运行后才存在，缺失或始终为零是大多数 EIP 的*预期*状态——这不是异常。

***

## Console 默认值

对于最常见的情况——创建使用流量计费的 EIP，不修改任何上限字段——您会得到：

* 带宽上限默认为 **10 Gbps**，除非明确设置（大型业务可通过工单调高）。
* 限速模式为平台默认值（宽松）。
* 对于包月带宽，您选择的上限就是您付费的带宽。

***

## 何时调高、何时调低上限

* **调高上限**：如果您使用[流量计费](/welcome/cn/elastic-compute/networking/01-overview/03-data-transfer.md)或[聚合 95 计费](/welcome/cn/elastic-compute/networking/01-overview/05-aggregated-95th.md)，且工作负载需要更多空间。
* **调低上限**：如果您使用[流量计费](/welcome/cn/elastic-compute/networking/01-overview/03-data-transfer.md)并希望硬性防止失控。500 Mbps 上限意味着即使出现问题，一天内也最多只能传输约 5.4 TB。
* **对于包月带宽**，上限就是您购买的带宽——选择与工作负载匹配的规格。


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.console.zenlayer.com/welcome/cn/elastic-compute/networking/01-overview/07-bandwidth-cap.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
