> 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/knowledge-base/zh/networking/vmware-service-vm-nic-ipv4-configuration.md).

# 配置 VMware 服务 VM NIC IPv4 设置

## 概述

{% hint style="info" %}
**要点**

* VMware 服务虚拟机拥有一个标准虚拟机网卡中没有的独特 NIC 配置面板
* IPv4 面板允许分配静态 IP，并配置 DNS、搜索域和自定义路由
* 所有地址字段中，IP 地址使用 CIDR 表示法，而网关和 DNS 服务器使用纯 IP
  {% endhint %}

VergeOS 中的 VMware 服务虚拟机使用一种特殊的 NIC 类型（**VMware 备份**），其中包含一个用于分配静态网络设置的 IPv4 配置面板。本文介绍 NIC 设置和 IPv4 配置面板中的每个字段，并附有一个设置默认网关路由的示例。

## 前提条件

* 一个已在 VergeOS 中创建并可访问的 VMware 服务（请参见 [VMware Backup/DR 指南](/knowledge-base/zh/backup-dr/vmwarebackupdrguide.md) 以获取设置说明）
* 一个可供服务虚拟机连接的 VergeOS 网络
* 你环境中的静态 IP 地址、子网、网关和 DNS 信息

## 进入 NIC 设置

1. 导航到 **导入/导出** > **VMware 服务** 从主菜单。
2. **双击** 目标 VMware 服务以打开其仪表板。
3. 点击 **查看服务** 在左侧菜单中打开服务虚拟机仪表板。
4. 点击 **网卡** 左侧菜单中的。
5. **点击** 你要配置的 NIC，并选择 **编辑** ，位于左侧菜单中。

## NIC 设置（左侧面板）

左侧面板包含通用 NIC 配置字段：

| 字段         | 说明                        |
| ---------- | ------------------------- |
| **已启用**    | 切换以启用或禁用此 NIC。            |
| **名称**     | 接口名称，显示在虚拟机中（例如， `eth0`). |
| **顺序 ID**  | 此 NIC 的启动顺序。 `0` 先加载。     |
| **网络**     | 要将此 NIC 连接到的 VergeOS 网络。  |
| **MAC 地址** | 自动分配。如果需要特定 MAC，可更改。      |
| **说明**     | 可用于备注或识别信息的可选字段。          |

## IPv4 配置（右侧面板）

右侧面板提供静态 IPv4 配置。将 **类型** 下拉菜单设为 **静态** 以显示地址字段。

### IP 地址

| 字段        | 格式       | 示例                |
| --------- | -------- | ----------------- |
| **IP 地址** | CIDR 表示法 | `192.168.1.10/24` |

{% hint style="success" %}
**CIDR 表示法**

始终在 IP 地址后包含子网前缀长度。例如， `/24` 对应于 `255.255.255.0` 子网掩码。
{% endhint %}

### DNS 服务器

| 字段     | 格式      | 示例             |
| ------ | ------- | -------------- |
| **地址** | 纯 IP 地址 | `192.168.1.53` |

使用 **+** 按钮用于添加条目。每个部分还提供上下箭头用于重新排序，垃圾桶图标用于删除，铅笔图标用于编辑。

### 搜索域

| 字段    | 格式     | 示例              |
| ----- | ------ | --------------- |
| **域** | DNS 域名 | `company.local` |

使用 **+** 按钮用于添加条目。每个部分还提供上下箭头用于重新排序，垃圾桶图标用于删除，铅笔图标用于编辑。

### 路由

| 字段          | 格式           | 示例            |
| ----------- | ------------ | ------------- |
| **地址** （必填） | CIDR 表示法的网络  | `0.0.0.0/0`   |
| **网关** （必填） | 纯 IP 地址（下一跳） | `192.168.1.1` |
| **度量值**     | 整数（越小优先级越高）  | `100`         |

使用 **+** 按钮用于添加条目。每个部分还提供上下箭头用于重新排序，垃圾桶图标用于删除，铅笔图标用于编辑。

{% hint style="info" %}
**路由地址字段**

使用 `0.0.0.0/0` 作为默认网关路由的地址。对于特定子网路由，请以 CIDR 表示法输入目标网络（例如， `10.0.0.0/8`).
{% endhint %}

## 示例：默认网关配置

要为 VMware 服务虚拟机 NIC 配置标准默认网关路由：

1. 设置 **类型** 更改为 **静态**.
2. 输入 **IP 地址** 以 CIDR 表示法（例如， `192.168.1.10/24`).
3. 在 **DNS 服务器**，点击 **+** 并输入 DNS 服务器地址（例如， `192.168.1.53`).
4. 在 **路由**，点击 **+** 并输入以下内容：

   | 字段      | 值             |
   | ------- | ------------- |
   | **地址**  | `0.0.0.0/0`   |
   | **网关**  | `192.168.1.1` |
   | **度量值** | `100`         |
5. 点击 **提交** 以保存配置。

## 故障排除

{% hint style="warning" %}
**常见问题**

* **服务无法访问外部网络**：验证默认网关路由（`0.0.0.0/0`）已配置，并且所选 VergeOS 网络的网关 IP 正确。
* **DNS 解析不起作用**：确认所选网络能够访问 DNS 服务器地址，并且输入的是纯 IP（不是 CIDR 表示法）。
* **IP 地址被拒绝**：确保 IP 地址包含 CIDR 前缀长度（例如， `192.168.1.10/24`，而不是 `192.168.1.10`).
  {% endhint %}

## 其他资源

* [VMware Backup/DR 指南](/knowledge-base/zh/backup-dr/vmwarebackupdrguide.md)
* [虚拟机 NIC](/run-the-platform/virtual-machines/vm-nics.md)

## 反馈

{% hint style="info" %}
**需要帮助吗？**

如果你需要进一步帮助或对本文有任何疑问，请随时联系 [VergeOS 支持团队](/support-and-services.md).
{% endhint %}


---

# 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/knowledge-base/zh/networking/vmware-service-vm-nic-ipv4-configuration.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.
