Windows Route 內外網路由設定
1.當公司網路有提供內網 192.168.1.0 C.class DHCP 配發ip
2.很貼心的連 DNS Server都給你的時候
3.路由亂掉的鬼故事就開始了
解決辦法
1.查詢 網卡的 interface
C:\Users\ssc24>route print =========================================================================== 介面清單 67...00 15 5d 01 d7 6b ......Hyper-V Virtual Ethernet Adapter 7...fc 34 97 49 78 25 ......Realtek PCIe GbE Family Controller 22...0a 00 27 00 00 16 ......VirtualBox Host-Only Ethernet Adapter 18...b0 a4 60 fe 16 be ......Microsoft Wi-Fi Direct Virtual Adapter 10...b2 a4 60 fe 16 bd ......Microsoft Wi-Fi Direct Virtual Adapter #2 19...00 09 0f fe 00 01 ......Fortinet Virtual Ethernet Adapter (NDIS 6.30) 9...b0 a4 60 fe 16 bd ......Intel(R) Wi-Fi 6 AX200 160MHz 11...b0 a4 60 fe 16 c1 ......Bluetooth Device (Personal Area Network) 1...........................Software Loopback Interface 1 ===========================================================================2.執行以下語法
route delete 0.0.0.0 route delete 192.168.1.0 route add -p 192.168.1.0 mask 255.255.255.0 192.168.1.254 metric 1 if 7 netsh interface ip add dns "乙太網路" 1.1.1.1 index=1 >nul netsh interface ip add dns "乙太網路" 8.8.8.8 index=2 >nul netsh interface ip add dns "Wi-Fi" 1.1.1.1 index=1 >nul netsh interface ip add dns "Wi-Fi" 8.8.8.8 index=2 >nul