Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Windows 綜合教學 >> 關於 Windows

Windows XP 雙閘道切換批次檔:快速切換內外網預設閘道

編輯:關於 Windows

XP 預設僅支援單一預設閘道。雙網卡環境下需切換內外網,可透過批次檔快速修改閘道設定。

批次檔內容

@echo off
color 0b
echo.
echo ==============================================================
echo. 為了優化上網品質,切換網路線路!
echo ==============================================================
set /p var= 請按任一鍵開始切換!
echo 正在為您更換較快線路,請稍候 .......
netsh i i set address name="區域連線" gateway=192.168.1.250 gwmetric=1

使用技巧

  • 建立多個批次檔對應不同閘道(如「內網閘道.bat」、「外網閘道.bat」)。
  • 右鍵批次檔 → 「內容」 → 設定快速鍵(如 Ctrl+Alt+1),一鍵切換。
批次檔切換閘道

注意:Win7 以上系統內建支援多閘道度量值,無需此法。企業環境建議遵循網路政策,勿隨意切換閘道。

Copyright © Windows教程網 All Rights Reserved