> For the complete documentation index, see [llms.txt](https://docs.parallels.com/landing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.parallels.com/landing/pdfm-ug/v20-zh-tw/parallels-desktop-for-mac-20-shi-yong-zhi-nan/parallels-desktop-pian-hao-she-ding-he-xu-ni-ji-qi-she-ding/parallels-desktop-pian-hao-she-ding/wang-lu-pian-hao-she-ding.md).

# 網路偏好設定

使用「**網路**偏好設定」可變更共用和僅限主機網路設定，或新增僅限主機網路。

若要開啟這些設定，選擇「**Parallels Desktop**」>「**偏好設定**」，然後按一下「**網路**」。

{% hint style="info" %}
**附註：**&#x6B64;標籤僅可用於 Parallels Desktop for Mac Pro 及 Business/Enterprise Edition。
{% endhint %}

<figure><img src="https://content.gitbook.com/content/NPLQPyrTCZG7rj2GnqwJ/blobs/92eR4nf8Jcxo9rC43QM1/Screenshot%202024-01-19%20at%2012.47.32.png" alt="" width="561"><figcaption></figcaption></figure>

### **共用網路**

依預設，虛擬機器設定為與 macOS 共用網路設定。當虛擬機器連線至共用網路，它可以存取 Mac、Mac 上的其他虛擬機器、區域網路上的電腦以及網際網路。

若要變更共用網路設定，請按一下「**共用**」並對 Parallels 的 IPv4 和 IPv6 DHCP 伺服器設定進行必要的變更。這些伺服器是預設開啟的，他們將自動分配 IP 位址給執行於共用網路模式下的虛擬機器。請注意，您的 Mac 在此網路中的 IPv4 位址是 10.211.55.2，而不是 10.211.55.1。

取消勾選「**使 Mac 連線至此網路**」核取方塊將阻止虛擬機器透過網際網路通訊協定 [(IP)](https://zh.wikipedia.org/wiki/OSI%E6%A8%A1%E5%9E%8B#%E7%AC%AC3%E5%B1%A4_%E7%B6%B2%E8%B7%AF%E5%B1%A4) 存取您的 Mac。

{% hint style="info" %}
**注意**：在運行 macOS Monterey 12 的 Intel Mac 上，在共用模式中將 Mac 與虛擬機器隔離的唯一可靠方法是使用防火牆。
{% endhint %}

通常，設定為在共用網路模式中操作的虛擬機器無法從外部電腦進行連線。埠轉發功能允許您本地網路與網際網路上的電腦傳輸資料到使用共用網路模式的任何虛擬機器。發送到 Mac 上指定埠的資料將會根據埠轉發規則被重導向至您虛擬機器的一個指定的埠。

要新增一個埠轉發規則：

1. 按一下「**埠轉發規則**」清單下的「**新增**」按鈕 (+)。
2. 在顯示的視窗中，進行以下操作：

   * 在「**協議存取**」欄位，指定您想要用於建立網路連線的埠類型。您可在 **TCP** 或 **UDP** 埠類型中選擇。
   * 在「**傳入埠**」欄位，輸入您 Mac 上傳入埠號。
   * 在「**IP 位址**」欄位，指定您想要連線的虛擬機器的 IP 位址。
   * 在「**目標埠**」欄位，輸入將要把資料移轉到的虛擬機器上的埠。

   <figure><img src="https://content.gitbook.com/content/NPLQPyrTCZG7rj2GnqwJ/blobs/lAm9FhmgAQaNtmu7DjqN/Screenshot%202024-01-19%20at%2012.52.07.png" alt=""><figcaption></figcaption></figure>
3. 按一下「**確定**」來新增規則。

新增規則時，請使用下列 IP 位址組合進行虛擬機器的外部連線：`<Mac 的 IP 位址>:<Incoming port>`。

<figure><img src="https://content.gitbook.com/content/NPLQPyrTCZG7rj2GnqwJ/blobs/cwL486eGUpLZGrzSI0v7/image.png" alt="" width="563"><figcaption></figcaption></figure>

若要編輯規則，可在「**埠轉發規則**」清單中選取該規則，按一下「**編輯**」按鈕 ，修改必要的設定，然後按一下「**確定**」以套用這些修改。

若要移除連線埠轉送規則，可在「**連線埠轉送規則**」清單中選取該規則，然後按一下「**移除**」按鈕 (-)。

### **僅限主機網路**

<figure><img src="https://content.gitbook.com/content/NPLQPyrTCZG7rj2GnqwJ/blobs/Bp4vQC9bDitEu0f4ktEP/Screenshot%202024-01-19%20at%2012.54.57.png" alt="" width="561"><figcaption></figcaption></figure>

當虛擬機器連線至僅限主機網路，它可以存取 Mac 和 Mac 上的其他虛擬機器。

{% hint style="info" %}
**注意**：如果您擁有 Apple silicon Mac 並想要在「僅主機」模式下執行 macOS 虛擬機器，您需要將 Mac 的作業系統更新至 macOS Sequoia 15 或更新版本，並將 Parallels Desktop 更新至 20.4.0 或更新版本。
{% endhint %}

若要變更僅限主機網路設定，請按一下「**僅限主機**」並對 Parallels 的 IPv4 和 IPv6 DHCP 伺服器設定進行必要的變更。這些伺服器是預設開啟的，會自動分配 IP 位址給在僅限主機網路模式下操作的虛擬機器。請注意，您的 Mac 在此網路中的 IPv4 位址是 10.37.129.2，而不是 10.37.129.1。

取消勾選「**使 Mac 連線至此網路**」核取方塊將阻止虛擬機器透過網際網路通訊協定 [(IP)](https://zh.wikipedia.org/wiki/OSI%E6%A8%A1%E5%9E%8B#%E7%AC%AC3%E5%B1%A4_%E7%B6%B2%E8%B7%AF%E5%B1%A4) 存取您的 Mac。

### **新增僅限主機網路**

若您需要管理虛擬機器之間的網路流量，您可以新增 Host-Only 網路。

若要新增僅限主機網路，請按一下「**新增**」按鈕 (+)。一旦新增 Host-Only 網路，可依您所需的方式配置其設定。

{% hint style="info" %}
**附註：**&#x82E5;要重新命名新的 Host-Only 網路，請按兩下其名稱，並輸入另一個名稱。
{% endhint %}

若要移除 Host-Only 網路，請選取它並按一下「**移除**」按鈕 (-)。


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.parallels.com/landing/pdfm-ug/v20-zh-tw/parallels-desktop-for-mac-20-shi-yong-zhi-nan/parallels-desktop-pian-hao-she-ding-he-xu-ni-ji-qi-she-ding/parallels-desktop-pian-hao-she-ding/wang-lu-pian-hao-she-ding.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
