如何在 Windows 11/10 上變更 NAT 類型

王林
發布: 2024-06-14 16:27:05
原創
1066 人瀏覽過

在線上玩多人遊戲時,您可能需要將 NAT 類型從嚴格更改為開放。嚴格或適度的 NAT 類型可能會導致加入遊戲聚會時出現網路問題,例如突然斷開連接、延遲、難以舉辦比賽等。

您可以變更 Windows 上的 NAT 類型以緩解限制,從而獲得更快、更可靠的網路連線。但在更改 NAT 時,您必須平衡您的需求和潛在的安全風險。

什麼是 NAT,NAT 型別有哪些?

網路位址轉換 (NAT) 是路由器(和防火牆)中的一項功能,可將家庭和辦公室設備中的私人 IPv4 位址轉換為 ISP 分配給路由器的公共 IPv4 位址,反之亦然。 NAT 有助於解決全球可用公共 IPv4 位址數量有限的問題。

NAT 類型描述了網路連線的狀態。三種 NAT 類型是嚴格、中等和開放。

  • NAT 類型嚴格:它是最安全的 NAT 類型,但也是最嚴格的類型。具有嚴格 NAT 類型的用戶可以加入由具有開放 NAT 類型的系統託管的遊戲。但是,如果具有中等 NAT 類型的系統加入同一遊戲,連線就會中斷。
  • NAT 類型中等:中等安全性並開啟一些連接埠。具有中等 NAT 類型的系統可以加入使用中等或開放 NAT 類型的其他系統。
  • NAT 類型開放:如果您想舉辦比賽,請選擇開放 NAT。它沒有限制,可以不受限制地促進所有設備之間的資料傳輸,無論其 NAT 類型或防火牆配置如何。

您的預設 NAT 類型取決於您的路由器設定。如果您遇到與網路相關的問題,將 NAT 類型從「嚴格」或「中等」變更為「開放」會有所幫助。但是,請警惕與將 NAT 類型變更為開放相關的潛在安全風險。

如何設定靜態專用 IP 位址

無論您要使用 UPnP 方法或連接埠轉送來變更 NAT 類型,您都需要一個靜態 IP 位址才能使其運作。由於大多數路由器指派動態 IP 位址,因此您必須為 Windows 裝置手動設定靜態 IP。

如果您已為裝置指派了靜態 IP 位址,請跳到下列步驟以變更 NAT 類型。如果沒有,請依照下列步驟在 Windows 電腦上設定靜態 IP 位址:

  1. 按 Win + R 開啟「執行」。
  2. 鍵入 cmd 並按一下「確定」以開啟命令提示字元。
  3. 在命令提示字元中,鍵入以下命令以查看網路資訊:
    <code class="hljs ">ipconfig </code> 
    登入後複製
  4. 在本指南中,我們將為乙太網路介面卡設定靜態 IP。因此,向下捲動到乙太網路適配器部分,記下 IPv4 位址、子網路遮罩和預設閘道。 How to Change NAT Type on Windows 11/10
  5. 前往“網路和網際網路”,然後按一下“乙太網路”以開啟乙太網路介面卡屬性。編輯」按鈕。
  1. 選擇自動 (DCHP) 下拉列表,然後選擇手動。How to Change NAT Type on Windows 11/10
  2. 切換開關以啟用 IPv4。 How to Change NAT Type on Windows 11/10
  3. 輸入 IP 位址,確保 IP 位址的前三個八位元位元組與使用 ipconfig 命令取得的 IPv4 位址匹配,例如,鍵入 192.168.0.200。如您所見,我們保留了IP 位址的前三個八位元組(192.168.0),但將第四個八位元組從101 更改為200。網路遮罩和預設閘道位址使用 ipconfig 指令取得的乙太網路適配器。
  4. How to Change NAT Type on Windows 11/10 在首選 DNS 欄位中,輸入 8.8.8.8;對於備用 DNS,輸入 8.8.4.4。這是 Google 提供的公共 DNS 伺服器。
  5. 將其他設定保留為預設值,然後按一下「儲存」為裝置設定靜態 IP 位址。
  6. How to Change NAT Type on Windows 11/10 擁有靜態 IP 後,您可以依照下列步驟變更 Windows 電腦上的 NAT 類型。
  7. 1. Turn On Discovery Mode on Windows

    Network Discovery is a built-in Windows feature to help you allow other computers on the network to detect your computer. You can turn On or Off the Network Discovery mode on Windows 10 from the Settings apps. Here's how to do it on Windows 11:

    1. Press Win + I to open Settings.
    2. Open the Network & internet tab in the left pane.How to Change NAT Type on Windows 11/10
    3. Click on Advanced network settings.How to Change NAT Type on Windows 11/10
    4. Scroll down and click Advanced sharing settings under the More settings section.How to Change NAT Type on Windows 11/10
    5. Toggle the switch for Network Discovery to turn it on for public networks.

    2. Enable UPnP On Your Router

    How to Change NAT Type on Windows 11/10

    You can change your NAT type to Open by enabling Universal Plug and Play (UPnP) in your router settings. This is the easiest way to change the NAT type, provided you can access your router configuration page. However, there are security concerns with the UPnP method, which hackers may exploit.

    Note that the following steps apply to a TP-Link router. The process to enable UPnP may differ for routers from other manufacturers. Check your router's user manual or manufacturer knowledge base online for instructions.

    Follow these steps to enable UPnP:

    1. Log in to your router's web-based utility. To do this, type the default gateway address (for example (http://192.168.0.1) in the search bar and press Enter. If not, here's how to find your router's IP address.
    2. On the router dashboard, open the Advanced tab.
    3. Click to expand NAT Forwarding in the left pane.
    4. Open the UPnP tab under NATForwarding.
    5. Toggle the switch to enable UPnP.

    You can now close your router's web-based utility and check for any improvements in your network connectivity.

    3. Change NAT Type Using Port Forwarding

    Alternatively, you can use the safer port forwarding method to change your NAT type for a specific game title or application. While the process is a little complicated compared to UPnP, port forwarding gives greater control over open ports and their usage with enhanced security.

    To create a new port forwarding entry, you'll need to know the TCP or UDP ports used for your specific game. For example, Call of Duty: Black Ops Cold War uses the following ports:

    <code class="hljs xml">TCP: 3074, 27014-27050UDP: 3074-3079</code> 
    登入後複製

    To find your game's UDP and TCP ports, perform a web search with your game title for port forwarding. Often, the game developers include port information for the game on their website.

    How to Change NAT Type on Windows 11/10

    Alternatively, go to portforward, select your game, and then your router name and model using the given options. On the following page, scroll down to locate the specific ports for your game. Port Forward keeps a database of ports for games on multiple platforms and for different router makers.

    To change NAT type using Power Forwarding:

    1. 登入路由器的網路應用程式。在本例中,我們將使用 TP-Link 的基於網路的實用程式。
    2. 開啟「進階」標籤。
    3. 在左側窗格中,按一下展開 NAT 轉送。 How to Change NAT Type on Windows 11/10
    4. 點擊右上角的 + 新增圖示以建立新的連接埠轉送條目。
    5. 在「新增連接埠轉送項目」對話方塊中,鍵入「服務名稱」的名稱。確保新增名稱以便於識別此連接埠轉送項目以供日後參考。
    6. 在外部和網際網路連接埠欄位中輸入遊戲的連接埠號碼。您可以使用 UDP 或 TCP 端口,但在外部端口和內部端口欄位中使用相同的端口。
    7. How to Change NAT Type on Windows 11/10 將協定欄位設為全部。
    8. 完成後,按一下「儲存」以儲存連接埠轉送條目。
    9. 該條目將保存在連接埠轉發表中。您可以使用狀態切換開關啟用或停用該條目。
    10. 除了連接埠轉送之外,您還可以透過修改路由器的設定檔來變更 NAT 類型。然而,包括TP-Link在內的一些路由器製造商對設定檔進行了加密,使得進行必要的修改變得極為困難。
    在 Windows 上變更 NAT 類型以修復網路問題 How to Change NAT Type on Windows 11/10

    可能需要變更 NAT 類型才能解決與網路相關的問題。您可以啟用 UPnP 或開啟網路發現來緩解網路限制。但是,我們建議使用連接埠轉送來減少網路限制,同時又不影響網路安全。

以上是如何在 Windows 11/10 上變更 NAT 類型的詳細內容。更多資訊請關注PHP中文網其他相關文章!

來源:makeuseof.com
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!