> 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-3/05-routing.md).

# NAT 网关 VPC 路由

NAT 网关会自动与 VPC 路由表集成。当您创建或更新网关的子网关联时，平台会为这些来源安装到达网关所需的路由。您无需手动创建这些路由。

## 自动安装的路由

对于每个覆盖的子网，平台会添加一条指向 NAT 网关的默认路由（`0.0.0.0/0`）。如果网关关联了 Border Gateway，平台还会创建从该 Border Gateway 来源流量所需的路由。

SNAT 条目本身不会创建 VPC 路由。它们控制的是流量到达网关后的转换逻辑。

## 路由冲突

在网关路由生效之前，平台会检查是否有另一个 NAT 网关已覆盖相同的源范围。常见冲突原因包括：

* 另一个 NAT 网关已覆盖一个或多个相同的子网。
* 另一个 NAT 网关已关联相同的 Border Gateway。

如果发现冲突，操作将被拒绝。请先移除或重新分配现有的网关关联，再重试。

为避免冲突，在创建新网关或更改子网覆盖范围之前，请检查 VPC 路由表和现有的 NAT 网关关联情况。

## 删除条目或网关时的行为

当 SNAT 条目被删除时，该条目的转换将停止。只要子网仍与网关关联，网关路由就会保持不变。

当 NAT 网关被删除时，绑定的 EIP 将被解绑，网关随之移除。网关的 VPC 路由也将作为删除流程的一部分被撤销。

## DNAT 与路由

DNAT 条目不会修改 VPC 路由表。入站转发完全在网关内部根据到达数据包的 EIP、端口和协议进行处理。VPC 侧无需进行额外的路由变更来支持 DNAT。

## 在 Console 中查看路由

要查看 NAT 网关已安装的路由，请在管理 Console 中导航至 **VPC → 路由表**，选择相关路由表，并按类型 **NAT 网关**进行筛选。每条条目显示目标前缀、指向的网关以及适用的子网。


---

# 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-3/05-routing.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.
