> 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/get-started/manage-networking/create-a-custom-route.md).

# 创建自定义路由

全球 VPC 中的路由决定了数据包在 VPC 内部和外部的传输方向，指定了哪些数据包发送到哪些目的地。您可以自定义静态路由并将流量路由到网卡。

## 操作步骤

1. 选择您希望关联静态路由的全球 VPC。
2. 设置目标地址。\
   目标范围是一个单独的 IPv4 或 IPv6 范围，且不能与现有的子网路由完全匹配或包含在内。
3. 设置路由的优先级。\
   值范围从 0 到 65535。值越小，优先级越高。
4. 选择下一跳实例或网卡。\
   如果您选择实例作为下一跳，数据包将发送到该实例的主网卡。
5. 标记路由。

## 更多操作

您可以在 **路由** > **操作** 中删除静态路由。

子网路由仅在相关子网被删除时才会自动删除。


---

# 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/get-started/manage-networking/create-a-custom-route.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.
