Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Win10 手動設定固定 IP 位址指令教學:netsh interface ip set address

編輯:Win10 系統應用技巧

Win10 10056+ 版本圖形介面設定固定 IP 可能受限,可使用 netsh 指令精確設定 IP、子網路遮罩、閘道、DNS。

指令語法

netsh interface ip set address "介面名稱" static IP位址 子網路遮罩 閘道 1
  • 介面名稱:需與「網路連線」 (ncpa.cpl) 中顯示名稱完全一致 (如「乙太網路」、「乙太網路 3」),支援中文,雙引號必須為英文半形。
  • 各參數間需空格分隔。
  • 結尾 1 代表確認執行。

範例

netsh interface ip set address "乙太網路 3" static 192.168.1.108 255.255.255.0 192.168.0.1 1

一鍵完整指令 (含 DNS)

netsh interface ip set address "乙太網路 3" static 192.168.1.108 255.255.255.0 192.168.0.1 1
netsh interface ip set dns "乙太網路 3" static 8.8.8.8

恢復 DHCP 自動取得

netsh interface ip set address "介面名稱" dhcp
netsh interface ip set dns "介面名稱" dhcp

netsh 指令設定固定IP示意

初學者建議: 指令參數嚴格易錯,一般用戶優先使用圖形介面 (「網路連線」→ 介面右鍵「內容」→ IPv4 內容) 設定固定 IP,較直觀不易出錯。

Copyright © Windows教程網 All Rights Reserved