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

解決 Windows 7 雙網卡內外網衝突:單一預設閘道 + 靜態路由

編輯:Windows 7 系統介紹

雙網卡同時連接內網與外網時,兩個預設閘道會衝突導致兩邊都無法存取。解決核心:僅設定一個預設閘道,另一邊改用靜態路由。

設定步驟

  1. 外網網卡正常設定 IP、子網路遮罩、預設閘道、DNS。
  2. 內網網卡設定 IP、子網路遮罩,預設閘道留空。
  3. 管理員命令提示字元執行 route print 確認 0.0.0.0 走向外網閘道。若非,執行:
route delete 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 <外網閘道IP>
  1. 新增內網靜態路由(永久生效 -p):
route add -p 192.168.100.0 mask 255.255.255.0 192.168.100.1 if 14
  • 192.168.100.0/24:內網網段
  • 192.168.100.1:內網閘道
  • if 14:內網介面編號(route print 介面清單查看)
  • -p:重開機保留

此設定讓外網流量走預設閘道,內網流量走靜態路由,雙網卡和諧共存。

Copyright © Windows教程網 All Rights Reserved