> For the complete documentation index, see [llms.txt](https://docs.verge.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verge.io/run-the-platform/zh/wang-luo/connect-lan-wan.md).

# 将 VergeOS 连接到现有 LAN/WAN

## 如何连接到现有网络

连接到存在于 VergeOS 环境之外的网络，例如现有的公司 LAN，或 WAN 连接，需要一个 VergeOS 外部网络。通常，在 VergeOS 系统安装期间会创建一个外部网络，并将其映射到一个同样在安装期间定义的物理网络。可以创建多个外部网络，以利用多个可用的物理网络。一个物理网络可以映射多个外部网络，每个网络使用不同的 VLAN。以下说明将介绍在安装后通过 VergeOS UI 创建外部网络。此外，安装期间创建的外部网络也可以使用所提供的设置信息进行修改。

## 创建一个新的外部网络

1. 在云仪表板中，选择 **网络** 左侧菜单中的。
2. 选择 **新的外部网络** 左侧菜单中的。
3. 输入一个 **名称** 用于该网络（必填）。名称应便于未来管理。注意：不允许使用空格。
4. 可选地，可以指定 **描述** 可为该网络输入。
5. 可选地，可以指定 **HA 组** 可为该网络定义。HA 组用于定义两个或更多网络以提供高可用性。当多个网络被分配到同一 HA 组时，系统会尝试将这些网络运行在不同的物理节点上，以提高可用性。
6. 选择合适的 **二层类型**:
   * ***vLan*** （在 Layer 2 ID 字段中指定的 VLAN ID）
   * ***Bond*** - 支持配置为 lag group-active/main 物理设备的交换机端口
   * ***Bond 从属*** - 支持配置为 lag group-secondary 设备的交换机
   * ***无*** - 简单直连
   * ***VXLAN*** （在 Layer 2 ID 字段中指定的 VXLAN ID）
7. 输入一个 **二层 ID**，如适用（VLAN/VXLAN）
8. 输入相应的 **MTU 大小** 用于现有网络。
9. 可选地，可以选择一个特定的 **集群** 来指定此 VNet 将运行的主集群。
10. 可选地，可以选择一个特定的 **故障转移集群** 可用于指定当主集群不可用时运行的集群。
11. 可选地，可以指定 **首选节点** 可用于指定某个特定节点作为运行该 VNet 的“首选”。
12. 可选地，可将此网络设置为允许 **PXE** 为 VergeOS 节点启动（默认情况下未启用 PXE。）
13. 选择合适的 **接口网络** 从物理网络和外部网络的下拉列表中选择。通常这里会选择一个物理网络；选择外部网络（而不是物理网络）用于 Q-in-Q（VLAN 内嵌 VLAN）。
14. 选择合适的 **IP 地址类型**:
    * ***静态*** - 用于为网络指定特定地址
    * ***动态*** - 将网络配置为 DHCP 客户端（这只用于小型测试或归档系统，因为这会将网络限制为单个地址。）
    * ***BGP/OSPF***
    * ***无*** - 二层网络连接
15. 输入 **IP 地址** （如果选择动态类型，则不适用。）
16. 输入 **网络地址** （CIDR 格式）用于该网络，例如：192.168.2.0/24
17. 请为 **DNS 服务器列表**；每个条目以逗号分隔。（例如：10.10.25.3, 10.10.25.4）
18. 选择一个 **DNS** 设置：
    * ***已禁用*** - 不提供 DNS 管理
    * ***绑定*** - 适用于将充当权威 DNS 的网络
    * ***简单*** - 为网络提供 DNS，但不保存实际的 DNS 记录
19. 可选地，勾选 **DHCP** 复选框以为该网络的客户端运行 DHCP 服务器：
    * ***域名*** 用于此网络（可选）
    * ***网关***
    * ***主机名*** （用于此 VNet 的路由器）
    * ***动态 DHCP*** 选项（复选框）- 选中后，可输入 DHCP 开始/停止地址以指定动态分配范围。此外，还可选中 DHCP 顺序地址选项（复选框）以按连续方式分配地址。
20. 选择在恢复供电时对网络采取的操作 **断电时** （这将在物理节点断电后，或对于租户：租户重新开关机之后发生。）
    * ***上次状态*** — 仅当网络在断电时处于开启状态时，才会重新开启
    * ***保持关闭*** — 恢复供电时网络不会开启（无论断电时其状态如何）
    * ***开机*** — 恢复供电时网络将开启（无论断电时其状态如何）
21. 可选地，可以选择以下选项（复选框）：
    * **跟踪统计** 用于所有规则，以自动为应用于此网络的所有规则开启跟踪。
    * **跟踪 DMZ 统计信息** 用于跟踪经过 DMZ 网络的此网络的总数据包/字节数。
    * **启用路由限速** 用于为整个网络定义限制。（示例用途：按使用量计费等。）
    * **速率限制** 对网络流量的整体限制
    * **速率类型** （例如：每秒数据包数、每天兆字节数、每小时字节数等）
    * **速率限制突发** - 只要速率限制保持在所定义的平均值范围内，就允许此突发速率。
22. 单击 **提交** 以完成新网络的创建。
23. 新网络的仪表板将会显示。点击 **开启电源** 从左侧菜单启动该网络。


---

# 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.verge.io/run-the-platform/zh/wang-luo/connect-lan-wan.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.
